I\'m just trying to build a cmake project in debug-mode to enable asserts. I tried the following versions:
cmake -D CMAKE_BUILD_TYPE:STRING=Debug -L ../../ cmake
This works for me:
IF(${CMAKE_BUILD_TYPE} MATCHES Debug) ... ENDIF()