From 294e2164afaa32b40f0c42d4dabb852b915cb6b9 Mon Sep 17 00:00:00 2001 From: legrand Date: Fri, 29 Jun 2007 15:11:57 +0000 Subject: [PATCH] add cmake build type debug/release restriction git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@479 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-mo/tutorial/Lesson1/src/CMakeLists.txt | 2 ++ trunk/paradiseo-mo/tutorial/Lesson2/src/CMakeLists.txt | 4 +++- trunk/paradiseo-mo/tutorial/Lesson3/src/CMakeLists.txt | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/src/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson1/src/CMakeLists.txt index c4612bc94..689edd330 100644 --- a/trunk/paradiseo-mo/tutorial/Lesson1/src/CMakeLists.txt +++ b/trunk/paradiseo-mo/tutorial/Lesson1/src/CMakeLists.txt @@ -90,6 +90,8 @@ ELSEIF(WIN32) TARGET_LINK_LIBRARIES(hill_climbing tsp) TARGET_LINK_LIBRARIES(hill_climbing eo) TARGET_LINK_LIBRARIES(hill_climbing eoutils) + ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) + MESSAGE(FATAL_ERROR " Cmake build type can only be \"Debug\" or \"Release\" ") ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ENDIF(UNIX) diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/src/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson2/src/CMakeLists.txt index 535fc31b5..dee048c1f 100644 --- a/trunk/paradiseo-mo/tutorial/Lesson2/src/CMakeLists.txt +++ b/trunk/paradiseo-mo/tutorial/Lesson2/src/CMakeLists.txt @@ -89,7 +89,9 @@ ELSEIF(WIN32) ELSEIF(CMAKE_BUILD_TYPE STREQUAL Release) TARGET_LINK_LIBRARIES(tabu_search tsp) TARGET_LINK_LIBRARIES(tabu_search eo) - TARGET_LINK_LIBRARIES(tabu_search eoutils) + TARGET_LINK_LIBRARIES(tabu_search eoutils) + ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) + MESSAGE(FATAL_ERROR " Cmake build type can only be \"Debug\" or \"Release\" ") ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ENDIF(UNIX) diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/src/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson3/src/CMakeLists.txt index 6d173c47a..9a1e23689 100644 --- a/trunk/paradiseo-mo/tutorial/Lesson3/src/CMakeLists.txt +++ b/trunk/paradiseo-mo/tutorial/Lesson3/src/CMakeLists.txt @@ -89,7 +89,9 @@ ELSEIF(WIN32) ELSEIF(CMAKE_BUILD_TYPE STREQUAL Release) TARGET_LINK_LIBRARIES(simulated_annealing tsp) TARGET_LINK_LIBRARIES(simulated_annealing eo) - TARGET_LINK_LIBRARIES(simulated_annealing eoutils) + TARGET_LINK_LIBRARIES(simulated_annealing eoutils) + ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) + MESSAGE(FATAL_ERROR " Cmake build type can only be \"Debug\" or \"Release\" ") ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ENDIF(UNIX)