mirror of
https://github.com/boostorg/config.git
synced 2025-07-31 21:04:28 +02:00
Modify Jamfile to configure external library support better.
This commit is contained in:
@@ -20,20 +20,15 @@ import ../checks/config : requires ;
|
|||||||
local is_unix = [ modules.peek : UNIX ] ;
|
local is_unix = [ modules.peek : UNIX ] ;
|
||||||
|
|
||||||
lib atomic ;
|
lib atomic ;
|
||||||
|
lib pthread ;
|
||||||
|
lib rt ;
|
||||||
|
|
||||||
exe has_atomic_lib : config_info.cpp atomic ;
|
exe has_atomic_lib : config_info.cpp atomic ;
|
||||||
explicit has_atomic_lib ;
|
explicit has_atomic_lib ;
|
||||||
|
exe has_pthread_lib : config_info.cpp pthread ;
|
||||||
if $(is_unix)
|
explicit has_pthread_lib ;
|
||||||
{
|
exe has_rt_lib : config_info.cpp rt ;
|
||||||
local osname = [ SHELL uname ] ;
|
explicit has_rt_lib ;
|
||||||
|
|
||||||
switch $(osname)
|
|
||||||
{
|
|
||||||
case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ;
|
|
||||||
case "*BSD*" : OTHERFLAGS = "-lpthread" ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test-suite config
|
test-suite config
|
||||||
:
|
:
|
||||||
@@ -44,6 +39,8 @@ test-suite config
|
|||||||
: #requirements
|
: #requirements
|
||||||
<threading>multi
|
<threading>multi
|
||||||
[ check-target-builds has_atomic_lib : <source>atomic ]
|
[ check-target-builds has_atomic_lib : <source>atomic ]
|
||||||
|
[ check-target-builds has_pthread_lib : <source>pthread ]
|
||||||
|
[ check-target-builds has_rt_lib : <source>rt ]
|
||||||
: config_test_threaded
|
: config_test_threaded
|
||||||
]
|
]
|
||||||
[ run config_test.cpp
|
[ run config_test.cpp
|
||||||
@@ -51,20 +48,18 @@ test-suite config
|
|||||||
: #input-files
|
: #input-files
|
||||||
: #requirements
|
: #requirements
|
||||||
<threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static
|
<threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static
|
||||||
<target-os>linux:<linkflags>-lpthread
|
|
||||||
<target-os>linux:<linkflags>-lrt
|
|
||||||
<toolset>gcc:<linkflags>$(OTHERFLAGS)
|
|
||||||
[ check-target-builds has_atomic_lib : <source>atomic ]
|
[ check-target-builds has_atomic_lib : <source>atomic ]
|
||||||
|
[ check-target-builds has_pthread_lib : <source>pthread ]
|
||||||
|
[ check-target-builds has_rt_lib : <source>rt ]
|
||||||
]
|
]
|
||||||
[ run config_test.cpp
|
[ run config_test.cpp
|
||||||
: #args
|
: #args
|
||||||
: #input-files
|
: #input-files
|
||||||
: #requirements
|
: #requirements
|
||||||
<rtti>off
|
<rtti>off
|
||||||
<target-os>linux:<linkflags>-lpthread
|
|
||||||
<target-os>linux:<linkflags>-lrt
|
|
||||||
<toolset>gcc:<linkflags>$(OTHERFLAGS)
|
|
||||||
[ check-target-builds has_atomic_lib : <source>atomic ]
|
[ check-target-builds has_atomic_lib : <source>atomic ]
|
||||||
|
[ check-target-builds has_pthread_lib : <source>pthread ]
|
||||||
|
[ check-target-builds has_rt_lib : <source>rt ]
|
||||||
: config_test_no_rtti
|
: config_test_no_rtti
|
||||||
]
|
]
|
||||||
[ run config_test.cpp
|
[ run config_test.cpp
|
||||||
@@ -72,10 +67,9 @@ test-suite config
|
|||||||
: #input-files
|
: #input-files
|
||||||
: #requirements
|
: #requirements
|
||||||
<exception-handling>off
|
<exception-handling>off
|
||||||
<target-os>linux:<linkflags>-lpthread
|
|
||||||
<target-os>linux:<linkflags>-lrt
|
|
||||||
<toolset>gcc:<linkflags>$(OTHERFLAGS)
|
|
||||||
[ check-target-builds has_atomic_lib : <source>atomic ]
|
[ check-target-builds has_atomic_lib : <source>atomic ]
|
||||||
|
[ check-target-builds has_pthread_lib : <source>pthread ]
|
||||||
|
[ check-target-builds has_rt_lib : <source>rt ]
|
||||||
: config_test_no_except
|
: config_test_no_except
|
||||||
]
|
]
|
||||||
[ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static ]
|
[ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static ]
|
||||||
|
Reference in New Issue
Block a user