Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2007-06-13 18:30:09


Author: dgregor
Date: 2007-06-13 18:30:05 EDT (Wed, 13 Jun 2007)
New Revision: 7036
URL: http://svn.boost.org/trac/boost/changeset/7036

Log:
Fix CMake's handling of /MD and /MDd.

Text files modified:
   sandbox-branches/boost-cmake/boost_1_34_0/tools/build/CMake/BoostConfig.cmake | 16 ++++++++++------
   1 files changed, 10 insertions(+), 6 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-13 18:30:05 EDT (Wed, 13 Jun 2007)
@@ -109,18 +109,22 @@
   set(MULTI_THREADED_LINK_LIBS pthread rt)
 endif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
 
-# Static and dynamic runtime linking options
-#if(MSVC)
-# set(STATIC_RUNTIME_COMPILE_FLAGS "/MT")
-# set(DYNAMIC_RUNTIME_COMPILE_FLAGS "/MD")
-#endif(MSVC)
-
 # Setup DEBUG_COMPILE_FLAGS, RELEASE_COMPILE_FLAGS, DEBUG_LINK_FLAGS and
 # and RELEASE_LINK_FLAGS based on the CMake equivalents
 if(CMAKE_CXX_FLAGS_DEBUG)
+ if(MSVC)
+ # Eliminate the /MDd flag; we'll add it back when we need it
+ string(REPLACE "/MDd" "" CMAKE_CXX_FLAGS_DEBUG
+ "${CMAKE_CXX_FLAGS_DEBUG}")
+ endif(MSVC)
   set(DEBUG_COMPILE_FLAGS "${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING "Compilation flags for debug libraries")
 endif(CMAKE_CXX_FLAGS_DEBUG)
 if(CMAKE_CXX_FLAGS_RELEASE)
+ if(MSVC)
+ # Eliminate the /MD flag; we'll add it back when we need it
+ string(REPLACE "/MD" "" CMAKE_CXX_FLAGS_RELEASE
+ "${CMAKE_CXX_FLAGS_RELEASE}")
+ endif(MSVC)
   set(RELEASE_COMPILE_FLAGS "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "Compilation flags for release libraries")
 endif(CMAKE_CXX_FLAGS_RELEASE)
 if(CMAKE_SHARED_LINKER_FLAGS_DEBUG)


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