Enrico Franchi wrote:
On Feb 28, 2009, at 10:48 AM, Kermit Mei wrote:
Hello, is there any elegant way to add "-DDEBUG" to the complier flag
just in command line?
IF(${CMAKE_BUILD_TYPE} STREQUAL Debug)
MESSAGE("Adding Debug flag...")
ADD_DEFINITIONS(-DDEBUG)
ENDIF(${CMAKE_BUIL
Enrico Franchi wrote:
On Feb 28, 2009, at 10:48 AM, Kermit Mei wrote:
Hello, is there any elegant way to add "-DDEBUG" to the complier flag
just in command line?
IF(${CMAKE_BUILD_TYPE} STREQUAL Debug)
MESSAGE("Adding Debug flag...")
ADD_DEFINITIONS(-DDEBUG)
ENDIF(${CMAKE_BUILD_TYPE} STREQUAL
Hello, is there any elegant way to add "-DDEBUG" to the complier flag
just in command line?
I don't want to modify my CMakeLists.txt file, I just want to build it when
I run :
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ..
I tried the following command in CMakeLists.txt:
IF(CMAK