[CMake] Detect build type

Filipe Sousa natros at gmail.com
Wed Apr 20 06:33:32 EDT 2005


Is there a better way to know if CMake is generating files for debug or 
release builds than using CMAKE_BUILD_TYPE?

I've been using this:
IF(CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]")
  SET(CMAKE_DEBUG_MODE 1)
ENDIF(CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]")

IF(CMAKE_BUILD_TYPE MATCHES "[Re][Ee][Ll][Ee][Aa][Ss][Ee]")
  SET(CMAKE_RELEASE_MODE 1)
ENDIF(CMAKE_BUILD_TYPE MATCHES "[Re][Ee][Ll][Ee][Aa][Ss][Ee]")


Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20050420/29688688/attachment-0001.pgp


More information about the CMake mailing list