Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2007-05-17 13:07:38


Author: troy
Date: 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
New Revision: 4099
URL: http://svn.boost.org/trac/boost/changeset/4099

Log:
sticky flags work fine. I am having a hard time believing
this but there are good tests to prove it.

Added:
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/a/a.hpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/b.hpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/ashared_cstatic.cpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/astatic_cshared.cpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/c.hpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/test_shared.cpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/test_static.cpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/ashared_cstatic.cpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/astatic_cshared.cpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/c.hpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/d.hpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/test_shared.cpp
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/test_static.cpp
Text files modified:
   sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake | 15 ++++++++++++---
   sandbox/troy/boost_1_34_0/tools/build/CMake/boost.cmake | 2 +-
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/CMakeLists.txt | 2 +-
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/CMakeLists.txt | 7 ++++---
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/lib.cpp | 21 ++++++++++++++++++++-
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/CMakeLists.txt | 15 ++++++++++++++-
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/lib.cpp | 29 +++++++++++++++++++++++++++--
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/CMakeLists.txt | 14 +++++++++++++-
   sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/lib.cpp | 33 +++++++++++++++++++++++++++++++--
   9 files changed, 123 insertions(+), 15 deletions(-)

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -65,7 +65,7 @@
 endmacro(push_back_target_property target property pushvalue)
 
 macro(propagate_property)
- trace("args: ${ARGN}")
+ trace("args:" ${ARGN})
   parse_arguments(_
     "FROM_TARGET;TO_TARGET;FROM_PROPNAME;TO_PROPNAME"
     ""
@@ -104,10 +104,14 @@
       STICKY_COMPILE_FLAGS "${THIS_LIB_STICKY_COMPILE_FLAGS} ${THIS_LIB_STICKY_STATIC_COMPILE_FLAGS}"
       STICKY_LINK_FLAGS "${THIS_LIB_STICKY_STATIC_LINK_FLAGS}"
       )
- MESSAGE("sticky statics(${libname}): ${THIS_LIB_STICKY_STATIC_COMPILE_FLAGS}")
+ trace("sticky statics(${libname}): ${THIS_LIB_STICKY_STATIC_COMPILE_FLAGS}")
     foreach(dependency ${THIS_LIB_DEPENDS})
       target_link_libraries("${libname}-static" "${dependency}-static")
-# propagate_property(TARGET ${libname}-static DEPENDENCY ${dependency}-static DEP_PROPNAME STICKY_STATIC_COMPILE_FLAGS TARG_PROPNAME STICKY_COMPILE_FLAGS)
+ propagate_property(FROM_TARGET "${dependency}-static"
+ FROM_PROPNAME STICKY_COMPILE_FLAGS
+ TO_TARGET ${libname}-static
+ TO_PROPNAME COMPILE_FLAGS
+ )
     endforeach(dependency "${THIS_LIB_DEPENDS}")
 
     install(TARGETS "${libname}-static" DESTINATION lib)
@@ -124,6 +128,11 @@
       )
     foreach(dependency ${THIS_LIB_DEPENDS})
       target_link_libraries("${libname}-shared" "${dependency}-shared")
