diff --git a/branches/cmakemodif/paradiseo-moeo/tutorial/CMakeLists.txt b/branches/cmakemodif/paradiseo-moeo/tutorial/CMakeLists.txt index c0e9c67b4..bb6148a96 100644 --- a/branches/cmakemodif/paradiseo-moeo/tutorial/CMakeLists.txt +++ b/branches/cmakemodif/paradiseo-moeo/tutorial/CMakeLists.txt @@ -8,11 +8,196 @@ SET(FLOWSHOP_BINARY_DIR ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop) ###################################################################################### - ###################################################################################### -### 2) Where must cmake go now ? +### 2) How to manage copy of benchs ? ###################################################################################### -SUBDIRS(examples Lesson1 Lesson2 Lesson3) +IF(ENABLE_CMAKE_COPY) + SET(BENCH_LIST + 020_05_01.txt + 020_05_02.txt + 020_10_01.txt + 020_10_02.txt + 020_20_01.txt + 050_05_01.txt + 050_10_01.txt + 050_20_01.txt + 100_05_01.txt + 100_10_01.txt + 100_20_01.txt + 200_10_01.txt + README + ) + + FOREACH (bench ${BENCH_LIST}) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/${bench} + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/${bench} + ) + ENDFOREACH (bench) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson1/Sch1.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson2/FlowShopEA.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson3/FlowShopEA2.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param + ) +ENDIF(ENABLE_CMAKE_COPY) ###################################################################################### +### 3) Where must cmake go now ? +###################################################################################### + +#SUBDIRS(examples Lesson1 Lesson2 Lesson3) +ADD_SUBDIRECTORY(examples) +ADD_SUBDIRECTORY(Lesson1) +ADD_SUBDIRECTORY(Lesson2) +ADD_SUBDIRECTORY(Lesson3) + + +###################################################################################### + + +###################################################################################### +### 4) Target to copy benchs and parameters file +###################################################################################### + +SET(BENCH_LIST + 020_05_01.txt + 020_05_02.txt + 020_10_01.txt + 020_10_02.txt + 020_20_01.txt + 050_05_01.txt + 050_10_01.txt + 050_20_01.txt + 100_05_01.txt + 100_10_01.txt + 100_20_01.txt + 200_10_01.txt +) + +ADD_CUSTOM_COMMAND( + OUTPUT + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/README + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/examples/flowshop/benchs/README + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/README +) + +ADD_CUSTOM_COMMAND( + OUTPUT ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson1/Sch1.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1 +) + +ADD_CUSTOM_COMMAND( + OUTPUT ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson2/FlowShopEA.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2 +) + +ADD_CUSTOM_COMMAND( + OUTPUT ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson3/FlowShopEA2.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3 +) + +ADD_CUSTOM_TARGET(install DEPENDS + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/README + +) + +ADD_CUSTOM_TARGET(benchs DEPENDS + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_05_02.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_10_02.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/020_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/050_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_05_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/100_20_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/200_10_01.txt + ${ParadisEO-MOEO_BINARY_DIR}/tutorial/examples/flowshop/benchs/README +) + +ADD_CUSTOM_TARGET(lesson1 DEPENDS ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param) + +ADD_CUSTOM_TARGET(lesson2 DEPENDS ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.param) + +ADD_CUSTOM_TARGET(lesson3 DEPENDS ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2.param) + diff --git a/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson1/CMakeLists.txt b/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson1/CMakeLists.txt index 5798074c9..1a8c1a531 100644 --- a/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson1/CMakeLists.txt +++ b/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson1/CMakeLists.txt @@ -1,20 +1,4 @@ -###################################################################################### -### 0) Copy the Sch1.param file in the build path for an easy use. -###################################################################################### - -ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson1/Sch1.param) -ADD_CUSTOM_COMMAND( - TARGET install - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson1/Sch1.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1) -###################################################################################### - - - ###################################################################################### ### 1) Include the sources ###################################################################################### diff --git a/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson2/CMakeLists.txt b/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson2/CMakeLists.txt index a30bace99..4dfb7283a 100644 --- a/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson2/CMakeLists.txt +++ b/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson2/CMakeLists.txt @@ -1,20 +1,3 @@ - -###################################################################################### -### 0) Copy the FlowShop.param file in the build path for an easy use. -###################################################################################### - -ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson2/FlowShopEA.param) -ADD_CUSTOM_COMMAND( - TARGET install - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson2/FlowShopEA.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2) -###################################################################################### - - - ###################################################################################### ### 1) Include the sources ###################################################################################### diff --git a/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson3/CMakeLists.txt b/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson3/CMakeLists.txt index c8b54a7d7..a89938b86 100644 --- a/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson3/CMakeLists.txt +++ b/branches/cmakemodif/paradiseo-moeo/tutorial/Lesson3/CMakeLists.txt @@ -1,20 +1,3 @@ - -###################################################################################### -### 0) Copy the FlowShop.param file in the build path for an easy use. -###################################################################################### - -ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson3/FlowShopEA2.param) -ADD_CUSTOM_COMMAND( - TARGET install - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - ${ParadisEO-MOEO_SOURCE_DIR}/tutorial/Lesson3/FlowShopEA2.param - ${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3) -###################################################################################### - - - ###################################################################################### ### 1) Include the sources ###################################################################################### diff --git a/branches/cmakemodif/paradiseo-moeo/tutorial/examples/CMakeLists.txt b/branches/cmakemodif/paradiseo-moeo/tutorial/examples/CMakeLists.txt index eae35f629..12436951d 100644 --- a/branches/cmakemodif/paradiseo-moeo/tutorial/examples/CMakeLists.txt +++ b/branches/cmakemodif/paradiseo-moeo/tutorial/examples/CMakeLists.txt @@ -4,6 +4,6 @@ ### 1) Where must cmake go now ? ###################################################################################### -SUBDIRS(flowshop) +ADD_SUBDIRECTORY(flowshop) ###################################################################################### \ No newline at end of file diff --git a/branches/cmakemodif/paradiseo-moeo/tutorial/examples/flowshop/CMakeLists.txt b/branches/cmakemodif/paradiseo-moeo/tutorial/examples/flowshop/CMakeLists.txt index 3400a98a0..afa830922 100644 --- a/branches/cmakemodif/paradiseo-moeo/tutorial/examples/flowshop/CMakeLists.txt +++ b/branches/cmakemodif/paradiseo-moeo/tutorial/examples/flowshop/CMakeLists.txt @@ -1,20 +1,3 @@ - -###################################################################################### -### 0) Copy the "benchs" directory in the build directory to easily run the lessons -###################################################################################### - -ADD_CUSTOM_TARGET(install DEPENDS ${FLOWSHOP_SRC_DIR}/benchs) -ADD_CUSTOM_COMMAND( - TARGET install - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_directory - ${FLOWSHOP_SRC_DIR}/benchs - ${FLOWSHOP_BINARY_DIR}/benchs) - -###################################################################################### - - ###################################################################################### ### 1) Include the sources ######################################################################################