From d45f2b8f56d3174827b5ba3e8085cb8231cb1c5e Mon Sep 17 00:00:00 2001 From: legrand Date: Fri, 6 Jul 2007 09:47:00 +0000 Subject: [PATCH] added cmake config git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@565 331e1502-861f-0410-8da2-ba01fb791d7f --- .../tutorial/Lesson3/CMakeLists.txt | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 tags/paradiseo-ix86-1.0-beta/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt diff --git a/tags/paradiseo-ix86-1.0-beta/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt b/tags/paradiseo-ix86-1.0-beta/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt new file mode 100644 index 000000000..2a9da8df5 --- /dev/null +++ b/tags/paradiseo-ix86-1.0-beta/paradiseo-peo/tutorial/Lesson3/CMakeLists.txt @@ -0,0 +1,90 @@ + +###################################################################################### +### 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/Lesson3/lesson.param ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml) + +ADD_CUSTOM_COMMAND( + TARGET install + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/lesson.param + ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3) +ADD_CUSTOM_COMMAND( + TARGET install + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + ${ParadisEO-PEO_SOURCE_DIR}/tutorial/Lesson3/schema.xml + ${ParadisEO-PEO_BINARY_DIR}/tutorial/Lesson3) +###################################################################################### + + + +###################################################################################### +### 1) Include the sources +###################################################################################### + +INCLUDE_DIRECTORIES(${EO_SRC_DIR}) +INCLUDE_DIRECTORIES(${MO_SRC_DIR}) +INCLUDE_DIRECTORIES(${PEO_SRC_DIR}) +INCLUDE_DIRECTORIES(${TSP_SRC_DIR}) + +###################################################################################### + + +###################################################################################### +### 2) Specify where CMake can find the libraries (mandatory: before 3) ) +###################################################################################### + +LINK_DIRECTORIES( ${EO_SRC_DIR} + ${EO_SRC_DIR}/utils + ${ParadisEO-PEO_BINARY_DIR}/lib + ${TSP_BINARY_DIR}/lib) + +###################################################################################### + + +###################################################################################### +### 3) Define your target(s): just an executable here +###################################################################################### + +# no matter what is the OS, hopefully +ADD_EXECUTABLE(tspExample main.cpp) + +ADD_DEPENDENCIES(tspExample tsp) +ADD_DEPENDENCIES(tspExample peo) +ADD_DEPENDENCIES(tspExample rmc_mpi) + +###################################################################################### + + +###################################################################################### +### 4) Optionnal: define your target(s)'s version: no effect for windows +###################################################################################### + +SET(LESSON3_VERSION "1.0.beta") +SET_TARGET_PROPERTIES(tspExample PROPERTIES VERSION "${LESSON3_VERSION}") +###################################################################################### + + +###################################################################################### +### 5) Link the librairies +###################################################################################### + +TARGET_LINK_LIBRARIES(tspExample ${XML2_LIBS}) # define in CMakeLists.txt at PEO root dir +TARGET_LINK_LIBRARIES(tspExample tsp) +TARGET_LINK_LIBRARIES(tspExample peo) +TARGET_LINK_LIBRARIES(tspExample rmc_mpi) +TARGET_LINK_LIBRARIES(tspExample eo) +TARGET_LINK_LIBRARIES(tspExample eoutils) + +###################################################################################### + + + + +