diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson1/CMakeLists.txt new file mode 100644 index 000000000..e7151538b --- /dev/null +++ b/trunk/paradiseo-mo/tutorial/Lesson1/CMakeLists.txt @@ -0,0 +1,18 @@ + +###################################################################################### +### 0) Need lesson1 directory +###################################################################################### + +SET(TUTORIAL_LESSON1_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### + + + +###################################################################################### +### 1) Where must cmake go now ? +###################################################################################### + +SUBDIRS(src) + +###################################################################################### diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson2/CMakeLists.txt new file mode 100644 index 000000000..205da75f4 --- /dev/null +++ b/trunk/paradiseo-mo/tutorial/Lesson2/CMakeLists.txt @@ -0,0 +1,18 @@ + +###################################################################################### +### 0) Need lesson2 directory +###################################################################################### + +SET(TUTORIAL_LESSON2_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### + + + +###################################################################################### +### 1) Where must cmake go now ? +###################################################################################### + +SUBDIRS(src) + +###################################################################################### diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/Makefile.am b/trunk/paradiseo-mo/tutorial/Lesson2/Makefile.am deleted file mode 100644 index af437a64d..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson2/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = src diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/src/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson2/src/CMakeLists.txt new file mode 100644 index 000000000..02244e191 --- /dev/null +++ b/trunk/paradiseo-mo/tutorial/Lesson2/src/CMakeLists.txt @@ -0,0 +1,128 @@ + +###################################################################################### +### 0) Need tsp directory +###################################################################################### + +SET(TSP_EXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tsp) + +###################################################################################### + + + +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SRC_DIR}) +INCLUDE_DIRECTORIES(${EO_SRC_DIR}/utils) +INCLUDE_DIRECTORIES(${TSP_EXAMPLE_DIR}) +###################################################################################### + + + +###################################################################################### +### 2) Specify where CMake can find the libraries (mandatory: before 3) ) +###################################################################################### + +# --> UNIX +IF(UNIX) + LINK_DIRECTORIES(${EO_SRC_DIR} ${EO_SRC_DIR}/utils ${TSP_EXAMPLE_DIR}/build) + +# --> WIN +ELSEIF(WIN32) + # "CMAKE_BUILD_TYPE" supposed to be given on the command line, default=Debug + IF (NOT DEFINED CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE Debug) + ENDIF (NOT DEFINED CMAKE_BUILD_TYPE) + + IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LINK_DIRECTORIES(${TSP_EXAMPLE_DIR}\\build\\debug) + LINK_DIRECTORIES(${EO_LIB_DIR}\\debug) + ELSEIF(CMAKE_BUILD_TYPE STREQUAL Release) + LINK_DIRECTORIES(${TSP_EXAMPLE_DIR}\\build\\release) + LINK_DIRECTORIES(${EO_LIB_DIR}\\release) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + +ENDIF(UNIX) + +###################################################################################### + + + +###################################################################################### +### 3) Define your target(s): just an executable here +###################################################################################### + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(tabu_search tabu_search.cpp) + +ADD_DEPENDENCIES(tabu_search tsp) + +SET(EXECUTABLE_OUTPUT_PATH ${TUTORIAL_LESSON2_DIR}/build) +###################################################################################### + + + +###################################################################################### +### 4) Optionnal: define your target(s)'s version: no effect for windows +###################################################################################### + +SET(TABUSEARCH_VERSION "1.0.beta") +SET_TARGET_PROPERTIES(tabu_search PROPERTIES VERSION "${TABUSEARCH_VERSION}") +###################################################################################### + + + +###################################################################################### +### 5) Link the librairies for your target(s) +###################################################################################### + +# --> UNIX +IF(UNIX) + TARGET_LINK_LIBRARIES(tabu_search tsp) + TARGET_LINK_LIBRARIES(tabu_search eo) + TARGET_LINK_LIBRARIES(tabu_search eoutils) + +# --> WIN +ELSEIF(WIN32) + # "CMAKE_BUILD_TYPE" supposed to be given on the command line, default=Debug + IF (NOT DEFINED CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE Debug) + ENDIF (NOT DEFINED CMAKE_BUILD_TYPE) + + IF (CMAKE_BUILD_TYPE STREQUAL Debug) + TARGET_LINK_LIBRARIES(tabu_search tspd) + TARGET_LINK_LIBRARIES(tabu_search eod) + TARGET_LINK_LIBRARIES(tabu_search eoutilsd) + ELSEIF(CMAKE_BUILD_TYPE STREQUAL Release) + TARGET_LINK_LIBRARIES(tabu_search tsp) + TARGET_LINK_LIBRARIES(tabu_search eo) + TARGET_LINK_LIBRARIES(tabu_search eoutils) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + +ENDIF(UNIX) +###################################################################################### + + + +###################################################################################### +### 6) Windows advanced config - especially for Microsoft Visual Studio 8 +###################################################################################### + + IF(CMAKE_CXX_COMPILER MATCHES cl) + IF(NOT WITH_SHARED_LIBS) + IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005") + SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy") + SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /Z7 /Od") + SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2") + SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") + + ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005") + ENDIF(NOT WITH_SHARED_LIBS) + ENDIF(CMAKE_CXX_COMPILER MATCHES cl) +###################################################################################### + + + diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/src/Makefile.am b/trunk/paradiseo-mo/tutorial/Lesson2/src/Makefile.am deleted file mode 100644 index b3e0e30a2..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson2/src/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -INCLUDES = -I${EO_DIR}/src/ -I ../../../src/ -I ../../examples/tsp/src/ - -AM_CXXFLAGS =\ - -Wall\ - -Werror\ - -Wno-deprecated\ - -ansi\ - -pedantic - -bin_PROGRAMS = tabu_search - -############################## -tabu_search_SOURCES = tabu_search.cpp - -tabu_search_LDFLAGS = - -tabu_search_LDADD = \ - ${EO_DIR}/src/libeo.a\ - ${EO_DIR}/src/utils/libeoutils.a\ - ../../examples/tsp/src/libtsp.a diff --git a/trunk/paradiseo-mo/tutorial/Lesson2/src/tabu_search b/trunk/paradiseo-mo/tutorial/Lesson2/src/tabu_search deleted file mode 100755 index b242f50c5..000000000 Binary files a/trunk/paradiseo-mo/tutorial/Lesson2/src/tabu_search and /dev/null differ diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson3/CMakeLists.txt new file mode 100644 index 000000000..5aac4afeb --- /dev/null +++ b/trunk/paradiseo-mo/tutorial/Lesson3/CMakeLists.txt @@ -0,0 +1,19 @@ + + +###################################################################################### +### 0) Need lesson3 directory +###################################################################################### + +SET(TUTORIAL_LESSON3_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +###################################################################################### + + + +###################################################################################### +### 1) Where must cmake go now ? +###################################################################################### + +SUBDIRS(src) + +###################################################################################### \ No newline at end of file diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/Makefile.am b/trunk/paradiseo-mo/tutorial/Lesson3/Makefile.am deleted file mode 100644 index f26892443..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson3/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = src - diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/src/CMakeLists.txt b/trunk/paradiseo-mo/tutorial/Lesson3/src/CMakeLists.txt new file mode 100644 index 000000000..dd023b8df --- /dev/null +++ b/trunk/paradiseo-mo/tutorial/Lesson3/src/CMakeLists.txt @@ -0,0 +1,128 @@ + +###################################################################################### +### 0) Need tsp directory +###################################################################################### + +SET(TSP_EXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tsp) + +###################################################################################### + + + +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SRC_DIR}) +INCLUDE_DIRECTORIES(${EO_SRC_DIR}/utils) +INCLUDE_DIRECTORIES(${TSP_EXAMPLE_DIR}) +###################################################################################### + + + +###################################################################################### +### 2) Specify where CMake can find the libraries (mandatory: before 3) ) +###################################################################################### + +# --> UNIX +IF(UNIX) + LINK_DIRECTORIES(${EO_SRC_DIR} ${EO_SRC_DIR}/utils ${TSP_EXAMPLE_DIR}/build) + +# --> WIN +ELSEIF(WIN32) + # "CMAKE_BUILD_TYPE" supposed to be given on the command line, default=Debug + IF (NOT DEFINED CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE Debug) + ENDIF (NOT DEFINED CMAKE_BUILD_TYPE) + + IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LINK_DIRECTORIES(${TSP_EXAMPLE_DIR}\\build\\debug) + LINK_DIRECTORIES(${EO_LIB_DIR}\\debug) + ELSEIF(CMAKE_BUILD_TYPE STREQUAL Release) + LINK_DIRECTORIES(${TSP_EXAMPLE_DIR}\\build\\release) + LINK_DIRECTORIES(${EO_LIB_DIR}\\release) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + +ENDIF(UNIX) + +###################################################################################### + + + +###################################################################################### +### 3) Define your target(s): just an executable here +###################################################################################### + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(simulated_annealing simulated_annealing.cpp) + +ADD_DEPENDENCIES(simulated_annealing tsp) + +SET(EXECUTABLE_OUTPUT_PATH ${TUTORIAL_LESSON3_DIR}/build) +###################################################################################### + + + +###################################################################################### +### 4) Optionnal: define your target(s)'s version: no effect for windows +###################################################################################### + +SET(SIMULATEDANNEALING_VERSION "1.0.beta") +SET_TARGET_PROPERTIES(simulated_annealing PROPERTIES VERSION "${SIMULATEDANNEALING_VERSION}") +###################################################################################### + + + +###################################################################################### +### 5) Link the librairies for your target(s) +###################################################################################### + +# --> UNIX +IF(UNIX) + TARGET_LINK_LIBRARIES(tabu_search tsp) + TARGET_LINK_LIBRARIES(tabu_search eo) + TARGET_LINK_LIBRARIES(tabu_search eoutils) + +# --> WIN +ELSEIF(WIN32) + # "CMAKE_BUILD_TYPE" supposed to be given on the command line, default=Debug + IF (NOT DEFINED CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE Debug) + ENDIF (NOT DEFINED CMAKE_BUILD_TYPE) + + IF (CMAKE_BUILD_TYPE STREQUAL Debug) + TARGET_LINK_LIBRARIES(simulated_annealing tspd) + TARGET_LINK_LIBRARIES(simulated_annealing eod) + TARGET_LINK_LIBRARIES(simulated_annealing eoutilsd) + ELSEIF(CMAKE_BUILD_TYPE STREQUAL Release) + TARGET_LINK_LIBRARIES(simulated_annealing tsp) + TARGET_LINK_LIBRARIES(simulated_annealing eo) + TARGET_LINK_LIBRARIES(simulated_annealing eoutils) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) + +ENDIF(UNIX) +###################################################################################### + + + +###################################################################################### +### 6) Windows advanced config - especially for Microsoft Visual Studio 8 +###################################################################################### + + IF(CMAKE_CXX_COMPILER MATCHES cl) + IF(NOT WITH_SHARED_LIBS) + IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005") + SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy") + SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /Z7 /Od") + SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2") + SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE") + + ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005") + ENDIF(NOT WITH_SHARED_LIBS) + ENDIF(CMAKE_CXX_COMPILER MATCHES cl) +###################################################################################### + + + diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/src/Makefile.am b/trunk/paradiseo-mo/tutorial/Lesson3/src/Makefile.am deleted file mode 100644 index 2b853950c..000000000 --- a/trunk/paradiseo-mo/tutorial/Lesson3/src/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -INCLUDES = -I${EO_DIR}/src/ -I ../../../src/ -I ../../examples/tsp/src/ - -AM_CXXFLAGS =\ - -Wall\ - -Werror\ - -Wno-deprecated\ - -ansi\ - -pedantic - -bin_PROGRAMS = simulated_annealing - -############################## -simulated_annealing_SOURCES = simulated_annealing.cpp - -simulated_annealing_LDFLAGS = - -simulated_annealing_LDADD = \ - ${EO_DIR}/src/libeo.a\ - ${EO_DIR}/src/utils/libeoutils.a\ - ../../examples/tsp/src/libtsp.a diff --git a/trunk/paradiseo-mo/tutorial/Lesson3/src/simulated_annealing b/trunk/paradiseo-mo/tutorial/Lesson3/src/simulated_annealing deleted file mode 100755 index 0b966d049..000000000 Binary files a/trunk/paradiseo-mo/tutorial/Lesson3/src/simulated_annealing and /dev/null differ