[CMake] Re: custom build

Won-Ki Jeong graphor at gmail.com
Thu May 24 12:30:06 EDT 2007


I tried that, but it does not seem to work. For example, I tried to
set a different build flag as follows:

IF(CMAKE_BUILD_TYPE MATCHES "Debug")
  SET(buildFlag ${buildFlag} -g)
ELSE(CMAKE_BUILD_TYPE MATCHES "Debug")
  SET(buildFlag ${buildFlag} -O)
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")

but buildFlag is always set to "-O" no matter which build type I
select. Is it because build type is set after CMake creates project
file (for Visual Studio)? Is there any trick to do this?


More information about the CMake mailing list