git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1284 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
6f1b05d036
commit
414bddbd6d
2 changed files with 84 additions and 68 deletions
|
|
@ -15,23 +15,24 @@ SET(FUNCTION_BIN_DIR ${MO_BIN_DIR}/tutorial/examples/function CACHE PATH "FUNCTI
|
||||||
### 2) How to manage copy of benchs ?
|
### 2) How to manage copy of benchs ?
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
|
|
||||||
IF(ENABLE_CMAKE_COPY)
|
IF(ENABLE_CMAKE_COPY)
|
||||||
|
SET(BENCH_LIST
|
||||||
|
berlin52.tsp
|
||||||
|
eil101.tsp
|
||||||
|
pr2392.tsp
|
||||||
|
rl5915.tsp
|
||||||
|
usa13509.tsp
|
||||||
|
)
|
||||||
|
|
||||||
|
FOREACH (bench ${BENCH_LIST})
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
${MO_SRC_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp
|
${MO_SRC_DIR}/tutorial/examples/tsp/benchs/${bench}
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/${bench}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
)
|
||||||
${MO_SRC_DIR}/tutorial/examples/tsp/benchs/eil101.tsp
|
ENDFOREACH (bench)
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp
|
EXECUTE_PROCESS(
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
${MO_SRC_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
${MO_SRC_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
${MO_SRC_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
${MO_SRC_DIR}/tutorial/Lesson1/param
|
${MO_SRC_DIR}/tutorial/Lesson1/param
|
||||||
${MO_BIN_DIR}/tutorial/Lesson1/param
|
${MO_BIN_DIR}/tutorial/Lesson1/param
|
||||||
|
|
@ -71,40 +72,6 @@ ADD_SUBDIRECTORY(Lesson6)
|
||||||
### 4) Target to copy benchs and parameters file
|
### 4) Target to copy benchs and parameters file
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(install DEPENDS
|
|
||||||
${MO_BIN_DIR}/tutorial/Lesson1/param
|
|
||||||
${MO_BIN_DIR}/tutorial/Lesson2/param
|
|
||||||
${MO_BIN_DIR}/tutorial/Lesson3/param
|
|
||||||
${MO_BIN_DIR}/tutorial/Lesson4/param
|
|
||||||
${MO_BIN_DIR}/tutorial/Lesson5/param
|
|
||||||
${MO_BIN_DIR}/tutorial/Lesson6/param
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp
|
|
||||||
)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(benchs DEPENDS
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp
|
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp
|
|
||||||
)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(lesson1 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson1/param)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(lesson2 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson2/param)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(lesson3 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson3/param)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(lesson4 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson4/param)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(lesson5 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson5/param)
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(lesson6 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson6/param)
|
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT
|
OUTPUT
|
||||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp
|
||||||
|
|
@ -170,3 +137,37 @@ ADD_CUSTOM_COMMAND(
|
||||||
${MO_SRC_DIR}/tutorial/Lesson6/param
|
${MO_SRC_DIR}/tutorial/Lesson6/param
|
||||||
${MO_BIN_DIR}/tutorial/Lesson6
|
${MO_BIN_DIR}/tutorial/Lesson6
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(install DEPENDS
|
||||||
|
${MO_BIN_DIR}/tutorial/Lesson1/param
|
||||||
|
${MO_BIN_DIR}/tutorial/Lesson2/param
|
||||||
|
${MO_BIN_DIR}/tutorial/Lesson3/param
|
||||||
|
${MO_BIN_DIR}/tutorial/Lesson4/param
|
||||||
|
${MO_BIN_DIR}/tutorial/Lesson5/param
|
||||||
|
${MO_BIN_DIR}/tutorial/Lesson6/param
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(benchs DEPENDS
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/berlin52.tsp
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/eil101.tsp
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/pr2392.tsp
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/rl5915.tsp
|
||||||
|
${MO_BIN_DIR}/tutorial/examples/tsp/benchs/usa13509.tsp
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(lesson1 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson1/param)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(lesson2 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson2/param)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(lesson3 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson3/param)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(lesson4 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson4/param)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(lesson5 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson5/param)
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(lesson6 DEPENDS ${MO_BIN_DIR}/tutorial/Lesson6/param)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${FUNCTION_BIN_DIR}/lib)
|
||||||
### 3) Define your target(s): just an executable here
|
### 3) Define your target(s): just an executable here
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SOURCE_GROUP(src FILES
|
IF(ENABLE_CMAKE_COPY)
|
||||||
|
SOURCE_GROUP(src FILES
|
||||||
minimize_function.cpp
|
minimize_function.cpp
|
||||||
${MO_BIN_DIR}/tutorial/Lesson1/param
|
${MO_BIN_DIR}/tutorial/Lesson1/param
|
||||||
${TSP_BIN_DIR}/benchs/berlin52.tsp
|
${TSP_BIN_DIR}/benchs/berlin52.tsp
|
||||||
|
|
@ -31,9 +32,15 @@ SOURCE_GROUP(src FILES
|
||||||
${TSP_BIN_DIR}/benchs/pr2392.tsp
|
${TSP_BIN_DIR}/benchs/pr2392.tsp
|
||||||
${TSP_BIN_DIR}/benchs/rl5915.tsp
|
${TSP_BIN_DIR}/benchs/rl5915.tsp
|
||||||
${TSP_BIN_DIR}/benchs/usa13509.tsp
|
${TSP_BIN_DIR}/benchs/usa13509.tsp
|
||||||
)
|
)
|
||||||
|
SOURCE_GROUP(benchs FILES
|
||||||
ADD_EXECUTABLE(minimize_function
|
${TSP_BIN_DIR}/benchs/berlin52.tsp
|
||||||
|
${TSP_BIN_DIR}/benchs/eil101.tsp
|
||||||
|
${TSP_BIN_DIR}/benchs/pr2392.tsp
|
||||||
|
${TSP_BIN_DIR}/benchs/rl5915.tsp
|
||||||
|
${TSP_BIN_DIR}/benchs/usa13509.tsp
|
||||||
|
)
|
||||||
|
ADD_EXECUTABLE(minimize_function
|
||||||
minimize_function.cpp
|
minimize_function.cpp
|
||||||
${MO_BIN_DIR}/tutorial/Lesson1/param
|
${MO_BIN_DIR}/tutorial/Lesson1/param
|
||||||
${TSP_BIN_DIR}/benchs/berlin52.tsp
|
${TSP_BIN_DIR}/benchs/berlin52.tsp
|
||||||
|
|
@ -41,7 +48,15 @@ ADD_EXECUTABLE(minimize_function
|
||||||
${TSP_BIN_DIR}/benchs/pr2392.tsp
|
${TSP_BIN_DIR}/benchs/pr2392.tsp
|
||||||
${TSP_BIN_DIR}/benchs/rl5915.tsp
|
${TSP_BIN_DIR}/benchs/rl5915.tsp
|
||||||
${TSP_BIN_DIR}/benchs/usa13509.tsp
|
${TSP_BIN_DIR}/benchs/usa13509.tsp
|
||||||
)
|
)
|
||||||
|
ELSE(ENABLE_CMAKE_COPY)
|
||||||
|
SOURCE_GROUP(src FILES
|
||||||
|
minimize_function.cpp
|
||||||
|
)
|
||||||
|
ADD_EXECUTABLE(minimize_function
|
||||||
|
minimize_function.cpp
|
||||||
|
)
|
||||||
|
ENDIF(ENABLE_CMAKE_COPY)
|
||||||
|
|
||||||
ADD_DEPENDENCIES(minimize_function function)
|
ADD_DEPENDENCIES(minimize_function function)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue