| #!/usr/bin/env b2 -a --verbose-test |
| # Copyright Rene Rivera 2011-2013 |
| # Distributed under the Boost Software License, Version 1.0. |
| # (See accompanying file LICENSE_1_0.txt or copy at |
| # http://www.boost.org/LICENSE_1_0.txt) |
| |
| import ../check/predef : require : predef-require ; |
| |
| local predef-include-root ; |
| local predef-dependency ; |
| |
| local modular-predef-h = [ glob $(BOOST_PREDEF_ROOT)/include/boost/predef.h ] ; |
| local BOOST_RELEASE_LAYOUT ; |
| if ! $(modular-predef-h) |
| { |
| BOOST_RELEASE_LAYOUT = yes ; |
| } |
| |
| # When using modular layout, header files are not present in $root/boost |
| # unlink links are created, therefore instead of direct dependency on |
| # a header, we need to use dependency on metatarget. |
| if $(BOOST_RELEASE_LAYOUT) |
| { |
| predef-dependency = $(predef-include-root)/boost/predef.h ; |
| } |
| else if $(BOOST_PREDEF_ROOT) |
| { |
| predef-include-root = $(BOOST_PREDEF_ROOT)/include ; |
| predef-dependency = $(predef-include-root)/boost/predef.h ; |
| } |
| else if $(BOOST_MODULARLAYOUT) |
| { |
| predef-include-root = $(BOOST_ROOT) ; |
| predef-dependency = /boost//predef-headers ; |
| } |
| else |
| { |
| predef-dependency = $(predef-include-root)/boost/predef.h ; |
| } |
| |
| project test |
| : requirements |
| <include>$(predef-include-root) |
| # Add explicit dependency since we don't have header scanner for |
| # .m and .mm files. |
| <dependency>$(predef-dependency) |
| ; |
| |
| using testing ; |
| |
| test-suite predef : |
| [ run info_as_cpp.cpp : : : <test-info>always_show_run_output ] |
| [ run info_as_c.c : : : <test-info>always_show_run_output ] |
| [ run info_as_objcpp.mm : : : <test-info>always_show_run_output ] |
| [ run info_as_objc.m : : : <test-info>always_show_run_output ] |
| [ run version.cpp ] |
| [ run make.cpp ] |
| [ compile macos_endian.c : [ predef-require "BOOST_OS_MACOS" : cpp ] ] |
| [ compile macos_vs_bsd.c : [ predef-require "BOOST_OS_MACOS" : cpp ] ] |
| ; |