use CMAKE_BUILD_TYPE to differ between debug and release. (cherry picked from commit 212268933438f3340e5c95905a2845d30cab1dd7)

This commit is contained in:
Sebastian Sauer 2009-04-27 17:06:37 +02:00 committed by unknown
parent 8f15f6713b
commit 115891d376

View file

@ -360,23 +360,21 @@ if (WIN32)
endif(WIN32)
if (MSVC_IDE)
if (test_debug)
set(test_debug TRUE CACHE TYPE STRING FORCE)
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(IDE_BIN Debug/ )
message(STATUS)
message(STATUS "Using Visual Studio: test programs will only work with the 'Debug' configuration!")
message(STATUS "To run the tests with the 'Release' configuration use -Dtest_debug=0")
message(STATUS "Visual Studio: test programs will only work with 'Debug' configuration!")
message(STATUS "To run tests with 'Release' configuration use -DCMAKE_BUILD_TYPE=Release")
message(STATUS "Add '..\\..\\test\\data' to the command line option of the test programs")
message(STATUS)
else (test_debug)
set(test_debug FALSE CACHE TYPE STRING FORCE)
else(CMAKE_BUILD_TYPE MATCHES Debug)
set(IDE_BIN Release/)
message(STATUS)
message(STATUS "Using Visual Studio: test programs will only work with the 'Release' configuration!")
message(STATUS "To run the tests with the 'Debug' configuration use -Dtest_debug=1")
message(STATUS "Visual Studio: test programs will only work with 'Release' configuration!")
message(STATUS "To run tests with 'Debug' configuration use -DCMAKE_BUILD_TYPE=Debug")
message(STATUS "Add '..\\..\\test\\data' to the command line option of the test programs")
message(STATUS)
endif (test_debug)
endif(CMAKE_BUILD_TYPE MATCHES Debug)
set (TEST_PATH_FORCE FORCE)
FILE(REMOVE ${CMAKE_BINARY_DIR}/data/dbus-1/services)
endif (MSVC_IDE)