fix build system : make eo/edo tests work
This commit is contained in:
parent
0829afceb9
commit
06ff0b682b
17 changed files with 328 additions and 326 deletions
|
|
@ -23,16 +23,18 @@
|
||||||
### 3) Define your targets and link the librairies
|
### 3) Define your targets and link the librairies
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
FIND_PACKAGE(Boost 1.33.0)
|
find_package(Boost 1.33.0)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
link_directories(${Boost_LIBRARY_DIRS})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/common)
|
include_directories(${CMAKE_SOURCE_DIR}/application/common)
|
||||||
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
|
include_directories(${EDO_SRC_DIR}/src)
|
||||||
|
|
||||||
SET(SOURCES
|
set(SOURCES
|
||||||
#t-cholesky
|
#t-cholesky
|
||||||
t-variance
|
t-variance
|
||||||
t-edoEstimatorNormalMulti
|
t-edoEstimatorNormalMulti
|
||||||
|
|
@ -44,11 +46,11 @@ SET(SOURCES
|
||||||
t-repairer-modulo
|
t-repairer-modulo
|
||||||
)
|
)
|
||||||
|
|
||||||
FOREACH(current ${SOURCES})
|
foreach(current ${SOURCES})
|
||||||
ADD_EXECUTABLE(${current} ${current}.cpp)
|
add_executable(${current} ${current}.cpp)
|
||||||
ADD_TEST(${current} ${current})
|
add_test(${current} ${current})
|
||||||
TARGET_LINK_LIBRARIES(${current} edo edoutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES})
|
target_link_libraries(${current} eo eoutils edoutils ${Boost_LIBRARIES})
|
||||||
INSTALL(TARGETS ${current} RUNTIME DESTINATION share/edo/test COMPONENT test)
|
install(TARGETS ${current} RUNTIME DESTINATION share/edo/test COMPONENT test)
|
||||||
ENDFOREACH()
|
endforeach()
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,30 +2,30 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries (mandatory: before 3) )
|
### 2) specify where cmake can find the libraries (mandatory: before 3) )
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your target(s): just an executable here
|
### 3) define your target(s): just an executable here
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET (GPROP_SOURCES gprop.cpp)
|
set (GPROP_SOURCES gprop.cpp)
|
||||||
|
|
||||||
# especially for Visual Studio
|
# especially for Visual Studio
|
||||||
IF(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN)
|
||||||
ADD_EXECUTABLE(gprop ${GPROP_SOURCES})
|
add_executable(gprop ${GPROP_SOURCES})
|
||||||
ADD_DEPENDENCIES(gprop eo eoutils)
|
add_dependencies(gprop eo eoutils)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(gprop eo eoutils)
|
target_link_libraries(gprop eo eoutils)
|
||||||
|
|
||||||
SET(GPROP_VERSION ${GLOBAL_VERSION})
|
set(GPROP_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(gprop PROPERTIES VERSION "${GPROP_VERSION}")
|
set_target_properties(gprop PROPERTIES VERSION "${GPROP_VERSION}")
|
||||||
ENDIF(NOT WIN32 OR CYGWIN)
|
endif(NOT WIN32 OR CYGWIN)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,37 +2,37 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries (mandatory: before 3) )
|
### 2) specify where cmake can find the libraries (mandatory: before 3) )
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your target(s): just an executable here
|
### 3) define your target(s): just an executable here
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET (GPSYMREG_SOURCES main.cpp)
|
set (GPSYMREG_SOURCES main.cpp)
|
||||||
|
|
||||||
# no matter what is the OS, hopefully
|
# no matter what is the OS, hopefully
|
||||||
ADD_EXECUTABLE(gpsymreg ${GPSYMREG_SOURCES})
|
add_executable(gpsymreg ${GPSYMREG_SOURCES})
|
||||||
|
|
||||||
ADD_DEPENDENCIES(gpsymreg eo eoutils)
|
add_dependencies(gpsymreg eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 4) Optionnal: define your target(s)'s version: no effect for windows
|
### 4) optionnal: define your target(s)'s version: no effect for windows
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(GPSYMREG_VERSION ${GLOBAL_VERSION})
|
set(GPSYMREG_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}")
|
set_target_properties(gpsymreg PROPERTIES VERSION "${GPSYMREG_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 5) Link the librairies for your target(s)
|
### 5) link the librairies for your target(s)
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(gpsymreg eo eoutils)
|
target_link_libraries(gpsymreg eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,19 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Define the es and cma targets
|
### 2) Define the es and cma targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(ES_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
set(ES_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||||
SET(CMA_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
set(CMA_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||||
|
|
||||||
SET(LIBRARY_OUTPUT_PATH ${ES_LIB_OUTPUT_PATH}) # the same output for the two libs
|
set(LIBRARY_OUTPUT_PATH ${ES_LIB_OUTPUT_PATH}) # the same output for the two libs
|
||||||
|
|
||||||
SET(ES_SOURCES
|
set(ES_SOURCES
|
||||||
make_algo_scalar_es.cpp
|
make_algo_scalar_es.cpp
|
||||||
make_algo_scalar_real.cpp
|
make_algo_scalar_real.cpp
|
||||||
make_checkpoint_es.cpp
|
make_checkpoint_es.cpp
|
||||||
|
|
@ -31,26 +31,26 @@ SET(ES_SOURCES
|
||||||
make_run_real.cpp
|
make_run_real.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(CMA_SOURCES
|
set(CMA_SOURCES
|
||||||
eig.cpp
|
eig.cpp
|
||||||
CMAState.cpp
|
CMAState.cpp
|
||||||
CMAParams.cpp
|
CMAParams.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(es STATIC ${ES_SOURCES})
|
add_library(es STATIC ${ES_SOURCES})
|
||||||
INSTALL(TARGETS es ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
install(TARGETS es ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
||||||
|
|
||||||
ADD_LIBRARY(cma STATIC ${CMA_SOURCES})
|
add_library(cma STATIC ${CMA_SOURCES})
|
||||||
INSTALL(TARGETS cma ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
install(TARGETS cma ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Optionnal
|
### 3) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(ES_VERSION ${GLOBAL_VERSION})
|
set(ES_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(es PROPERTIES VERSION "${ES_VERSION}")
|
set_target_properties(es PROPERTIES VERSION "${ES_VERSION}")
|
||||||
|
|
||||||
SET(CMA_VERSION ${GLOBAL_VERSION})
|
set(CMA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(cma PROPERTIES VERSION "${CMA_VERSION}")
|
set_target_properties(cma PROPERTIES VERSION "${CMA_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,17 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Define the ga target
|
### 2) Define the ga target
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(GA_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
set(GA_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||||
SET(LIBRARY_OUTPUT_PATH ${GA_LIB_OUTPUT_PATH})
|
set(LIBRARY_OUTPUT_PATH ${GA_LIB_OUTPUT_PATH})
|
||||||
|
|
||||||
SET(GA_SOURCES
|
set(GA_SOURCES
|
||||||
make_algo_scalar_ga.cpp
|
make_algo_scalar_ga.cpp
|
||||||
make_checkpoint_ga.cpp
|
make_checkpoint_ga.cpp
|
||||||
make_continue_ga.cpp
|
make_continue_ga.cpp
|
||||||
|
|
@ -22,17 +22,17 @@ SET(GA_SOURCES
|
||||||
make_run_ga.cpp
|
make_run_ga.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(ga STATIC ${GA_SOURCES})
|
add_library(ga STATIC ${GA_SOURCES})
|
||||||
INSTALL(TARGETS ga ARCHIVE DESTINATION lib COMPONENT libraries)
|
install(TARGETS ga ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
||||||
FILE(GLOB HDRS *.h)
|
file(GLOB HDRS *.h)
|
||||||
INSTALL(FILES ${HDRS} DESTINATION include/eo/ga COMPONENT headers)
|
install(FILES ${HDRS} DESTINATION include/eo/ga COMPONENT headers)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Optionnal
|
### 3) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(GA_VERSION ${GLOBAL_VERSION})
|
set(GA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(ga PROPERTIES VERSION "${GA_VERSION}")
|
set_target_properties(ga PROPERTIES VERSION "${GA_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,34 +2,34 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Define the eompi target
|
### 2) Define the eompi target
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(EOMPI_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
set(EOMPI_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||||
SET(LIBRARY_OUTPUT_PATH ${EOMPI_LIB_OUTPUT_PATH})
|
set(LIBRARY_OUTPUT_PATH ${EOMPI_LIB_OUTPUT_PATH})
|
||||||
|
|
||||||
SET(EOMPI_SOURCES
|
set(EOMPI_SOURCES
|
||||||
eoMpi.cpp
|
eoMpi.cpp
|
||||||
eoMpiAssignmentAlgorithm.cpp
|
eoMpiAssignmentAlgorithm.cpp
|
||||||
eoMpiNode.cpp
|
eoMpiNode.cpp
|
||||||
implMpi.cpp
|
implMpi.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(eompi STATIC ${EOMPI_SOURCES})
|
add_library(eompi STATIC ${EOMPI_SOURCES})
|
||||||
INSTALL(TARGETS eompi ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
install(TARGETS eompi ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
||||||
|
|
||||||
FILE(GLOB HDRS *.h)
|
file(GLOB HDRS *.h)
|
||||||
INSTALL(FILES ${HDRS} DESTINATION local/include${INSTALL_SUB_DIR}/eo/mpi COMPONENT headers)
|
install(FILES ${HDRS} DESTINATION local/include${INSTALL_SUB_DIR}/eo/mpi COMPONENT headers)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Optionnal
|
### 3) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(EOMPI_VERSION ${GLOBAL_VERSION})
|
set(EOMPI_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(eompi PROPERTIES VERSION "${EOMPI_VERSION}")
|
set_target_properties(eompi PROPERTIES VERSION "${EOMPI_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -15,49 +15,49 @@
|
||||||
#
|
#
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
PROJECT(PyEO)
|
project(PyEO)
|
||||||
|
|
||||||
FIND_PACKAGE(Boost 1.42 COMPONENTS python)
|
find_package(Boost 1.42 COMPONENTS python)
|
||||||
FIND_PACKAGE(PythonLibs)
|
find_package(PythonLibs)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
|
include_directories(${PYTHON_INCLUDE_PATH})
|
||||||
|
|
||||||
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
link_directories(${Boost_LIBRARY_DIRS})
|
||||||
|
|
||||||
IF(APPLE)
|
if(APPLE)
|
||||||
# osx internal
|
# osx internal
|
||||||
FIND_LIBRARY(APPLE_CARBON Carbon)
|
find_library(APPLE_CARBON Carbon)
|
||||||
ENDIF(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
# includes
|
# includes
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
#INCLUDE_DIRECTORIES(../)
|
#include_directories(../)
|
||||||
|
|
||||||
# source
|
# source
|
||||||
FILE(GLOB SOURCES *.cpp)
|
file(GLOB SOURCES *.cpp)
|
||||||
|
|
||||||
# EO dependencies
|
# EO dependencies
|
||||||
SET(EO_SOURCES
|
set(EO_SOURCES
|
||||||
${EO_SOURCE_DIR}/src/eoFunctorStore.cpp
|
${EO_SRC_DIR}/src/eoFunctorStore.cpp
|
||||||
${EO_SOURCE_DIR}/src/utils/eoLogger.cpp
|
${EO_SRC_DIR}/src/utils/eoLogger.cpp
|
||||||
${EO_SOURCE_DIR}/src/utils/eoParallel.cpp
|
${EO_SRC_DIR}/src/utils/eoParallel.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# shared library
|
# shared library
|
||||||
ADD_LIBRARY(PyEO MODULE ${SOURCES} ${EO_SOURCES})
|
add_library(PyEO MODULE ${SOURCES} ${EO_SOURCES})
|
||||||
INSTALL(TARGETS PyEO LIBRARY DESTINATION local/${LIB} COMPONENT libraries)
|
install(TARGETS PyEO LIBRARY DESTINATION local/${LIB} COMPONENT libraries)
|
||||||
|
|
||||||
# python 2.5 must have pyd
|
# python 2.5 must have pyd
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
if(WIN32 AND NOT CYGWIN)
|
||||||
SET_TARGET_PROPERTIES(PyEO PROPERTIES SUFFIX ".pyd")
|
set_target_properties(PyEO PROPERTIES SUFFIX ".pyd")
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
endif(WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
# add the libs
|
# add the libs
|
||||||
IF(APPLE)
|
if(APPLE)
|
||||||
TARGET_LINK_LIBRARIES(PyEO ${APPLE_CARBON} ${PYTHON_LIBRARY} ${Boost_LIBRARIES})
|
target_link_libraries(PyEO ${APPLE_CARBON} ${PYTHON_LIBRARY} ${Boost_LIBRARIES})
|
||||||
ELSE(APPLE)
|
else(APPLE)
|
||||||
TARGET_LINK_LIBRARIES(PyEO ${PYTHON_LIBRARY} ${Boost_LIBRARIES})
|
target_link_libraries(PyEO ${PYTHON_LIBRARY} ${Boost_LIBRARIES})
|
||||||
ENDIF(APPLE)
|
endif(APPLE)
|
||||||
|
|
|
||||||
|
|
@ -2,34 +2,34 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Define the eoserial target
|
### 2) Define the eoserial target
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(EOSERIAL_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
set(EOSERIAL_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||||
SET(LIBRARY_OUTPUT_PATH ${EOSERIAL_LIB_OUTPUT_PATH})
|
set(LIBRARY_OUTPUT_PATH ${EOSERIAL_LIB_OUTPUT_PATH})
|
||||||
|
|
||||||
SET(EOSERIAL_SOURCES
|
set(EOSERIAL_SOURCES
|
||||||
Array.cpp
|
Array.cpp
|
||||||
Object.cpp
|
Object.cpp
|
||||||
Parser.cpp
|
Parser.cpp
|
||||||
String.cpp
|
String.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(eoserial STATIC ${EOSERIAL_SOURCES})
|
add_library(eoserial STATIC ${EOSERIAL_SOURCES})
|
||||||
INSTALL(TARGETS eoserial ARCHIVE DESTINATION lib COMPONENT libraries)
|
install(TARGETS eoserial ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
||||||
FILE(GLOB HDRS *.h)
|
file(GLOB HDRS *.h)
|
||||||
INSTALL(FILES ${HDRS} DESTINATION include/eo/serial COMPONENT headers)
|
install(FILES ${HDRS} DESTINATION include/eo/serial COMPONENT headers)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Optionnal
|
### 3) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(EOSERIAL_VERSION ${GLOBAL_VERSION})
|
set(EOSERIAL_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(eoserial PROPERTIES VERSION "${EOSERIAL_VERSION}")
|
set_target_properties(eoserial PROPERTIES VERSION "${EOSERIAL_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,17 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Define the ga target
|
### 2) Define the ga target
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(EOUTILS_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
set(EOUTILS_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||||
SET(LIBRARY_OUTPUT_PATH ${EOUTILS_LIB_OUTPUT_PATH})
|
set(LIBRARY_OUTPUT_PATH ${EOUTILS_LIB_OUTPUT_PATH})
|
||||||
|
|
||||||
SET(EOUTILS_SOURCES
|
set(EOUTILS_SOURCES
|
||||||
eoData.cpp
|
eoData.cpp
|
||||||
eoFileMonitor.cpp
|
eoFileMonitor.cpp
|
||||||
eoGnuplot.cpp
|
eoGnuplot.cpp
|
||||||
|
|
@ -32,15 +32,15 @@ SET(EOUTILS_SOURCES
|
||||||
eoSignal.cpp
|
eoSignal.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(eoutils STATIC ${EOUTILS_SOURCES})
|
add_library(eoutils STATIC ${EOUTILS_SOURCES})
|
||||||
INSTALL(TARGETS eoutils ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
install(TARGETS eoutils ARCHIVE DESTINATION local/${LIB} COMPONENT libraries)
|
||||||
|
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Optionnal
|
### 3) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(EOUTILS_VERSION ${GLOBAL_VERSION})
|
set(EOUTILS_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(eoutils PROPERTIES VERSION "${EOUTILS_VERSION}")
|
set_target_properties(eoutils PROPERTIES VERSION "${EOUTILS_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -9,22 +9,22 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/contrib)
|
include_directories(${EO_SRC_DIR}/contrib)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/contrib/MGE)
|
include_directories(${EO_SRC_DIR}/contrib/MGE)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries
|
### 2) Specify where CMake can find the libraries
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your targets and link the librairies
|
### 3) Define your targets and link the librairies
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET (TEST_LIST
|
set (TEST_LIST
|
||||||
t-eofitness
|
t-eofitness
|
||||||
t-eoRandom
|
t-eoRandom
|
||||||
t-eobin
|
t-eobin
|
||||||
|
|
@ -72,45 +72,45 @@ SET (TEST_LIST
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
FOREACH (test ${TEST_LIST})
|
foreach (test ${TEST_LIST})
|
||||||
SET ("T_${test}_SOURCES" "${test}.cpp")
|
set ("T_${test}_SOURCES" "${test}.cpp")
|
||||||
ENDFOREACH (test)
|
endforeach (test)
|
||||||
|
|
||||||
|
|
||||||
IF(ENABLE_MINIMAL_CMAKE_TESTING)
|
if(ENABLE_MINIMAL_CMAKE_TESTING)
|
||||||
|
|
||||||
SET (MIN_TEST_LIST t-eoEasyPSO)
|
set (MIN_TEST_LIST t-eoEasyPSO)
|
||||||
FOREACH (mintest ${MIN_TEST_LIST})
|
foreach (mintest ${MIN_TEST_LIST})
|
||||||
SET ("T_${mintest}_SOURCES" "${mintest}.cpp")
|
set ("T_${mintest}_SOURCES" "${mintest}.cpp")
|
||||||
ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES})
|
add_executable(${mintest} ${T_${mintest}_SOURCES})
|
||||||
ADD_TEST(${mintest} ${mintest})
|
add_test(${mintest} ${mintest})
|
||||||
TARGET_LINK_LIBRARIES(${mintest} ga es cma eoutils eo)
|
target_link_libraries(${mintest} ga es cma eoutils eo)
|
||||||
ENDFOREACH (mintest)
|
endforeach (mintest)
|
||||||
|
|
||||||
ELSEIF(ENABLE_CMAKE_TESTING)
|
elseif(ENABLE_CMAKE_TESTING)
|
||||||
|
|
||||||
FOREACH (test ${TEST_LIST})
|
foreach (test ${TEST_LIST})
|
||||||
ADD_EXECUTABLE(${test} ${T_${test}_SOURCES})
|
add_executable(${test} ${T_${test}_SOURCES})
|
||||||
ADD_TEST(${test} ${test})
|
add_test(${test} ${test})
|
||||||
TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo)
|
target_link_libraries(${test} ga es cma eoutils eo)
|
||||||
INSTALL(TARGETS ${test} RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/test COMPONENT test)
|
install(TARGETS ${test} RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/test COMPONENT test)
|
||||||
ENDFOREACH (test)
|
endforeach (test)
|
||||||
|
|
||||||
SET(RESOURCES
|
set(RESOURCES
|
||||||
boxplot.py
|
boxplot.py
|
||||||
boxplot_to_png.py
|
boxplot_to_png.py
|
||||||
boxplot_to_pdf.py
|
boxplot_to_pdf.py
|
||||||
t-openmp.py
|
t-openmp.py
|
||||||
)
|
)
|
||||||
|
|
||||||
FOREACH(file ${RESOURCES})
|
foreach(file ${RESOURCES})
|
||||||
EXECUTE_PROCESS(
|
execute_process(
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
${CMAKE_CURRENT_SOURCE_DIR}/${file}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${file}
|
${CMAKE_CURRENT_BINARY_DIR}/${file}
|
||||||
)
|
)
|
||||||
ENDFOREACH(file)
|
endforeach(file)
|
||||||
|
|
||||||
ENDIF(ENABLE_MINIMAL_CMAKE_TESTING)
|
endif(ENABLE_MINIMAL_CMAKE_TESTING)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -8,25 +8,25 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
MESSAGE("EO SOURCE DIR: ${EO_SOURCE_DIR}")
|
message("EO SOURCE DIR: ${EO_SRC_DIR}")
|
||||||
MESSAGE("OMPI: ${MPI_DIR}")
|
message("OMPI: ${MPI_DIR}")
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${MPI_DIR}/include)
|
include_directories(${MPI_DIR}/include)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries
|
### 2) Specify where CMake can find the libraries
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
LINK_DIRECTORIES(${MPI_DIR}/lib)
|
link_directories(${MPI_DIR}/lib)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your targets and link the librairies
|
### 3) Define your targets and link the librairies
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET (TEST_LIST
|
set (TEST_LIST
|
||||||
t-mpi-parallelApply
|
t-mpi-parallelApply
|
||||||
t-mpi-wrapper
|
t-mpi-wrapper
|
||||||
t-mpi-multipleRoles
|
t-mpi-multipleRoles
|
||||||
|
|
@ -35,20 +35,20 @@ SET (TEST_LIST
|
||||||
t-mpi-distrib-exp
|
t-mpi-distrib-exp
|
||||||
)
|
)
|
||||||
|
|
||||||
FOREACH (test ${TEST_LIST})
|
foreach (test ${TEST_LIST})
|
||||||
SET ("T_${test}_SOURCES" "${test}.cpp")
|
set ("T_${test}_SOURCES" "${test}.cpp")
|
||||||
ENDFOREACH (test)
|
endforeach (test)
|
||||||
|
|
||||||
SET(CMAKE_CXX_COMPILER "mpicxx")
|
set(CMAKE_CXX_COMPILER "mpicxx")
|
||||||
ADD_DEFINITIONS(-DWITH_MPI)
|
add_definitions(-DWITH_MPI)
|
||||||
|
|
||||||
IF(ENABLE_CMAKE_TESTING)
|
if(ENABLE_CMAKE_TESTING)
|
||||||
FOREACH (test ${TEST_LIST})
|
foreach (test ${TEST_LIST})
|
||||||
ADD_EXECUTABLE(${test} ${T_${test}_SOURCES})
|
add_executable(${test} ${T_${test}_SOURCES})
|
||||||
ADD_TEST(${test} ${test})
|
add_test(${test} ${test})
|
||||||
TARGET_LINK_LIBRARIES(${test} eoutils eompi eoserial eo)
|
target_link_libraries(${test} eoutils eompi eoserial eo)
|
||||||
INSTALL(TARGETS ${test} RUNTIME DESTINATION share/eo/test COMPONENT test)
|
install(TARGETS ${test} RUNTIME DESTINATION share/eo/test COMPONENT test)
|
||||||
ENDFOREACH (test)
|
endforeach (test)
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,63 +2,63 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga)
|
include_directories(${EO_SRC_DIR}/src/ga)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils)
|
include_directories(${EO_SRC_DIR}/src/utils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries
|
### 2) Specify where CMake can find the libraries
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
IF(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
ENDIF(NOT WIN32 OR CYGWIN)
|
endif(NOT WIN32 OR CYGWIN)
|
||||||
|
|
||||||
# especially for Visual Studio
|
# especially for Visual Studio
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
if(WIN32 AND NOT CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
link_directories(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
endif(WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your targets
|
### 3) Define your targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
# no matter what is the OS, hopefully
|
# no matter what is the OS, hopefully
|
||||||
ADD_EXECUTABLE(FirstBitGA FirstBitGA.cpp)
|
add_executable(FirstBitGA FirstBitGA.cpp)
|
||||||
ADD_EXECUTABLE(FirstRealGA FirstRealGA.cpp)
|
add_executable(FirstRealGA FirstRealGA.cpp)
|
||||||
ADD_EXECUTABLE(exercise1.3 exercise1.3.cpp)
|
add_executable(exercise1.3 exercise1.3.cpp)
|
||||||
|
|
||||||
ADD_DEPENDENCIES(FirstBitGA ga eo eoutils)
|
add_dependencies(FirstBitGA ga eo eoutils)
|
||||||
ADD_DEPENDENCIES(FirstRealGA ga eo eoutils)
|
add_dependencies(FirstRealGA ga eo eoutils)
|
||||||
ADD_DEPENDENCIES(exercise1.3 ga eo eoutils)
|
add_dependencies(exercise1.3 ga eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 4) Optionnal
|
### 4) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(FIRSTBITGA_VERSION ${GLOBAL_VERSION})
|
set(FIRSTBITGA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(FirstBitGA PROPERTIES VERSION "${FIRSTBITGA_VERSION}")
|
set_target_properties(FirstBitGA PROPERTIES VERSION "${FIRSTBITGA_VERSION}")
|
||||||
|
|
||||||
SET(FIRSTREALGA_VERSION ${GLOBAL_VERSION})
|
set(FIRSTREALGA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(FirstRealGA PROPERTIES VERSION "${FIRSTREALGA_VERSION}")
|
set_target_properties(FirstRealGA PROPERTIES VERSION "${FIRSTREALGA_VERSION}")
|
||||||
|
|
||||||
SET(EXERCICE13_VERSION ${GLOBAL_VERSION})
|
set(EXERCICE13_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(exercise1.3 PROPERTIES VERSION "${EXERCICE13_VERSION}")
|
set_target_properties(exercise1.3 PROPERTIES VERSION "${EXERCICE13_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 5) Link the librairies for the targets
|
### 5) Link the librairies for the targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(FirstBitGA ga eo eoutils)
|
target_link_libraries(FirstBitGA ga eo eoutils)
|
||||||
TARGET_LINK_LIBRARIES(FirstRealGA ga eo eoutils)
|
target_link_libraries(FirstRealGA ga eo eoutils)
|
||||||
TARGET_LINK_LIBRARIES(exercise1.3 ga eo eoutils)
|
target_link_libraries(exercise1.3 ga eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 6) Configure project installation paths
|
### 6) Configure project installation paths
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INSTALL(TARGETS FirstBitGA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
install(TARGETS FirstBitGA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||||
INSTALL(TARGETS FirstRealGA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
install(TARGETS FirstRealGA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||||
INSTALL(TARGETS exercise1.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
install(TARGETS exercise1.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,59 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga)
|
include_directories(${EO_SRC_DIR}/src/ga)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils)
|
include_directories(${EO_SRC_DIR}/src/utils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries
|
### 2) Specify where CMake can find the libraries
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
IF(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
ENDIF(NOT WIN32 OR CYGWIN)
|
endif(NOT WIN32 OR CYGWIN)
|
||||||
|
|
||||||
# especially for Visual Studio
|
# especially for Visual Studio
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
if(WIN32 AND NOT CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
link_directories(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
endif(WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your targets
|
### 3) Define your targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
# no matter what is the OS, hopefully
|
# no matter what is the OS, hopefully
|
||||||
ADD_EXECUTABLE(FirstBitEA FirstBitEA.cpp)
|
add_executable(FirstBitEA FirstBitEA.cpp)
|
||||||
ADD_EXECUTABLE(FirstRealEA FirstRealEA.cpp)
|
add_executable(FirstRealEA FirstRealEA.cpp)
|
||||||
ADD_EXECUTABLE(exercise2.3 exercise2.3.cpp)
|
add_executable(exercise2.3 exercise2.3.cpp)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 4) Optionnal
|
### 4) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(FIRSTBITEA_VERSION ${GLOBAL_VERSION})
|
set(FIRSTBITEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(FirstBitEA PROPERTIES VERSION "${FIRSTBITEA_VERSION}")
|
set_target_properties(FirstBitEA PROPERTIES VERSION "${FIRSTBITEA_VERSION}")
|
||||||
|
|
||||||
SET(FIRSTREALEA_VERSION ${GLOBAL_VERSION})
|
set(FIRSTREALEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(FirstRealEA PROPERTIES VERSION "${FIRSTREALEA_VERSION}")
|
set_target_properties(FirstRealEA PROPERTIES VERSION "${FIRSTREALEA_VERSION}")
|
||||||
|
|
||||||
SET(EXERCICE23_VERSION ${GLOBAL_VERSION})
|
set(EXERCICE23_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(exercise2.3 PROPERTIES VERSION "${EXERCICE23_VERSION}")
|
set_target_properties(exercise2.3 PROPERTIES VERSION "${EXERCICE23_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 5) Link the librairies for the targets
|
### 5) Link the librairies for the targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(FirstBitEA ga eo eoutils)
|
target_link_libraries(FirstBitEA ga eo eoutils)
|
||||||
TARGET_LINK_LIBRARIES(FirstRealEA ga eo eoutils)
|
target_link_libraries(FirstRealEA ga eo eoutils)
|
||||||
TARGET_LINK_LIBRARIES(exercise2.3 ga eo eoutils)
|
target_link_libraries(exercise2.3 ga eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 6) Configure project installation paths
|
### 6) Configure project installation paths
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INSTALL(TARGETS FirstBitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
|
install(TARGETS FirstBitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
|
||||||
INSTALL(TARGETS FirstRealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
|
install(TARGETS FirstRealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
|
||||||
INSTALL(TARGETS exercise2.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
|
install(TARGETS exercise2.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,63 +2,63 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga)
|
include_directories(${EO_SRC_DIR}/src/ga)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils)
|
include_directories(${EO_SRC_DIR}/src/utils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries
|
### 2) Specify where CMake can find the libraries
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
IF(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
ENDIF(NOT WIN32 OR CYGWIN)
|
endif(NOT WIN32 OR CYGWIN)
|
||||||
|
|
||||||
# especially for Visual Studio
|
# especially for Visual Studio
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
if(WIN32 AND NOT CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
link_directories(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
endif(WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your targets
|
### 3) Define your targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
# no matter what is the OS, hopefully
|
# no matter what is the OS, hopefully
|
||||||
ADD_EXECUTABLE(SecondBitEA SecondBitEA.cpp)
|
add_executable(SecondBitEA SecondBitEA.cpp)
|
||||||
ADD_EXECUTABLE(SecondRealEA SecondRealEA.cpp)
|
add_executable(SecondRealEA SecondRealEA.cpp)
|
||||||
ADD_EXECUTABLE(exercise3.1 exercise3.1.cpp)
|
add_executable(exercise3.1 exercise3.1.cpp)
|
||||||
|
|
||||||
ADD_DEPENDENCIES(SecondBitEA ga eoutils eo)
|
add_dependencies(SecondBitEA ga eoutils eo)
|
||||||
ADD_DEPENDENCIES(SecondRealEA ga eoutils eo)
|
add_dependencies(SecondRealEA ga eoutils eo)
|
||||||
ADD_DEPENDENCIES(exercise3.1 ga eoutils eo)
|
add_dependencies(exercise3.1 ga eoutils eo)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 4) Optionnal
|
### 4) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(SECONDBITEA_VERSION ${GLOBAL_VERSION})
|
set(SECONDBITEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(SecondBitEA PROPERTIES VERSION "${SECONDBITEA_VERSION}")
|
set_target_properties(SecondBitEA PROPERTIES VERSION "${SECONDBITEA_VERSION}")
|
||||||
|
|
||||||
SET(SECONDREALEA_VERSION ${GLOBAL_VERSION})
|
set(SECONDREALEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(SecondRealEA PROPERTIES VERSION "${SECONDREALEA_VERSION}")
|
set_target_properties(SecondRealEA PROPERTIES VERSION "${SECONDREALEA_VERSION}")
|
||||||
|
|
||||||
SET(EXERCICE31_VERSION ${GLOBAL_VERSION})
|
set(EXERCICE31_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(exercise3.1 PROPERTIES VERSION "${EXERCICE31_VERSION}")
|
set_target_properties(exercise3.1 PROPERTIES VERSION "${EXERCICE31_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 5) Link the librairies for the targets
|
### 5) Link the librairies for the targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(SecondBitEA ga eoutils eo)
|
target_link_libraries(SecondBitEA ga eoutils eo)
|
||||||
TARGET_LINK_LIBRARIES(SecondRealEA ga eoutils eo)
|
target_link_libraries(SecondRealEA ga eoutils eo)
|
||||||
TARGET_LINK_LIBRARIES(exercise3.1 ga eoutils eo)
|
target_link_libraries(exercise3.1 ga eoutils eo)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 6) Configure project installation paths
|
### 6) Configure project installation paths
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INSTALL(TARGETS SecondBitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples)
|
install(TARGETS SecondBitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples)
|
||||||
INSTALL(TARGETS SecondRealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples)
|
install(TARGETS SecondRealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples)
|
||||||
INSTALL(TARGETS exercise3.1 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples)
|
install(TARGETS exercise3.1 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson3 COMPONENT examples)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,97 +2,97 @@
|
||||||
### 0) Copy the ESEA.param and RealEA.param files in the build directory for an easy use.
|
### 0) Copy the ESEA.param and RealEA.param files in the build directory for an easy use.
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
EXECUTE_PROCESS(
|
execute_process(
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param
|
${EO_SRC_DIR}/tutorial/Lesson4/ESEA.param
|
||||||
${EO_BIN_DIR}/tutorial/Lesson4/ESEA.param
|
${EO_BIN_DIR}/tutorial/Lesson4/ESEA.param
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param
|
${EO_SRC_DIR}/tutorial/Lesson4/RealEA.param
|
||||||
${EO_BIN_DIR}/tutorial/Lesson4/RealEA.param
|
${EO_BIN_DIR}/tutorial/Lesson4/RealEA.param
|
||||||
)
|
)
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# OLD_TARGETS
|
# OLD_TARGETS
|
||||||
##############
|
##############
|
||||||
#ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param)
|
#add_custom_target(param DEPENDS ${EO_SRC_DIR}/tutorial/Lesson4/ESEA.param)
|
||||||
#ADD_CUSTOM_COMMAND(
|
#add_custom_command(
|
||||||
# TARGET param
|
# TARGET param
|
||||||
# POST_BUILD
|
# POST_BUILD
|
||||||
# COMMAND ${CMAKE_COMMAND}
|
# COMMAND ${CMAKE_COMMAND}
|
||||||
# ARGS -E copy_if_different
|
# ARGS -E copy_if_different
|
||||||
# ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param
|
# ${EO_SRC_DIR}/tutorial/Lesson4/ESEA.param
|
||||||
# ${EO_BIN_DIR}/tutorial/Lesson4)
|
# ${EO_BIN_DIR}/tutorial/Lesson4)
|
||||||
#ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param)
|
#add_custom_target(param DEPENDS ${EO_SRC_DIR}/tutorial/Lesson4/RealEA.param)
|
||||||
#ADD_CUSTOM_COMMAND(
|
#add_custom_command(
|
||||||
# TARGET param
|
# TARGET param
|
||||||
# POST_BUILD
|
# POST_BUILD
|
||||||
# COMMAND ${CMAKE_COMMAND}
|
# COMMAND ${CMAKE_COMMAND}
|
||||||
# ARGS -E copy_if_different
|
# ARGS -E copy_if_different
|
||||||
# ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param
|
# ${EO_SRC_DIR}/tutorial/Lesson4/RealEA.param
|
||||||
# ${EO_BIN_DIR}/tutorial/Lesson4)
|
# ${EO_BIN_DIR}/tutorial/Lesson4)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/es)
|
include_directories(${EO_SRC_DIR}/src/es)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils)
|
include_directories(${EO_SRC_DIR}/src/utils)
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga)
|
include_directories(${EO_SRC_DIR}/src/ga)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries
|
### 2) Specify where CMake can find the libraries
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
IF(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
ENDIF(NOT WIN32 OR CYGWIN)
|
endif(NOT WIN32 OR CYGWIN)
|
||||||
|
|
||||||
# especially for Visual Studio
|
# especially for Visual Studio
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
if(WIN32 AND NOT CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
link_directories(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
endif(WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your targets
|
### 3) Define your targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
# no matter what is the OS, hopefully
|
# no matter what is the OS, hopefully
|
||||||
ADD_EXECUTABLE(BitEA BitEA.cpp)
|
add_executable(BitEA BitEA.cpp)
|
||||||
ADD_EXECUTABLE(RealEA RealEA.cpp)
|
add_executable(RealEA RealEA.cpp)
|
||||||
ADD_EXECUTABLE(ESEA ESEA.cpp)
|
add_executable(ESEA ESEA.cpp)
|
||||||
|
|
||||||
#ADD_DEPENDENCIES(BitEA es ga eo eoutils)
|
#add_dependencies(BitEA es ga eo eoutils)
|
||||||
#ADD_DEPENDENCIES(RealEA es ga eo eoutils)
|
#add_dependencies(RealEA es ga eo eoutils)
|
||||||
#ADD_DEPENDENCIES(ESEA es ga eo eoutils)
|
#add_dependencies(ESEA es ga eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 4) Optionnal
|
### 4) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(BITEA_VERSION ${GLOBAL_VERSION})
|
set(BITEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(BitEA PROPERTIES VERSION "${BITEA_VERSION}")
|
set_target_properties(BitEA PROPERTIES VERSION "${BITEA_VERSION}")
|
||||||
|
|
||||||
SET(REALEA_VERSION ${GLOBAL_VERSION})
|
set(REALEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(RealEA PROPERTIES VERSION "${REALEA_VERSION}")
|
set_target_properties(RealEA PROPERTIES VERSION "${REALEA_VERSION}")
|
||||||
|
|
||||||
SET(ESEA_VERSION ${GLOBAL_VERSION})
|
set(ESEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(ESEA PROPERTIES VERSION "${ESEA_VERSION}")
|
set_target_properties(ESEA PROPERTIES VERSION "${ESEA_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 5) Link the librairies for the targets
|
### 5) Link the librairies for the targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(BitEA es ga eo eoutils)
|
target_link_libraries(BitEA es ga eo eoutils)
|
||||||
TARGET_LINK_LIBRARIES(RealEA es ga eo eoutils)
|
target_link_libraries(RealEA es ga eo eoutils)
|
||||||
TARGET_LINK_LIBRARIES(ESEA es ga eo eoutils)
|
target_link_libraries(ESEA es ga eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 6) Configure project installation paths
|
### 6) Configure project installation paths
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INSTALL(TARGETS BitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples)
|
install(TARGETS BitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples)
|
||||||
INSTALL(TARGETS RealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples)
|
install(TARGETS RealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples)
|
||||||
INSTALL(TARGETS ESEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples)
|
install(TARGETS ESEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson4 COMPONENT examples)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,55 +2,55 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries
|
### 2) Specify where CMake can find the libraries
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
IF(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
ENDIF(NOT WIN32 OR CYGWIN)
|
endif(NOT WIN32 OR CYGWIN)
|
||||||
|
|
||||||
# especially for Visual Studio
|
# especially for Visual Studio
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
if(WIN32 AND NOT CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
link_directories(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
endif(WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your targets
|
### 3) Define your targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
# no matter what is the OS, hopefully
|
# no matter what is the OS, hopefully
|
||||||
ADD_EXECUTABLE(OneMaxEA OneMaxEA.cpp)
|
add_executable(OneMaxEA OneMaxEA.cpp)
|
||||||
ADD_EXECUTABLE(OneMaxLibEA OneMaxLibEA.cpp make_OneMax.cpp)
|
add_executable(OneMaxLibEA OneMaxLibEA.cpp make_OneMax.cpp)
|
||||||
|
|
||||||
ADD_DEPENDENCIES(OneMaxEA es ga eo eoutils)
|
add_dependencies(OneMaxEA es ga eo eoutils)
|
||||||
ADD_DEPENDENCIES(OneMaxLibEA es ga eo eoutils)
|
add_dependencies(OneMaxLibEA es ga eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 4) Optionnal
|
### 4) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(ONEMAXEA_VERSION ${GLOBAL_VERSION})
|
set(ONEMAXEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(OneMaxEA PROPERTIES VERSION "${ONEMAXEA_VERSION}")
|
set_target_properties(OneMaxEA PROPERTIES VERSION "${ONEMAXEA_VERSION}")
|
||||||
|
|
||||||
SET(ONEMAXLIBEA_VERSION ${GLOBAL_VERSION})
|
set(ONEMAXLIBEA_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(OneMaxLibEA PROPERTIES VERSION "${ONEMAXLIBEA_VERSION}")
|
set_target_properties(OneMaxLibEA PROPERTIES VERSION "${ONEMAXLIBEA_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 5) Link the librairies for the targets
|
### 5) Link the librairies for the targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(OneMaxEA es ga eo eoutils)
|
target_link_libraries(OneMaxEA es ga eo eoutils)
|
||||||
TARGET_LINK_LIBRARIES(OneMaxLibEA es ga eo eoutils)
|
target_link_libraries(OneMaxLibEA es ga eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 6) Configure project installation paths
|
### 6) Configure project installation paths
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INSTALL(TARGETS OneMaxEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples)
|
install(TARGETS OneMaxEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples)
|
||||||
INSTALL(TARGETS OneMaxLibEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples)
|
install(TARGETS OneMaxLibEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson5 COMPONENT examples)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -2,50 +2,50 @@
|
||||||
### 1) Include the sources
|
### 1) Include the sources
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
|
include_directories(${EO_SRC_DIR}/src)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 2) Specify where CMake can find the libraries
|
### 2) Specify where CMake can find the libraries
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
IF(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
|
link_directories(${EO_BIN_DIR}/lib)
|
||||||
ENDIF(NOT WIN32 OR CYGWIN)
|
endif(NOT WIN32 OR CYGWIN)
|
||||||
|
|
||||||
# especially for Visual Studio
|
# especially for Visual Studio
|
||||||
IF(WIN32 AND NOT CYGWIN)
|
if(WIN32 AND NOT CYGWIN)
|
||||||
LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
link_directories(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
|
||||||
ENDIF(WIN32 AND NOT CYGWIN)
|
endif(WIN32 AND NOT CYGWIN)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 3) Define your targets
|
### 3) Define your targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
ADD_EXECUTABLE(BinaryPSO BinaryPSO.cpp)
|
add_executable(BinaryPSO BinaryPSO.cpp)
|
||||||
ADD_EXECUTABLE(RealPSO RealPSO.cpp)
|
add_executable(RealPSO RealPSO.cpp)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 4) Optionnal
|
### 4) Optionnal
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SET(BINARYPSO_VERSION ${GLOBAL_VERSION})
|
set(BINARYPSO_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(BinaryPSO PROPERTIES VERSION "${BINARYPSO_VERSION}")
|
set_target_properties(BinaryPSO PROPERTIES VERSION "${BINARYPSO_VERSION}")
|
||||||
|
|
||||||
SET(REALPSO_VERSION ${GLOBAL_VERSION})
|
set(REALPSO_VERSION ${GLOBAL_VERSION})
|
||||||
SET_TARGET_PROPERTIES(RealPSO PROPERTIES VERSION "${REALPSO_VERSION}")
|
set_target_properties(RealPSO PROPERTIES VERSION "${REALPSO_VERSION}")
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 5) Link the librairies for the targets
|
### 5) Link the librairies for the targets
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(BinaryPSO eo eoutils)
|
target_link_libraries(BinaryPSO eo eoutils)
|
||||||
TARGET_LINK_LIBRARIES(RealPSO eo eoutils)
|
target_link_libraries(RealPSO eo eoutils)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 6) Configure project installation paths
|
### 6) Configure project installation paths
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INSTALL(TARGETS BinaryPSO RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples)
|
install(TARGETS BinaryPSO RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples)
|
||||||
INSTALL(TARGETS RealPSO RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples)
|
install(TARGETS RealPSO RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson6 COMPONENT examples)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue