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 : : : $(subdir) $(requirements) : $(subdir)-$(cpp_fname) ; } rule subdir-compile-fail ( subdir : cpp_fname : requirements * ) { compile-fail $(subdir)/$(cpp_fname).cpp : $(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 gcc:-std=c++11 clang:-std=c++11 "./include" $(BOOST_ROOT) $(BOOST_ROOT)/stage/lib ;