From: Sebastian Sauer Date: Mon, 27 Apr 2009 15:06:37 +0000 (+0200) Subject: use CMAKE_BUILD_TYPE to differ between debug and release. (cherry picked from commit... X-Git-Tag: dbus-1.3.1~244 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=115891d376f691da804f9c4f57fda472428060fe;p=platform%2Fupstream%2Fdbus.git use CMAKE_BUILD_TYPE to differ between debug and release. (cherry picked from commit 212268933438f3340e5c95905a2845d30cab1dd7) --- diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index d63c40b..f79295c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -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)