+ propagate_property(FROM_TARGET "${dependency}-shared"
+ FROM_PROPNAME STICKY_COMPILE_FLAGS
+ TO_TARGET ${libname}-shared
+ TO_PROPNAME COMPILE_FLAGS
+ )
     endforeach(dependency ${THIS_LIB_DEPENDS})
     install(TARGETS "${libname}-shared" DESTINATION lib)
   ENDIF(NOT "${THIS_LIB_NO_SHARED}" STREQUAL "TRUE")

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/boost.cmake
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/boost.cmake (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/boost.cmake 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -7,7 +7,7 @@
 include(boost-core)
 include(boost-testing)
 
-set(DEBUG TRUE)
+set(DEBUG FALSE)
 macro(TRACE)
   if (DEBUG)
     MESSAGE("~~ " ${ARGN})

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/CMakeLists.txt
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/testing/CMakeLists.txt (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/CMakeLists.txt 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -12,4 +12,4 @@
 add_subdirectory(b)
 add_subdirectory(c)
 add_subdirectory(d)
-add_subdirectory(e)
\ No newline at end of file
+#add_subdirectory(e)
\ No newline at end of file

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/a/a.hpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/a/a.hpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,10 @@
+#include <string>
+
+std::string a_linktype();
+
+
+
+
+
+
+

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/CMakeLists.txt
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/CMakeLists.txt (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/CMakeLists.txt 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -5,15 +5,16 @@
 boost_library(b
   lib.cpp
   COMPILE_FLAGS -DB_COMPILE_FLAGS
- STICKY_COMPILE_FLAGS -DB_STICKY_COMPILE_FLAGS
+ STICKY_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -DB_STICKY_COMPILE_FLAGS"
   STATIC_COMPILE_FLAGS -DLINKTYPE=static
   STICKY_STATIC_COMPILE_FLAGS -DB_STICKY_STATIC_COMPILE_FLAGS
   SHARED_COMPILE_FLAGS -DLINKTYPE=shared
   STICKY_SHARED_COMPILE_FLAGS -DB_STICKY_SHARED_COMPILE_FLAGS
+ DEPENDS a
 )
-
+
 boost_test_run(test_shared DEPENDS b-shared a-shared)
 boost_test_run(test_static DEPENDS b-static a-static)
-
+
 boost_test_run(astatic_bshared DEPENDS a-static b-shared)
 boost_test_run(ashared_bstatic DEPENDS a-shared b-static)

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/b.hpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/b.hpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,10 @@
+#include <string>
+
+std::string b_linktype();
+
+
+
+
+
+
+

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/lib.cpp
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/lib.cpp (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/b/lib.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -2,6 +2,7 @@
 #include <string>
 #include <boost/preprocessor/stringize.hpp>
 
+// we should see these
 #ifndef B_COMPILE_FLAGS
 #error B_COMPILE_FLAGS
 #endif
@@ -9,5 +10,23 @@
 #error B_STICKY_COMPILE_FLAGS
 #endif
 
-std::string b_linktype() { return BOOST_PP_STRINGIZE(LINKTYPE); }
+#ifndef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+
+/// should NOT see these
+#ifdef A_COMPILE_FLAGS
+#error A_COMPILE_FLAGS
+#endif
+
+#ifdef C_COMPILE_FLAGS
+#error C_COMPILE_FLAGS
+#endif
+#ifdef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+
+#include "a.hpp"
+
+std::string b_linktype() { a_linktype(); return BOOST_PP_STRINGIZE(LINKTYPE); }
 

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/CMakeLists.txt
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/CMakeLists.txt (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/CMakeLists.txt 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -2,6 +2,19 @@
   C
 )
 
-boost_library(boost_c lib.cpp)
+boost_library(c
+ lib.cpp
+ COMPILE_FLAGS -DC_COMPILE_FLAGS
+ STICKY_COMPILE_FLAGS -DC_STICKY_COMPILE_FLAGS
+ STATIC_COMPILE_FLAGS -DLINKTYPE=static
+ STICKY_STATIC_COMPILE_FLAGS -DC_STICKY_STATIC_COMPILE_FLAGS
+ SHARED_COMPILE_FLAGS -DLINKTYPE=shared
+ STICKY_SHARED_COMPILE_FLAGS -DC_STICKY_SHARED_COMPILE_FLAGS
+ DEPENDS a
+)
 
+boost_test_run(test_shared DEPENDS c-shared a-shared)
+boost_test_run(test_static DEPENDS c-static a-static)
 
+boost_test_run(astatic_cshared DEPENDS c-shared a-static)
+boost_test_run(ashared_cstatic DEPENDS c-static a-shared)

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/ashared_cstatic.cpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/ashared_cstatic.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,24 @@
+#ifndef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+#ifndef A_STICKY_SHARED_COMPILE_FLAGS
+#error A_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_STATIC_COMPILE_FLAGS
+#error C_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#include "a.hpp"
+#include "c.hpp"
+#include <cassert>
+
+int main(int argc, char**argv)
+{
+ assert(a_linktype() == "shared");
+ assert(c_linktype() == "static");
+}
+

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/astatic_cshared.cpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/astatic_cshared.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,34 @@
+#ifndef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+
+#ifndef A_STICKY_STATIC_COMPILE_FLAGS
+#error A_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#ifdef B_STICKY_COMPILE_FLAGS
+#error B_STICKY_COMPILE_FLAGS
+#endif
+
+#ifdef B_STICKY_SHARED_COMPILE_FLAGS
+#error B_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+
+#ifndef C_STICKY_SHARED_COMPILE_FLAGS
+#error C_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#include "a.hpp"
+#include "c.hpp"
+#include <cassert>
+
+int main(int argc, char**argv)
+{
+ assert(a_linktype() == "static");
+ assert(c_linktype() == "shared");
+}
+

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/c.hpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/c.hpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,10 @@
+#include <string>
+
+std::string c_linktype();
+
+
+
+
+
+
+

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/lib.cpp
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/lib.cpp (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/lib.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -1,9 +1,34 @@
 #include <iostream>
 #include <string>
+#include <boost/preprocessor/stringize.hpp>
 
-std::string c() { return "c"; }
-
+// we should see these
+#ifndef C_COMPILE_FLAGS
+#error C_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+
+#ifndef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+
+/// should NOT see these
+
+#ifdef A_COMPILE_FLAGS
+#error A_COMPILE_FLAGS
+#endif
+
+#ifdef B_COMPILE_FLAGS
+#error B_COMPILE_FLAGS
+#endif
+#ifdef B_STICKY_COMPILE_FLAGS
+#error B_STICKY_COMPILE_FLAGS
+#endif
 
+#include "a.hpp"
 
+std::string c_linktype() { a_linktype(); return BOOST_PP_STRINGIZE(LINKTYPE); }
 
 

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/test_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/test_shared.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,31 @@
+#ifndef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+#ifndef A_STICKY_SHARED_COMPILE_FLAGS
+#error A_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#ifdef B_STICKY_COMPILE_FLAGS
+#error B_STICKY_COMPILE_FLAGS
+#endif
+#ifdef B_STICKY_SHARED_COMPILE_FLAGS
+#error B_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_SHARED_COMPILE_FLAGS
+#error C_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+
+#include "a.hpp"
+#include "c.hpp"
+#include <cassert>
+int main(int argc, char**argv)
+{
+ assert(c_linktype() == "shared");
+ assert(a_linktype() == "shared");
+}
+

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/test_static.cpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/c/test_static.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,31 @@
+#ifndef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+#ifndef A_STICKY_STATIC_COMPILE_FLAGS
+#error A_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#ifdef B_STICKY_COMPILE_FLAGS
+#error B_STICKY_COMPILE_FLAGS
+#endif
+#ifdef B_STICKY_STATIC_COMPILE_FLAGS
+#error B_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_STATIC_COMPILE_FLAGS
+#error C_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#include "a.hpp"
+#include "c.hpp"
+#include <cassert>
+
+int main(int argc, char**argv)
+{
+ assert(c_linktype() == "static");
+ assert(a_linktype() == "static");
+}
+

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/CMakeLists.txt
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/CMakeLists.txt (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/CMakeLists.txt 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -1,6 +1,18 @@
 boost_library_subproject(
   D
 )
-boost_library(boost_d lib.cpp)
 
+boost_library(d
+ lib.cpp
+ COMPILE_FLAGS -DD_COMPILE_FLAGS
+ STICKY_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -DD_STICKY_COMPILE_FLAGS"
+ STATIC_COMPILE_FLAGS -DLINKTYPE=static
+ STICKY_STATIC_COMPILE_FLAGS -DD_STICKY_STATIC_COMPILE_FLAGS
+ SHARED_COMPILE_FLAGS -DLINKTYPE=shared
+ STICKY_SHARED_COMPILE_FLAGS -DD_STICKY_SHARED_COMPILE_FLAGS
+ DEPENDS b c
+)
+
+boost_test_run(test_shared DEPENDS b-shared c-shared d-shared)
+boost_test_run(test_static DEPENDS b-static c-static d-static)
 

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/ashared_cstatic.cpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/ashared_cstatic.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,24 @@
+#ifndef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+#ifndef A_STICKY_SHARED_COMPILE_FLAGS
+#error A_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_STATIC_COMPILE_FLAGS
+#error C_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#include "a.hpp"
+#include "c.hpp"
+#include <cassert>
+
+int main(int argc, char**argv)
+{
+ assert(a_linktype() == "shared");
+ assert(c_linktype() == "static");
+}
+

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/astatic_cshared.cpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/astatic_cshared.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,34 @@
+#ifndef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+
+#ifndef A_STICKY_STATIC_COMPILE_FLAGS
+#error A_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#ifdef B_STICKY_COMPILE_FLAGS
+#error B_STICKY_COMPILE_FLAGS
+#endif
+
+#ifdef B_STICKY_SHARED_COMPILE_FLAGS
+#error B_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+
+#ifndef C_STICKY_SHARED_COMPILE_FLAGS
+#error C_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#include "a.hpp"
+#include "c.hpp"
+#include <cassert>
+
+int main(int argc, char**argv)
+{
+ assert(a_linktype() == "static");
+ assert(c_linktype() == "shared");
+}
+

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/c.hpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/c.hpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,10 @@
+#include <string>
+
+std::string c_linktype();
+
+
+
+
+
+
+

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/d.hpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/d.hpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,10 @@
+#include <string>
+
+std::string d_linktype();
+
+
+
+
+
+
+

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/lib.cpp
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/lib.cpp (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/lib.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -1,9 +1,38 @@
 #include <iostream>
 #include <string>
+#include <boost/preprocessor/stringize.hpp>
 
-std::string d() { return "d"; }
-
+#include "b.hpp"
+#include "c.hpp"
 
+// we DO see these
+#ifndef B_STICKY_COMPILE_FLAGS
+#error B_STICKY_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+#ifndef D_COMPILE_FLAGS
+#error D_COMPILE_FLAGS
+#endif
+#ifndef D_STICKY_COMPILE_FLAGS
+#error D_STICKY_COMPILE_FLAGS
+#endif
+
+// we DONT see these
+#ifdef A_COMPILE_FLAGS
+#error A_COMPILE_FLAGS
+#endif
+#ifdef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+#ifdef B_COMPILE_FLAGS
+#error B_COMPILE_FLAGS
+#endif
+#ifdef C_COMPILE_FLAGS
+#error C_COMPILE_FLAGS
+#endif
 
 
+std::string d_linktype() { b_linktype(); c_linktype(); return BOOST_PP_STRINGIZE(LINKTYPE); }
 

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/test_shared.cpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/test_shared.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,49 @@
+// do NOT see
+#ifdef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+#ifdef A_STICKY_SHARED_COMPILE_FLAGS
+#error A_STICKY_SHARED_COMPILE_FLAGS
+#endif
+#ifdef B_STICKY_STATIC_COMPILE_FLAGS
+#error B_STICKY_STATIC_COMPILE_FLAGS
+#endif
+#ifdef C_STICKY_STATIC_COMPILE_FLAGS
+#error C_STICKY_STATIC_COMPILE_FLAGS
+#endif
+#ifdef D_STICKY_STATIC_COMPILE_FLAGS
+#error D_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+// DO see
+#ifndef B_STICKY_COMPILE_FLAGS
+#error B_STICKY_COMPILE_FLAGS
+#endif
+#ifndef B_STICKY_SHARED_COMPILE_FLAGS
+#error B_STICKY_SHARED_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_SHARED_COMPILE_FLAGS
+#error C_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#ifndef D_STICKY_COMPILE_FLAGS
+#error D_STICKY_COMPILE_FLAGS
+#endif
+#ifndef D_STICKY_SHARED_COMPILE_FLAGS
+#error D_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#include "b.hpp"
+#include "c.hpp"
+#include "d.hpp"
+#include <cassert>
+int main(int argc, char**argv)
+{
+ assert(b_linktype() == "shared");
+ assert(c_linktype() == "shared");
+ assert(d_linktype() == "shared");
+}
+

Added: sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/test_static.cpp
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/testing/d/test_static.cpp 2007-05-17 13:07:36 EDT (Thu, 17 May 2007)
@@ -0,0 +1,50 @@
+// do NOT see
+#ifdef A_STICKY_COMPILE_FLAGS
+#error A_STICKY_COMPILE_FLAGS
+#endif
+#ifdef A_STICKY_SHARED_COMPILE_FLAGS
+#error A_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+#ifdef B_STICKY_SHARED_COMPILE_FLAGS
+#error B_STICKY_SHARED_COMPILE_FLAGS
+#endif
+#ifdef C_STICKY_SHARED_COMPILE_FLAGS
+#error C_STICKY_SHARED_COMPILE_FLAGS
+#endif
+#ifdef D_STICKY_SHARED_COMPILE_FLAGS
+#error D_STICKY_SHARED_COMPILE_FLAGS
+#endif
+
+// DO see
+#ifndef B_STICKY_COMPILE_FLAGS
+#error B_STICKY_COMPILE_FLAGS
+#endif
+#ifndef B_STICKY_STATIC_COMPILE_FLAGS
+#error B_STICKY_STATIC_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_COMPILE_FLAGS
+#error C_STICKY_COMPILE_FLAGS
+#endif
+#ifndef C_STICKY_STATIC_COMPILE_FLAGS
+#error C_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#ifndef D_STICKY_COMPILE_FLAGS
+#error D_STICKY_COMPILE_FLAGS
+#endif
+#ifndef D_STICKY_STATIC_COMPILE_FLAGS
+#error D_STICKY_STATIC_COMPILE_FLAGS
+#endif
+
+#include "b.hpp"
+#include "c.hpp"
+#include "d.hpp"
+#include <cassert>
+int main(int argc, char**argv)
+{
+ assert(b_linktype() == "static");
+ assert(c_linktype() == "static");
+ assert(d_linktype() == "static");
+}
+


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