[CMake] Selecting runtime library on Visual Studio projects

Jan Woetzel jw at mip.informatik.uni-kiel.de
Thu Jul 13 08:40:40 EDT 2006


Sagnes, Frederic wrote:

>How can I switch the default libraries (/MD and MDd switches) to the static ones (/MT and /MTd switches).
>  
>
(1) The easy way is start CMakeSetup.exe or ccmake
and edit the flags by hand interactively.



(2) Inti the cache one time with different flags. See SET(... CACHE 
..FORCE ...) command.
E.g.
    SET(CMAKE_CXX_FLAGS_DEBUG
      "${CMAKE_CXX_FLAGS_DEBUG} /wd4100 /wd4127 /wd4189 /wd4512 /wd4702"
      CACHE STRING "Debug builds CMAKE CXX flags " FORCE )

My suggestion is (1).

Jan.

-- 

  Dipl.-Ing. Jan Woetzel
--------------------------------------------------
  University of Kiel
  Institute of Computer Science and Applied Mathematics
  Hermann-Rodewald-Str. 3 [room 310]
  24098 Kiel/Germany
--------------------------------------------------
  Phone +49-431-880-4477
  Fax   +49-431-880-4054
  Mob.  +49-179-2937346
--------------------------------------------------
  Url   www.mip.informatik.uni-kiel.de/~jw
  Email jw at mip.informatik.uni-kiel.de



More information about the CMake mailing list