New config of Paradiseo with Cmake 2.6
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1347 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
aa8109322c
commit
712e8d6cfa
84 changed files with 1468 additions and 739 deletions
|
|
@ -8,11 +8,221 @@ 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_EXAMPLE OR CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
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_EXAMPLE OR CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
|
||||
MACRO(ADD_COMMANDS_MOEO)
|
||||
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
|
||||
)
|
||||
ENDMACRO(ADD_COMMANDS_MOEO)
|
||||
|
||||
MACRO(ADD_TARGET_MOEO n)
|
||||
IF(${n} STREQUAL "lesson1")
|
||||
ADD_CUSTOM_TARGET(lesson1 DEPENDS
|
||||
${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1
|
||||
${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param
|
||||
)
|
||||
ELSEIF(${n} STREQUAL "lesson2")
|
||||
ADD_CUSTOM_TARGET(lesson2 DEPENDS
|
||||
${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA
|
||||
${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.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
|
||||
)
|
||||
ELSEIF(${n} STREQUAL "lesson3")
|
||||
ADD_CUSTOM_TARGET(lesson3 DEPENDS
|
||||
${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson3/FlowShopEA2
|
||||
${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
|
||||
)
|
||||
ELSEIF(${n} STREQUAL "install")
|
||||
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
|
||||
)
|
||||
ELSEIF(${n} STREQUAL "benchs")
|
||||
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
|
||||
)
|
||||
ENDIF(${n} STREQUAL "lesson1")
|
||||
ENDMACRO(ADD_TARGET_MOEO)
|
||||
|
||||
######################################################################################
|
||||
### 3) Where must cmake go now ?
|
||||
######################################################################################
|
||||
|
||||
ADD_SUBDIRECTORY(examples)
|
||||
ADD_SUBDIRECTORY(Lesson1)
|
||||
ADD_SUBDIRECTORY(Lesson2)
|
||||
ADD_SUBDIRECTORY(Lesson3)
|
||||
|
||||
######################################################################################
|
||||
|
||||
######################################################################################
|
||||
### 4) Target to copy benchs and parameters file
|
||||
######################################################################################
|
||||
|
||||
IF(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" AND NOT CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
ADD_COMMANDS_MOEO()
|
||||
ADD_TARGET_MOEO(install)
|
||||
ADD_TARGET_MOEO(benchs)
|
||||
ENDIF(NOT CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" AND NOT CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
|
|
@ -1,20 +1,3 @@
|
|||
|
||||
######################################################################################
|
||||
### 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
|
||||
######################################################################################
|
||||
|
|
@ -22,9 +5,6 @@ ADD_CUSTOM_COMMAND(
|
|||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/utils)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src)
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries
|
||||
|
|
@ -32,19 +12,26 @@ INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src)
|
|||
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 3) Define your target(s): just an executable here
|
||||
######################################################################################
|
||||
IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
SOURCE_GROUP(src FILES Sch1.cpp)
|
||||
ADD_EXECUTABLE(Sch1
|
||||
Sch1.cpp
|
||||
${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson1/Sch1.param
|
||||
)
|
||||
ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
ADD_COMMANDS_MOEO()
|
||||
ADD_TARGET_MOEO(lesson1)
|
||||
IF(ENABLE_CMAKE_EXAMPLE)
|
||||
ADD_EXECUTABLE(Sch1 Sch1.cpp)
|
||||
ELSE(ENABLE_CMAKE_EXAMPLE)
|
||||
ADD_EXECUTABLE(Sch1 EXCLUDE_FROM_ALL Sch1.cpp)
|
||||
ENDIF(ENABLE_CMAKE_EXAMPLE)
|
||||
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
|
||||
ADD_EXECUTABLE(Sch1 Sch1.cpp)
|
||||
ADD_DEPENDENCIES(Sch1 moeo)
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 4) Optionnal: define your target(s)'s version: no effect for windows
|
||||
|
|
@ -52,15 +39,11 @@ ADD_DEPENDENCIES(Sch1 moeo)
|
|||
|
||||
SET(SCH1_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(Sch1 PROPERTIES VERSION "${SCH1_VERSION}")
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 5) Link the librairies for your target(s)
|
||||
######################################################################################
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(Sch1 moeo eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -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
|
||||
######################################################################################
|
||||
|
|
@ -23,29 +6,59 @@ INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
|||
INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${FLOWSHOP_SRC_DIR})
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries
|
||||
######################################################################################
|
||||
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib ${FLOWSHOP_BINARY_DIR}/lib)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 3) Define your target(s): just an executable here
|
||||
######################################################################################
|
||||
|
||||
ADD_EXECUTABLE(FlowShopEA FlowShopEA.cpp)
|
||||
IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
SOURCE_GROUP(src FILES FlowShopEA.cpp)
|
||||
SOURCE_GROUP(benchs FILES
|
||||
${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
|
||||
)
|
||||
ADD_EXECUTABLE(FlowShopEA
|
||||
FlowShopEA.cpp
|
||||
${ParadisEO-MOEO_BINARY_DIR}/tutorial/Lesson2/FlowShopEA.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
|
||||
)
|
||||
ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
ADD_COMMANDS_MOEO()
|
||||
ADD_TARGET_MOEO(lesson2)
|
||||
IF(ENABLE_CMAKE_EXAMPLE)
|
||||
ADD_EXECUTABLE(FlowShopEA FlowShopEA.cpp)
|
||||
ELSE(ENABLE_CMAKE_EXAMPLE)
|
||||
ADD_EXECUTABLE(FlowShopEA EXCLUDE_FROM_ALL FlowShopEA.cpp)
|
||||
ENDIF(ENABLE_CMAKE_EXAMPLE)
|
||||
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
|
||||
ADD_DEPENDENCIES(FlowShopEA flowshop moeo)
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 4) Optionnal: define your target(s)'s version: no effect for windows
|
||||
|
|
@ -53,15 +66,11 @@ ADD_DEPENDENCIES(FlowShopEA flowshop moeo)
|
|||
|
||||
SET(FLOWSHOPEA_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(FlowShopEA PROPERTIES VERSION "${FLOWSHOPEA_VERSION}")
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 5) Link the librairies for your target(s)
|
||||
######################################################################################
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(FlowShopEA moeo flowshop eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -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
|
||||
######################################################################################
|
||||
|
|
@ -23,29 +6,59 @@ INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
|||
INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${FLOWSHOP_SRC_DIR})
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries
|
||||
######################################################################################
|
||||
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib ${FLOWSHOP_BINARY_DIR}/lib)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 3) Define your target(s): just an executable here
|
||||
######################################################################################
|
||||
|
||||
ADD_EXECUTABLE(FlowShopEA2 FlowShopEA2.cpp)
|
||||
IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
SOURCE_GROUP(src FILES FlowShopEA2.cpp)
|
||||
SOURCE_GROUP(benchs FILES
|
||||
${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
|
||||
)
|
||||
ADD_EXECUTABLE(FlowShopEA2
|
||||
FlowShopEA2.cpp
|
||||
${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
|
||||
)
|
||||
ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
ADD_COMMANDS_MOEO()
|
||||
ADD_TARGET_MOEO(lesson3)
|
||||
IF(ENABLE_CMAKE_EXAMPLE)
|
||||
ADD_EXECUTABLE(FlowShopEA2 FlowShopEA2.cpp)
|
||||
ELSE(ENABLE_CMAKE_EXAMPLE)
|
||||
ADD_EXECUTABLE(FlowShopEA2 EXCLUDE_FROM_ALL FlowShopEA2.cpp)
|
||||
ENDIF(ENABLE_CMAKE_EXAMPLE)
|
||||
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
|
||||
ADD_DEPENDENCIES(FlowShopEA2 flowshop moeo)
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 4) Optionnal: define your target(s)'s version: no effect for windows
|
||||
|
|
@ -53,15 +66,11 @@ ADD_DEPENDENCIES(FlowShopEA2 flowshop moeo)
|
|||
|
||||
SET(FlowShopEA2_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(FlowShopEA2 PROPERTIES VERSION "${FlowShopEA2_VERSION}")
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 5) Link the librairies for your target(s)
|
||||
######################################################################################
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(FlowShopEA2 moeo flowshop eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
###### Evolution Engine ######
|
||||
--popSize=100 # -P : Population Size
|
||||
--updateArch=1 # Update the archive at each gen.
|
||||
--fitness=FastNonDominatedSorting # -F : Fitness assignment scheme: Dummy, FastNonDominatedSorting or IndicatorBased
|
||||
--fitness=IndicatorBased # -F : Fitness assignment scheme: Dummy, DomDepth or IndicatorBased
|
||||
--indicator=Epsilon # -i : Binary indicator for IndicatorBased: Epsilon, Hypervolume
|
||||
--rho=1.1 # -r : reference point for the hypervolume indicator
|
||||
--kappa=0.05 # -k : Scaling factor kappa for IndicatorBased
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
### 1) Where must cmake go now ?
|
||||
######################################################################################
|
||||
|
||||
SUBDIRS(flowshop)
|
||||
ADD_SUBDIRECTORY(flowshop)
|
||||
|
||||
######################################################################################
|
||||
|
|
@ -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
|
||||
######################################################################################
|
||||
|
|
|
|||
|
|
@ -54,14 +54,7 @@
|
|||
eoEvalFuncCounter<FlowShop> & do_make_eval(eoParser& _parser, eoState& _state)
|
||||
{
|
||||
// benchmark file name
|
||||
std::string benchmarkFileName = _parser.getORcreateParam(std::string(), "BenchmarkFile", "Benchmark file name (benchmarks are available at www.lifl.fr/~liefooga/benchmarks)", 'B',"Representation", true).value();
|
||||
if (benchmarkFileName == "")
|
||||
{
|
||||
std::string stmp = "*** Missing name of the benchmark file\n";
|
||||
stmp += " Type '-B=the_benchmark_file_name' or '--BenchmarkFile=the_benchmark_file_name'\n";
|
||||
stmp += " Benchmarks files are available at www.lifl.fr/~liefooga/benchmarks";
|
||||
throw std::runtime_error(stmp.c_str());
|
||||
}
|
||||
std::string benchmarkFileName = _parser.getORcreateParam(std::string("../examples/flowshop/benchs/020_20_01.txt"), "BenchmarkFile", "Benchmark file name", 'B',"Representation", false).value();
|
||||
// reading of the parameters contained in the benchmark file
|
||||
FlowShopBenchmarkParser fParser(benchmarkFileName);
|
||||
unsigned int M = fParser.getM();
|
||||
|
|
|
|||
|
|
@ -52,14 +52,7 @@
|
|||
eoInit<FlowShop> & do_make_genotype(eoParser& _parser, eoState& _state)
|
||||
{
|
||||
// benchmark file name
|
||||
std::string benchmarkFileName = _parser.getORcreateParam(std::string(), "BenchmarkFile", "Benchmark file name (benchmarks are available at www.lifl.fr/~liefooga/benchmarks/)", 'B',"Representation", true).value();
|
||||
if (benchmarkFileName == "")
|
||||
{
|
||||
std::string stmp = "*** Missing name of the benchmark file\n";
|
||||
stmp += " Type '-B=the_benchmark_file_name' or '--BenchmarkFile=the_benchmark_file_name'\n";
|
||||
stmp += " Benchmarks files are available at www.lifl.fr/~liefooga/benchmarks";
|
||||
throw std::runtime_error(stmp.c_str());
|
||||
}
|
||||
std::string benchmarkFileName = _parser.getORcreateParam(std::string("../examples/flowshop/benchs/020_20_01.txt"), "BenchmarkFile", "Benchmark file name", 'B',"Representation", false).value();
|
||||
// reading of number of jobs to schedule contained in the benchmark file
|
||||
FlowShopBenchmarkParser fParser(benchmarkFileName);
|
||||
unsigned int N = fParser.getN();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue