mirror of
https://github.com/boostorg/contract.git
synced 2026-02-21 15:02:26 +00:00
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
|
|
import os ;
|
|
import testing ;
|
|
|
|
#actions wave { wave $(>) -o $(<) --timer }
|
|
|
|
rule test-pp ( filestem ) {
|
|
run $(filestem).cpp ;
|
|
|
|
preprocessed $(filestem)-pp : $(filestem).cpp : <cxxflags>-DDEBUG ;
|
|
alias $(filestem)-pp.ii : $(filestem)-pp ;
|
|
explicit $(filestem)-pp $(filestem)-pp.ii ;
|
|
|
|
# TODO: This is "good enough"... but it'd be better is wave was ran by
|
|
# something like `bjam ... toolset=wave`.
|
|
# TODO: Fix and uncomment the following.
|
|
#make $(filestem)-wave.ii : $(filestem).cpp : @wave ;
|
|
#alias $(filestem)-wave : $(filestem)-wave.ii ;
|
|
}
|
|
|
|
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:" $(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
|
|
;
|
|
|
|
echo """
|
|
EXAMPLES
|
|
Pre-process specified file to bin/.../<file-stem>-pp.ii using compiler:
|
|
$ bjam [-aq] <file-stem>-pp [cxxflags=-UDEBUG] [toolset=msvc|gcc|clang]
|
|
|
|
Pre-process specified file to bin/.../<file-stem>-wave.ii using WAVE:
|
|
$ bjam [-aq] <file-stem>-wave
|
|
(Edit wave.cfg for -UDEBUG, lib paths, etc.)
|
|
|
|
Compile and run program <file-stem>.cpp:
|
|
$ bjam [-aq] <file-stem> [toolset=msvc,gcc,clang]
|
|
|
|
Compile and run all programs in current directory:
|
|
$ bjam [-aq] [toolset=msvc,gcc,clang]
|
|
"""
|
|
;
|
|
|