mirror of
https://github.com/boostorg/contract.git
synced 2026-01-27 06:42:20 +00:00
35 lines
965 B
Plaintext
35 lines
965 B
Plaintext
|
|
import testing ;
|
|
import os ;
|
|
|
|
# Following `subdir-...` create targets named "subdir_name-file_name".
|
|
|
|
rule subdir-run ( subdir : cpp_fname : requirements * )
|
|
{
|
|
run $(subdir)/$(cpp_fname).cpp : : : <include>$(subdir) $(requirements) :
|
|
$(subdir)-$(cpp_fname) ;
|
|
}
|
|
|
|
rule subdir-compile-fail ( subdir : cpp_fname : requirements * )
|
|
{
|
|
compile-fail $(subdir)/$(cpp_fname).cpp :
|
|
<include>$(subdir) $(requirements) : $(subdir)-$(cpp_fname) ;
|
|
}
|
|
|
|
if ! [ os.environ BOOST_ROOT ] {
|
|
exit "Error: Set BOOST_ROOT environment variable to Boost root directory" ;
|
|
}
|
|
local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
|
|
echo "Using Boost libraries from (see $BOOST_ROOT): $(BOOST_ROOT)" ;
|
|
use-project boost : $(BOOST_ROOT) ;
|
|
|
|
project
|
|
: requirements
|
|
<toolset>gcc:<cxxflags>-std=c++11
|
|
<toolset>clang:<cxxflags>-std=c++11
|
|
<include>"./include"
|
|
<include>$(BOOST_ROOT)
|
|
<library-path>$(BOOST_ROOT)/stage/lib
|
|
;
|
|
|