diff --git a/trunk/paradiseo-peo/tutorial/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/CMakeLists.txt index bdd06bb87..d0d58822a 100644 --- a/trunk/paradiseo-peo/tutorial/CMakeLists.txt +++ b/trunk/paradiseo-peo/tutorial/CMakeLists.txt @@ -14,6 +14,6 @@ SET(FLOWSHOP_BIN_DIR "${MOEO_BIN_DIR}/tutorial/examples/flowshop" CACHE PATH "Fl ### 2) Where must cmake go now ? ###################################################################################### -SUBDIRS(examples Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6) +SUBDIRS(examples Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6 Meta-models) ###################################################################################### diff --git a/trunk/paradiseo-peo/tutorial/Meta-models/CMakeLists.txt b/trunk/paradiseo-peo/tutorial/Meta-models/CMakeLists.txt new file mode 100644 index 000000000..eef9cbd3e --- /dev/null +++ b/trunk/paradiseo-peo/tutorial/Meta-models/CMakeLists.txt @@ -0,0 +1,76 @@ + +###################################################################################### +### 0) Set the compiler and define targets to easily run the lessons +###################################################################################### + +SET (CMAKE_CXX_COMPILER mpicxx) + +ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Meta-models/param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Meta-models/schema.xml) + +ADD_CUSTOM_COMMAND( + TARGET install + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Meta-models/param + ${ParadisEO-PEO_BINARY_DIR}/tutorial/Meta-models) +ADD_CUSTOM_COMMAND( + TARGET install + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Meta-models/schema.xml + ${ParadisEO-PEO_BINARY_DIR}/tutorial/Meta-models) + +###################################################################################### + + +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src ${MOEO_SRC_DIR}/src ${MO_SRC_DIR}/src ${ParadisEO-PEO_SOURCE_DIR}/src ${TSP_SRC_DIR}) + +###################################################################################### + + +###################################################################################### +### 2) Specify where CMake can find the libraries +###################################################################################### + +LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-PEO_BINARY_DIR}/lib ${TSP_BINARY_DIR}/lib) + +###################################################################################### + + +###################################################################################### +### 3) Define the targets +###################################################################################### + +ADD_EXECUTABLE(multistart multistart.cpp) +ADD_DEPENDENCIES(multistart peo rmc_mpi) + +ADD_EXECUTABLE(coop cooperation.cpp) +ADD_DEPENDENCIES(coop peo rmc_mpi) +###################################################################################### + + +###################################################################################### +### 4) Optionnal: define properties +###################################################################################### + +SET(Meta-models_VERSION ${GLOBAL_VERSION}) +SET_TARGET_PROPERTIES(multistart PROPERTIES VERSION "${Meta-models_VERSION}") +SET_TARGET_PROPERTIES(coop PROPERTIES VERSION "${Meta-models_VERSION}") +###################################################################################### + + +###################################################################################### +### 5) Link the librairies +###################################################################################### + +TARGET_LINK_LIBRARIES(multistart ${XML2_LIBS} tsp peo rmc_mpi eo eoutils peo) +TARGET_LINK_LIBRARIES(coop ${XML2_LIBS} tsp peo rmc_mpi eo eoutils peo) + +###################################################################################### + diff --git a/trunk/paradiseo-peo/tutorial/Meta-models/cooperation.cpp b/trunk/paradiseo-peo/tutorial/Meta-models/cooperation.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/trunk/paradiseo-peo/tutorial/Meta-models/multistart.cpp b/trunk/paradiseo-peo/tutorial/Meta-models/multistart.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/trunk/paradiseo-peo/tutorial/Meta-models/param b/trunk/paradiseo-peo/tutorial/Meta-models/param new file mode 100644 index 000000000..7d4b4f519 --- /dev/null +++ b/trunk/paradiseo-peo/tutorial/Meta-models/param @@ -0,0 +1,15 @@ +###### Param ###### +--maxGen=1 +--select=0.8 + +## miscallenous parameters + +--debug=false + +## deployment schema + +--schema=schema.xml + +## parameters + +--inst=../examples/tsp/benchs/eil101.tsp diff --git a/trunk/paradiseo-peo/tutorial/Meta-models/schema.xml b/trunk/paradiseo-peo/tutorial/Meta-models/schema.xml new file mode 100644 index 000000000..66ec6eecd --- /dev/null +++ b/trunk/paradiseo-peo/tutorial/Meta-models/schema.xml @@ -0,0 +1,19 @@ + + + + + + + + 1 + + + 2 + + + 3 + + + + +