Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2007-06-25 22:43:20


Author: dgregor
Date: 2007-06-25 22:43:19 EDT (Mon, 25 Jun 2007)
New Revision: 7159
URL: http://svn.boost.org/trac/boost/changeset/7159

Log:
- Clear out all of the CMake-based flags, for real
- For makefile targets, use CMAKE_BUILD_TYPE to determine whether to
  build in debug or release mode

Text files modified:
   sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake | 21 +++++++++++++--------
   sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostCore.cmake | 16 ++++++++++++++++
   2 files changed, 29 insertions(+), 8 deletions(-)

Modified: sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake 2007-06-25 22:43:19 EDT (Mon, 25 Jun 2007)
@@ -120,12 +120,17 @@
   endif (NOT CMAKE_BUILD_TYPE)
 endif(CMAKE_CONFIGURATION_TYPES)
 
-# For project file generators that have multiple configurations,
-# clear out the built-in C++ compiler and link flags for each of the
+# Clear out the built-in C++ compiler and link flags for each of the
 # configurations.
-foreach(CONFIG ${CMAKE_CONFIGURATION_TYPES})
- string(TOUPPER ${CONFIG} UCONFIG)
- set(CMAKE_CXX_FLAGS_${UCONFIG} "" CACHE INTERNAL "Unused by Boost")
- set(CMAKE_SHARED_LINKER_FLAGS_${UCONFIG} "" CACHE INTERNAL "Unused by Boost")
- set(CMAKE_MODULE_LINKER_FLAGS_${UCONFIG} "" CACHE INTERNAL "Unused by Boost")
-endforeach(CONFIG ${CMAKE_CONFIGURATION_TYPES})
+set(CMAKE_CXX_FLAGS_DEBUG "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_CXX_FLAGS_RELEASE "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_CXX_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused by Boost")
+set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused by Boost")

Modified: sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostCore.cmake
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostCore.cmake (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostCore.cmake 2007-06-25 22:43:19 EDT (Mon, 25 Jun 2007)
@@ -813,6 +813,22 @@
     endforeach (FEATURE ${FEATURESET})
 
     if (NOT THIS_EXE_REQUESTED_FROM_SET)
+ # If this feature set decides between Release and Debug, the
+ # build type might tell us which one to choose.
+ if (FEATURESET_STR STREQUAL "RELEASE:DEBUG")
+ if (CMAKE_BUILD_TYPE STREQUAL "Release")
+ # Make this feature part of the variant
+ list(APPEND THIS_EXE_VARIANT RELEASE)
+ set(THIS_EXE_REQUESTED_FROM_SET TRUE)
+ elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ # Make this feature part of the variant
+ list(APPEND THIS_EXE_VARIANT DEBUG)
+ set(THIS_EXE_REQUESTED_FROM_SET TRUE)
+ endif (CMAKE_BUILD_TYPE STREQUAL "Release")
+ endif (FEATURESET_STR STREQUAL "RELEASE:DEBUG")
+ endif (NOT THIS_EXE_REQUESTED_FROM_SET)
+
+ if (NOT THIS_EXE_REQUESTED_FROM_SET)
       # The caller did not specify which feature value to use from
       # this set, so find the first feature value that actually works.
       set(THIS_EXE_FOUND_FEATURE FALSE)


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