Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85973 - branches/modular-build/libs/predef/test
From: ghost_at_[hidden]
Date: 2013-09-27 02:19:24


Author: vladimir_prus
Date: 2013-09-27 02:19:24 EDT (Fri, 27 Sep 2013)
New Revision: 85973
URL: http://svn.boost.org/trac/boost/changeset/85973

Log:
Make predef tests build in modular layout.

Text files modified:
   branches/modular-build/libs/predef/test/build.jam | 23 +++++++++++++++++++----
   1 files changed, 19 insertions(+), 4 deletions(-)

Modified: branches/modular-build/libs/predef/test/build.jam
==============================================================================
--- branches/modular-build/libs/predef/test/build.jam Fri Sep 27 02:18:43 2013 (r85972)
+++ branches/modular-build/libs/predef/test/build.jam 2013-09-27 02:19:24 EDT (Fri, 27 Sep 2013) (r85973)
@@ -4,19 +4,34 @@
 # (See accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
 
+local predef-include-root ;
+local predef-dependency ;
+
+# 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_PREDEF_ROOT)
 {
- path-constant BOOST_PREDEF_INCLUDE_ROOT : $(BOOST_PREDEF_ROOT)/include ;
+ predef-include-root = $(BOOST_PREDEF_ROOT)/include ;
+ predef-dependency = $(predef-include-root)/boost/predef.h ;
+}
+else if $(BOOST_MODULARLAYOUT)
+{
+ predef-include-root = $(BOOST_ROOT)/include ;
+ predef-dependency = /boost//predef-headers ;
 }
 else
 {
- path-constant BOOST_PREDEF_INCLUDE_ROOT : $(BOOST_ROOT) ;
+ predef-include-root = $(BOOST_ROOT) ;
+ predef-dependency = $(predef-include-root)/boost/predef.h ;
 }
 
 project test
     : requirements
- <include>$(BOOST_PREDEF_INCLUDE_ROOT)
- <dependency>$(BOOST_PREDEF_INCLUDE_ROOT)/boost/predef.h
+ <include>$(predef-include-root)
+ # Add explicit dependency since we don't have header scanner for
+ # .m and .mm files.
+ <dependency>$(predef-dependency)
     ;
 
 using testing ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk