I think you're looking exactly for this: http://www.vtk.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F It's very good use-case, but I wonder why it's called MSVC-specific.
On Thu, Apr 28, 2011 at 7:23 PM, Tim Gallagher <[email protected]>wrote: > We do this: > > if(NOT CMAKE_Fortran_FLAGS_RELEASE) > set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -xhost" CACHE STRING "" FORCE) > endif() > > In other words, if the flags haven't been set yet (initial start up), set > them to what we want. If they have been set (either changed by the user, or > specified on the cmake/ccmake line with -D), leave them alone. > > Tim > > ----- Original Message ----- > From: "Ilja Golshtein" <[email protected]> > To: [email protected] > Sent: Thursday, April 28, 2011 9:03:43 AM > Subject: [CMake] Change variable default > > Hello! > > There are some CMAKE variables with default values. For example > CMAKE_CXX_FLAGS_DEBUG default value is '-g'. > How is it possible to make it '-g -Wall'? > > What I don't want to have: User choice overwritten. > > What I want to have: Modified a variable cmake-time default. It must be > possible to change the variable via cmake -D or ccmake GUI. > > Thanks. > > -- > Best regards, > Ilja Golshtein. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
