[CMake] multithreaded runtime libraries with VS7

Marco Petrone m.petrone at cineca.it
Fri Jan 28 04:39:32 EST 2005


I see, thanks for your reply. Indeed, testing with a very small project 
I couldn't reproduce the problem... I'll do some more investigations to 
understand why I had the /ML in my VS7 project... I can only suppose for 
some reason the FLAGS variable gets cleaned somewhere in my big project 
and the /ML is a default setting of VS7, but actually I don't have 
enough experience with VS7 to be sure about that...
I hope you won't comply if I will bother a bit more on the mailing list 
to get rid of problems with VS7... I'm trying to use CMake to compile 
also some libraries (wxWindows and XercesC) to be distributed with our 
software for a fast setup. I thought to use it to easily get rid of 
different compilers/environments, but I'm having these linking problems 
with VS7 :-(   while VS6 and Linux (both make and Kdevelop) are working 
well...

Anyway, is it going to be available (in CMake 2.2) an improvement of 
ADD_DEFINITIONS() to specify an "optimized" modifier as it is for 
LINK_LIBRARIES() ?

my best regards,

Marco

William A. Hoffman wrote:

>Actually, the VS7 2003 generator uses multithread by default.
>That can be changed if you set CMAKE_CXX_FLAGS.  But the default
>has never been /MT.   
>
>Here are the defaults:
>  IF(CMAKE_USING_VC_FREE_TOOLS)
>    MESSAGE(STATUS "Using FREE VC TOOLS, NO DEBUG available")
>    SET(CMAKE_BUILD_TYPE_INIT Release)
>    SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /GX /GR")
>    SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/MTd /Zi /Od /GZ")
>    SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MT /O1")
>    SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MT /O2")
>    SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2")
>    SET (CMAKE_C_FLAGS_INIT "/W3 /Zm1000 /GX /GR")
>    SET (CMAKE_C_FLAGS_DEBUG_INIT "/MTd /Zi /Od /GZ")
>    SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MT /O1")
>    SET (CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2")
>    SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2")
>  ELSE(CMAKE_USING_VC_FREE_TOOLS)
>    SET(CMAKE_BUILD_TYPE_INIT Debug)
>    SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /GX /GR")
>    SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ")
>    SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /D NDEBUG")
>    SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /D NDEBUG")
>    SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /D NDEBUG")
>    SET (CMAKE_C_FLAGS_INIT "/W3 /Zm1000")
>    SET (CMAKE_C_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ")
>    SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /D NDEBUG")
>    SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /D NDEBUG")
>    SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /D NDEBUG")
>
>There is no /ML or /MLd to specify single threaded libraries.
>
>
>-Bill
>
>  
>



More information about the CMake mailing list