summaryrefslogtreecommitdiff
path: root/jam-files
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-05-13 22:23:34 -0700
committerChris Dyer <cdyer@cs.cmu.edu>2012-05-13 22:23:34 -0700
commit824c96f038b0447ce83ae92cad112a5be49e3330 (patch)
treeeb7bc21aa8f1e80f9c5f6608b7ba2eddf70bfcf4 /jam-files
parent5853cf45e028a24387a5649642bcbfe2ed376293 (diff)
parenta65a80c5d5b6fc4cbd32280f07cae9be71551b70 (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'jam-files')
-rw-r--r--jam-files/sanity.jam12
1 files changed, 7 insertions, 5 deletions
diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam
index eeb59f6e..9c75c247 100644
--- a/jam-files/sanity.jam
+++ b/jam-files/sanity.jam
@@ -13,9 +13,15 @@ rule _shell ( cmd : extras * ) {
return [ trim-nl [ SHELL $(cmd) : $(extras) ] ] ;
}
+cxxflags = [ os.environ "CXXFLAGS" ] ;
+cflags = [ os.environ "CFLAGS" ] ;
+ldflags = [ os.environ "LDFLAGS" ] ;
+
#Run g++ with empty main and these arguments to see if it passes.
rule test_flags ( flags * ) {
- local cmd = "bash -c \"g++ "$(flags:J=" ")" -x c++ - <<<'int main() {}' -o /dev/null >/dev/null 2>/dev/null\"" ;
+ local add = $(CXXFLAGS) $(LDFLAGS) ;
+ add ?= "" ;
+ local cmd = "bash -c \"g++ $(add) "$(flags:J=" ")" -x c++ - <<<'int main() {}' -o /dev/null >/dev/null 2>/dev/null\"" ;
local ret = [ SHELL $(cmd) : exit-status ] ;
if --debug-configuration in [ modules.peek : ARGV ] {
echo $(cmd) ;
@@ -144,10 +150,6 @@ rule external-lib ( name : search-path * ) {
requirements = ;
{
- local cxxflags = [ os.environ "CXXFLAGS" ] ;
- local cflags = [ os.environ "CFLAGS" ] ;
- local ldflags = [ os.environ "LDFLAGS" ] ;
-
#Boost jam's static clang is buggy.
requirements += <cxxflags>$(cxxflags) <cflags>$(cflags) <linkflags>$(ldflags) <toolset>clang:<link>shared ;