diff --git a/CMakeLists.txt b/CMakeLists.txt index bd39a7fbe..ce8097251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,9 +22,13 @@ if("${CMAKE_CXX_COMPILER}" STREQUAL "" OR "${CMAKE_C_COMPILER}" STREQUAL "") endif() ## Versioning -set(VERSION_MAJOR 2) -set(VERSION_MINOR 0) -set(VERSION_PATCH 0) +set(VERSION_MAJOR 2 CACHE STRING "Major version number" ) +set(VERSION_MINOR 1 CACHE STRING "Minor version number" ) +set(VERSION_PATCH 0 CACHE STRING "Patch version number" ) + +SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" CACHE INTERNAL "Package version" FORCE) +SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}${PROJECT_VERSION_MISC}" CACHE INTERNAL "Global version" FORCE) +SET(GLOBAL_VERSION "${VERSION}") ###################################################################################### ### 2) Check dependencies @@ -51,25 +55,34 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Target.cmake) ###################################################################################### ## Paths -set(EO_SRC_DIR "${CMAKE_SOURCE_DIR}/eo" CACHE PATH "ParadisEO-EO source directory" FORCE) -set(EO_BIN_DIR "${CMAKE_BINARY_DIR}/eo" CACHE PATH "ParadisEO-EO binary directory" FORCE) - -set(MO_SRC_DIR "${CMAKE_SOURCE_DIR}/mo" CACHE PATH "ParadisEO-MO source directory" FORCE) -set(MO_BIN_DIR "${CMAKE_BINARY_DIR}/mo" CACHE PATH "ParadisEO-MO binary directory" FORCE) +set( EO_SRC_DIR "${CMAKE_SOURCE_DIR}/eo" CACHE INTERNAL "ParadisEO-EO source directory" FORCE) +set( EO_BIN_DIR "${CMAKE_BINARY_DIR}/eo" CACHE INTERNAL "ParadisEO-EO binary directory" FORCE) -set(MOEO_SRC_DIR "${CMAKE_SOURCE_DIR}/moeo" CACHE PATH "ParadisEO-MOEO source directory" FORCE) -set(MOEO_BIN_DIR "${CMAKE_BINARY_DIR}/moeo" CACHE PATH "ParadisEO-MOEO binary directory" FORCE) +set( EDO_SRC_DIR "${CMAKE_SOURCE_DIR}/edo" CACHE INTERNAL "ParadisEO-EDO source directory" FORCE) +set( EDO_BIN_DIR "${CMAKE_BINARY_DIR}/edo" CACHE INTERNAL "ParadisEO-EDO binary directory" FORCE) -set(SMP_SRC_DIR "${CMAKE_SOURCE_DIR}/smp" CACHE PATH "ParadisEO-SMP source directory" FORCE) -set(SMP_BIN_DIR "${CMAKE_BINARY_DIR}/smp" CACHE PATH "ParadisEO-SMP binary directory" FORCE) +set( MO_SRC_DIR "${CMAKE_SOURCE_DIR}/mo" CACHE INTERNAL "ParadisEO-MO source directory" FORCE) +set( MO_BIN_DIR "${CMAKE_BINARY_DIR}/mo" CACHE INTERNAL "ParadisEO-MO binary directory" FORCE) -set(PEO_SRC_DIR "${CMAKE_SOURCE_DIR}/peo" CACHE PATH "ParadisEO-PEO source directory" FORCE) -set(PEO_BIN_DIR "${CMAKE_BINARY_DIR}/peo" CACHE PATH "ParadisEO-PEO binary directory" FORCE) +set(MOEO_SRC_DIR "${CMAKE_SOURCE_DIR}/moeo" CACHE INTERNAL "ParadisEO-MOEO source directory" FORCE) +set(MOEO_BIN_DIR "${CMAKE_BINARY_DIR}/moeo" CACHE INTERNAL "ParadisEO-MOEO binary directory" FORCE) -set(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/problems" CACHE PATH "Problems dependant source directory" FORCE) +set( SMP_SRC_DIR "${CMAKE_SOURCE_DIR}/smp" CACHE INTERNAL "ParadisEO-SMP source directory" FORCE) +set( SMP_BIN_DIR "${CMAKE_BINARY_DIR}/smp" CACHE INTERNAL "ParadisEO-SMP binary directory" FORCE) + +#set( PEO_SRC_DIR "${CMAKE_SOURCE_DIR}/peo" CACHE INTERNAL "ParadisEO-PEO source directory" FORCE) +#set( PEO_BIN_DIR "${CMAKE_BINARY_DIR}/peo" CACHE INTERNAL "ParadisEO-PEO binary directory" FORCE) + +set(PROBLEMS_SRC_DIR "${CMAKE_SOURCE_DIR}/problems" CACHE INTERNAL "Problems dependant source directory" FORCE) set(CMAKE_BASE_SOURCE_DIR ${CMAKE_SOURCE_DIR}) +set(EO_ONLY "false" CACHE BOOL "Only build EO and not the other modules") +set(EDO "true" CACHE BOOL "Build the EDO module") +set(EDO_USE_LIB "Eigen3" CACHE STRING "Which library to use to build EDO ('UBlas' or 'Eigen3')") +set(SMP "false" CACHE BOOL "Build the SMP module") +#set(PEO "true" CACHE BOOL "Build the PEO module") + ## EO Module set(EO_MODULE_NAME "Evolving Object") set(CMAKE_SOURCE_DIR ${EO_SRC_DIR}) @@ -77,28 +90,35 @@ add_subdirectory(${CMAKE_SOURCE_DIR}) if(NOT EO_ONLY) ## MO Module - set(MO_MODULE_NAME "ParadisEO-MO") + set(MO_MODULE_NAME "Moving objects") set(CMAKE_SOURCE_DIR ${MO_SRC_DIR}) add_subdirectory(${MO_SRC_DIR}) + ## EDO Module + if(EDO) + set(EDO_MODULE_NAME "Evolving Distribution Objects") + set(CMAKE_SOURCE_DIR ${EDO_SRC_DIR}) + add_subdirectory(${EDO_SRC_DIR}) + endif() + ## MOEO Module - set(MOEO_MODULE_NAME "ParadisEO-MOEO") + set(MOEO_MODULE_NAME "Multi-Objectives EO") set(CMAKE_SOURCE_DIR ${MOEO_SRC_DIR}) add_subdirectory(${MOEO_SRC_DIR}) - + ## SMP Module if(SMP) - set(SMP_MODULE_NAME "ParadisEO-SMP") + set(SMP_MODULE_NAME "Symmetric Multi-Processing") set(CMAKE_SOURCE_DIR ${SMP_SRC_DIR}) add_subdirectory(${SMP_SRC_DIR}) endif() - + ## PEO Module - if(PEO) - set(PEO_MODULE_NAME "ParadisEO-PEO") - set(CMAKE_SOURCE_DIR ${PEO_SRC_DIR}) - add_subdirectory(${PEO_SRC_DIR}) - endif() + # if(PEO) + # set(PEO_MODULE_NAME "Parallel-EO") + # set(CMAKE_SOURCE_DIR ${PEO_SRC_DIR}) + # add_subdirectory(${PEO_SRC_DIR}) + #endif() endif() ###################################################################################### diff --git a/INSTALL b/INSTALL index 0deb56950..9734fc95a 100644 --- a/INSTALL +++ b/INSTALL @@ -135,6 +135,17 @@ To enable the compilation of the PEO module, just add -DPEO=true to CMake : > cmake .. -DPEO=true +------------------------------------------------------------------------------------------ +2.3 EDO MODULE +------------------------------------------------------------------------------------------ + +WARNING : The EDO module requires either the Boost::ublas or the Eigen3 library. + +To enable the compilation of the EDO module, just add -DEDO=true to CMake : + +> cmake .. -DEDO=true + + ------------------------------------------------------------------------------------------ 3. DOCUMENTATION ------------------------------------------------------------------------------------------ @@ -145,6 +156,7 @@ Targets are : doc for all documentations doc-eo for building EO documentation doc-mo for MO +doc-edo for MO doc-moeo for MOEO doc-smp for SMP diff --git a/cmake/Config.cmake b/cmake/Config.cmake index 9f390e24b..121f2bbb6 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -51,13 +51,14 @@ endif(SMP) ###################################################################################### if(INSTALL_TYPE STREQUAL full) - set(ENABLE_CMAKE_EXAMPLE "true" CACHE PATH "ParadisEO examples") - set(ENABLE_CMAKE_TESTING "true" CACHE PATH "ParadisEO tests") + set(ENABLE_CMAKE_EXAMPLE "true" CACHE BOOL "ParadisEO examples") + set(ENABLE_CMAKE_TESTING "true" CACHE BOOL "ParadisEO tests") elseif(INSTALL_TYPE STREQUAL min OR NOT DEFINED INSTALL_TYPE) - set(ENABLE_CMAKE_EXAMPLE "false" CACHE PATH "ParadisEO examples") - set(ENABLE_CMAKE_TESTING "false" CACHE PATH "ParadisEO tests") + set(ENABLE_CMAKE_EXAMPLE "false" CACHE BOOL "ParadisEO examples") + set(ENABLE_CMAKE_TESTING "false" CACHE BOOL "ParadisEO tests") endif() + ###################################################################################### ### 2) Define profiling flags ###################################################################################### @@ -65,7 +66,7 @@ endif() if(PROFILING) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg --coverage" CACHE STRING "" FORCE) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE) - set(ENABLE_CMAKE_TESTING "true" CACHE STRING "" FORCE) + set(ENABLE_CMAKE_TESTING "true" CACHE BOOL "" FORCE) endif(PROFILING) ###################################################################################### @@ -81,7 +82,7 @@ endif(ENABLE_CMAKE_TESTING) ### 5) Build examples ? ###################################################################################### -set(ENABLE_CMAKE_EXAMPLE "true" CACHE PATH "ParadisEO examples") +set(ENABLE_CMAKE_EXAMPLE "true" CACHE BOOL "ParadisEO examples") ###################################################################################### ### 6) Determine prefix for installation diff --git a/cmake/Package.cmake b/cmake/Package.cmake index 27b7cab49..f989e45d7 100644 --- a/cmake/Package.cmake +++ b/cmake/Package.cmake @@ -52,7 +52,7 @@ set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README") set(CPACK_PACKAGE_DESCRIPTION "ParadisEO is a white-box object-oriented framework dedicated to the flexible design of metaheuristics. This template-based, ANSI-C++ compliant computation library is portable across both Windows system and sequential platforms (Unix, Linux, Mac OS X, etc.). ParadisEO is distributed under the CeCill license and can be used under several environments.") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Software Framework for Metaheuristics") -set(CPACK_PACKAGE_VENDOR "Inria") +set(CPACK_PACKAGE_VENDOR "Inria/Thales") set(CPACK_PACKAGE_CONTACT "paradiseo-help@lists.gforge.inria.fr") set(CPACK_PACKAGE_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) set(CPACK_STRIP_FILES ${PACKAGE_NAME}) diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 9a07cd619..18369349a 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -1,51 +1,5 @@ -############################################################################ -########## -### 1) If you want to set your own variables in install.cmake and avoid the cmd line -###################################################################################### -INCLUDE(install.cmake OPTIONAL) - -###################################################################################### - -###################################################################################### -### 2) Project properties -###################################################################################### - -# Checks cmake version compatibility -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -PROJECT(EDO) - -SET(PROJECT_VERSION_MAJOR 0) -SET(PROJECT_VERSION_MINOR 1) -SET(PROJECT_VERSION_PATCH 0) -SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") - -###################################################################################### - - -###################################################################################### -### 3) Include useful features -###################################################################################### - -# include useful features for cmake -SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/cmake/modules) - - -INCLUDE(FindDoxygen) -INCLUDE(FindPkgConfig) - -IF( WITH_BOOST AND WITH_EIGEN ) - MESSAGE( "ERROR: You have to choose between Boost:ublas and Eigen, you cannot compile with both libraries" ) - SET(IS_FATAL 1) -ELSEIF( NOT WITH_BOOST AND NOT WITH_EIGEN ) - #MESSAGE( "WARNING: Boost:ublas and Eigen are both deactivated, some features may lack." ) - # FIXME ideally, we would have a minimal implementation with STL vectors… - MESSAGE( "FIXME: Boost:ublas and Eigen are both deactivated, too much features will lack, you should choose one." ) - SET(IS_FATAL 1) -ENDIF() - -IF(WITH_BOOST) +IF(EDO_USE_LIB STREQUAL "UBlas") FIND_PACKAGE(Boost 1.33.0) IF( Boost_FOUND ) INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ) @@ -54,7 +8,7 @@ IF(WITH_BOOST) MESSAGE( "ERROR: You asked for Boost:ublas but it has nost been found." ) SET(IS_FATAL 1) ENDIF() -ELSEIF( WITH_EIGEN ) +ELSEIF( EDO_USE_LIB STREQUAL "Eigen3" ) # FIXME FindEigen3.cmake does not work #find_package(Eigen3) #include_directories(EIGEN3_INCLUDE_DIR) @@ -65,100 +19,33 @@ ELSEIF( WITH_EIGEN ) INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} ) ADD_DEFINITIONS( -DWITH_EIGEN ) ELSE() - MESSAGE( "ERROR: You asked for Eigen but it has nost been found." ) + MESSAGE( "ERROR: You asked for Eigen3 but it has nost been found." ) SET(IS_FATAL 1) ENDIF() + +ELSE() + # FIXME ideally, we would have a minimal implementation with STL vectors… + MESSAGE( "You must set EDO_USE_LIB to either 'UBlas' or 'Eigen3'." ) + SET(IS_FATAL 1) ENDIF() -FIND_PACKAGE(EO) - -INCLUDE_DIRECTORIES( - ${EO_INCLUDE_DIRS} - ${MO_INCLUDE_DIRS} -) - -LINK_DIRECTORIES( - ${EO_LIBRARY_DIRS} -) ###################################################################################### - - -###################################################################################### -### 4) Include header files path +### Include subdirectories ###################################################################################### -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR}/src -) +add_subdirectory(doc) +add_subdirectory(src) -###################################################################################### +if(ENABLE_CMAKE_TESTING) + add_subdirectory(test) +endif(ENABLE_CMAKE_TESTING) +if(ENABLE_CMAKE_EXAMPLE) + if(${CMAKE_VERBOSE_MAKEFILE}) + message("EDO examples:") + endif(${CMAKE_VERBOSE_MAKEFILE}) + add_subdirectory(tutorial) + add_subdirectory(application) +endif(ENABLE_CMAKE_EXAMPLE) -###################################################################################### -### 5) Set compiler definitions -###################################################################################### - -IF(UNIX) - # enable warnings - ADD_DEFINITIONS( -Wall -W -Wextra ) - # ADD_DEFINITIONS( -Weffc++) - # ADD_DEFINITIONS( -g3 ) -ENDIF() - -###################################################################################### - - -###################################################################################### -### 6) Prepare some variables for CMAKE usage -###################################################################################### - -# Empty source files, because we want to build a library -SET(SAMPLE_SRCS) - -###################################################################################### - - -###################################################################################### -### 7) Now where we go ? -###################################################################################### - -ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(application) -ADD_SUBDIRECTORY(test) -ADD_SUBDIRECTORY(doc) - -###################################################################################### - - - -###################################################################################### -### 8) Create executable, link libraries and prepare target -###################################################################################### - -SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) - -LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}) - -ADD_LIBRARY(edo STATIC ${SAMPLE_SRCS}) -INSTALL(TARGETS edo ARCHIVE DESTINATION lib COMPONENT libraries) - -###################################################################################### - - -###################################################################################### -### 9) Install pkg-config config file for EO -###################################################################################### - -INSTALL(FILES edo.pc DESTINATION lib/pkgconfig COMPONENT headers) - -###################################################################################### - - -###################################################################################### -### 10) Include packaging -###################################################################################### - -INCLUDE(Packaging.cmake) - -###################################################################################### diff --git a/edo/doc/CMakeLists.txt b/edo/doc/CMakeLists.txt index 6c7b15937..317ea767b 100644 --- a/edo/doc/CMakeLists.txt +++ b/edo/doc/CMakeLists.txt @@ -1,35 +1,40 @@ -####################################################################################### -### Doc generation using Doxygen -####################################################################################### +###################################################################################### +### 0) Documentation +###################################################################################### -IF (DOXYGEN_FOUND) - SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "documentation directory") - SET(DOC_CONFIG_FILE "doxyfile" CACHE PATH "documentation configuration file") - # define the doc target - IF (DOXYGEN_EXECUTABLE) - ADD_CUSTOM_TARGET(doc - COMMAND ${DOXYGEN_EXECUTABLE} ${DOC_CONFIG_FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - ENDIF (DOXYGEN_EXECUTABLE) - - # configure doxyfile file - CONFIGURE_FILE( - "${CMAKE_CURRENT_SOURCE_DIR}/${DOC_CONFIG_FILE}.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/${DOC_CONFIG_FILE}" +if(DOXYGEN_FOUND) + # Directory where the generation will be launched + set(EDO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "Documentation directory" FORCE) + # Name of the doxygene configuration file + set(EDO_DOC_CONFIG_FILE "edo.doxyfile" CACHE INTERNAL "Documentation configuration file") + if(DOXYGEN_EXECUTABLE) + # Creating the custom target + if(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + add_custom_target(doc-edo + COMMAND ${DOXYGEN_EXECUTABLE} ${EDO_DOC_CONFIG_FILE} 2> /dev/null > /dev/null + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + else(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + add_custom_target(doc-edo + COMMAND ${DOXYGEN_EXECUTABLE} ${EDO_DOC_CONFIG_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + endif(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) + endif(DOXYGEN_EXECUTABLE) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${EDO_DOC_CONFIG_FILE}.cmake" + "${EDO_DOC_DIR}/${EDO_DOC_CONFIG_FILE}") + install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DESTINATION local/share${INSTALL_SUB_DIR}/edo COMPONENT doc + PATTERN "CMakeFiles" EXCLUDE + PATTERN "cmake_install.cmake" EXCLUDE + PATTERN "CTestTestfile.cmake" EXCLUDE + PATTERN "Makefile" EXCLUDE + PATTERN "edo.cfg" EXCLUDE + PATTERN "edo.doxytag" EXCLUDE ) +else(DOXYGEN_FOUND) + message(STATUS "Unable to generate the documentation, Doxygen package not found") +endif(DOXYGEN_FOUND) - INSTALL( - DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DESTINATION share/edo COMPONENT libraries - PATTERN "CMakeFiles" EXCLUDE - PATTERN "cmake_install.cmake" EXCLUDE - PATTERN "Makefile" EXCLUDE - PATTERN "doxyfile" EXCLUDE - ) -ELSE (DOXYGEN_FOUND) - MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found") -ENDIF (DOXYGEN_FOUND) - -####################################################################################### diff --git a/edo/doc/doxyfile.cmake b/edo/doc/edo.doxyfile.cmake similarity index 100% rename from edo/doc/doxyfile.cmake rename to edo/doc/edo.doxyfile.cmake diff --git a/edo/src/CMakeLists.txt b/edo/src/CMakeLists.txt index 6b2176f56..c013c133e 100644 --- a/edo/src/CMakeLists.txt +++ b/edo/src/CMakeLists.txt @@ -2,14 +2,30 @@ ### 1) Set all needed source files for the project ###################################################################################### -FILE(GLOB HDRS *.h edo) -INSTALL(FILES ${HDRS} DESTINATION include/edo COMPONENT headers) +include_directories(${EO_SRC_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -FILE(GLOB SOURCES *.cpp) +set(EDO_LIB_OUTPUT_PATH ${EDO_BINARY_DIR}/lib) +set(LIBRARY_OUTPUT_PATH ${EDO_LIB_OUTPUT_PATH}) -SET(SAMPLE_SRCS ${SOURCES} PARENT_SCOPE) ###################################################################################### +### 3) Look for headers +###################################################################################### + +file(GLOB HDRS edo) +install(FILES ${HDRS} DESTINATION local/include${INSTALL_SUB_DIR}/edo COMPONENT headers) + + +###################################################################################### +### 4) Install directories +###################################################################################### + +install(DIRECTORY utils + DESTINATION local/include${INSTALL_SUB_DIR}/moeo + COMPONENT headers + FILES_MATCHING PATTERN "*.h" + ) ###################################################################################### diff --git a/edo/src/utils/CMakeLists.txt b/edo/src/utils/CMakeLists.txt index 490adc1a0..fdd552e29 100644 --- a/edo/src/utils/CMakeLists.txt +++ b/edo/src/utils/CMakeLists.txt @@ -1,14 +1,21 @@ ###################################################################################### -### 1) Set all needed source files for the project +### 1) Include the sources ###################################################################################### -FILE(GLOB SOURCES *.cpp) - -SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) -ADD_LIBRARY(edoutils ${SOURCES}) -INSTALL(TARGETS edoutils ARCHIVE DESTINATION lib COMPONENT libraries) - -FILE(GLOB HDRS *.h utils) -INSTALL(FILES ${HDRS} DESTINATION include/edo/utils COMPONENT headers) +include_directories(${EO_SRC_DIR}/src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### +### 2) Define the target +###################################################################################### + +set(EDOUTILS_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib) +set(LIBRARY_OUTPUT_PATH ${EDOUTILS_LIB_OUTPUT_PATH}) + +file(GLOB SOURCES *.cpp) +add_library(edoutils ${SOURCES}) +install(TARGETS edoutils ARCHIVE DESTINATION local/${LIB} COMPONENT libraries) + +set(EDOUTILS_VERSION ${GLOBAL_VERSION}) +set_target_properties(edoutils PROPERTIES VERSION "${EDOUTILS_VERSION}") + diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index 9b0050e27..eef07d615 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -1,69 +1,31 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -###################################################################################### -### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line -###################################################################################### - -#INCLUDE(eo-conf.cmake OPTIONAL) - -###################################################################################### -###################################################################################### -### 1) Main project config -###################################################################################### +##################################################################################### +### Include required modules / configuration files +##################################################################################### -# set the project namef and other variables -PROJECT(EO) - -# CMake > 2.8 is needed, because of the FindOpenMP feature -#cmake_minimum_required(VERSION 2.8) - -#SET(PROJECT_VERSION_MAJOR 1) -#SET(PROJECT_VERSION_MINOR 1) -#SET(PROJECT_VERSION_PATCH 1) -SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" CACHE STRING "Package version" FORCE) -SET(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}${PROJECT_VERSION_MISC}" CACHE STRING "Global version" FORCE) -SET(GLOBAL_VERSION "${VERSION}") - -SET(PACKAGE_BUGREPORT "eodev-help@sourceforge.net" CACHE STRING "Package bug report" FORCE) -SET(PACKAGE_NAME "Evolving Objects" CACHE STRING "Package name" FORCE) -SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}"CACHE STRING "Package string full name" FORCE) -SET(PACKAGE_TARNAME "eo" CACHE STRING "Package tar name" FORCE) - -# regular expression checking -INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") - -# set a language for the entire project. -ENABLE_LANGUAGE(CXX) +# For eo::mpi ENABLE_LANGUAGE(C) -###################################################################################### - - -##################################################################################### -### 2) Include required modules / configuration files -##################################################################################### - +# For openmp parallel FIND_PACKAGE(OpenMP) IF(OPENMP_FOUND) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") ENDIF() -INCLUDE(CMakeBackwardCompatibilityCXX) - -INCLUDE(FindDoxygen) - INCLUDE(FindGnuplot) -INCLUDE(CheckLibraryExists) +# Set a special flag if the environment is windows (should do the same in a config.g file) +IF (WIN32) + ADD_DEFINITIONS(-D_WINDOWS=1) +ENDIF (WIN32) -IF(UNIX) - INCLUDE(ConfigureChecks.cmake) -ENDIF(UNIX) -INCLUDE(Dart OPTIONNAL) + +##################################################################################### +### Include required modules / configuration files +##################################################################################### # now create config headers CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) @@ -71,69 +33,25 @@ CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) # now create config install_symlink script file CONFIGURE_FILE(install_symlink.py.cmake ${CMAKE_CURRENT_BINARY_DIR}/install_symlink.py) -# now create PKGBUILD file for archlinux package manager -CONFIGURE_FILE(PKGBUILD.cmake ${CMAKE_CURRENT_BINARY_DIR}/PKGBUILD) - -# Set a special flag if the environment is windows (should do the same in a config.g file) -IF (WIN32) - ADD_DEFINITIONS(-D_WINDOWS=1) -ENDIF (WIN32) ###################################################################################### - +### Include subdirectories ###################################################################################### -###################################################################################### -### compilation of examples? -###################################################################################### +add_subdirectory(doc) +add_subdirectory(src) -#SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters file?") +if(ENABLE_CMAKE_TESTING) + add_subdirectory(test) +endif(ENABLE_CMAKE_TESTING) -###################################################################################### +if(ENABLE_CMAKE_EXAMPLE) + if(${CMAKE_VERBOSE_MAKEFILE}) + message("EO examples:") + endif(${CMAKE_VERBOSE_MAKEFILE}) + add_subdirectory(tutorial) + add_subdirectory(app) +endif(ENABLE_CMAKE_EXAMPLE) -###################################################################################### -### 4) Test config -###################################################################################### - -#IF (ENABLE_CMAKE_TESTING) -# ENABLE_TESTING() -#ENDIF (ENABLE_CMAKE_TESTING) - -###################################################################################### - - -###################################################################################### -### 5) Where must cmake go now ? -###################################################################################### - -#ADD_SUBDIRECTORY(app) -ADD_SUBDIRECTORY(doc) -ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(test) -ADD_SUBDIRECTORY(tutorial) - -###################################################################################### - - -###################################################################################### -### 6) Install pkg-config config file for EO -###################################################################################### - -SET(PCPREFIX "/usr") -SET(PCFLAGS "-leoutils -leo -les -lga -lcma -lgcov") -SET(PCINCLUDEDIR "eo") -CONFIGURE_FILE(pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/eo.pc) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/eo.pc DESTINATION local/${LIB}/pkgconfig COMPONENT headers) - -###################################################################################### - - -###################################################################################### -### 7) Include packaging -###################################################################################### - -#INCLUDE(Packaging.cmake) - -###################################################################################### diff --git a/eo/app/gprop/CMakeLists.txt b/eo/app/gprop/CMakeLists.txt index e37af2e5f..d0e71e9a0 100644 --- a/eo/app/gprop/CMakeLists.txt +++ b/eo/app/gprop/CMakeLists.txt @@ -9,7 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Specify where CMake can find the libraries (mandatory: before 3) ) ###################################################################################### -LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ###################################################################################### ### 3) Define your target(s): just an executable here diff --git a/eo/app/gpsymreg/CMakeLists.txt b/eo/app/gpsymreg/CMakeLists.txt index 1bb258678..893ac3b8b 100644 --- a/eo/app/gpsymreg/CMakeLists.txt +++ b/eo/app/gpsymreg/CMakeLists.txt @@ -9,7 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Specify where CMake can find the libraries (mandatory: before 3) ) ###################################################################################### -LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ###################################################################################### ### 3) Define your target(s): just an executable here diff --git a/eo/app/mastermind/CMakeLists.txt b/eo/app/mastermind/CMakeLists.txt index 6fde0887c..b76bc0d4e 100644 --- a/eo/app/mastermind/CMakeLists.txt +++ b/eo/app/mastermind/CMakeLists.txt @@ -9,7 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Specify where CMake can find the libraries (mandatory: before 3) ) ###################################################################################### -LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ###################################################################################### ### 3) Define your target(s): just an executable here diff --git a/eo/doc/CMakeLists.txt b/eo/doc/CMakeLists.txt index ac8c13ab2..d0ffa23e0 100644 --- a/eo/doc/CMakeLists.txt +++ b/eo/doc/CMakeLists.txt @@ -3,16 +3,16 @@ ########################################################################################## IF (DOXYGEN_FOUND) - SET(DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "EO documentation directory") - SET(EO_DOC_CONFIG_FILE "eo.cfg" CACHE PATH "EO documentation configuration file") + SET(EO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "EO documentation directory" FORCE) + SET(EO_DOC_CONFIG_FILE "eo.doxyfile" CACHE INTERNAL "EO documentation configuration file") # Copy necessary doc files - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/index.h ${DOC_DIR}/index.h COPYONLY) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/index.h ${EO_DOC_DIR}/index.h COPYONLY) FILE(GLOB header_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.htm*) FILE(GLOB pdf_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.pdf) FILE(GLOB jpg_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.jpg) FOREACH (file ${header_files} ${pdf_files} ${jpg_files}) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} ${DOC_DIR}/${file} COPYONLY) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} ${EO_DOC_DIR}/${file} COPYONLY) ENDFOREACH (file) # define the doc target diff --git a/eo/doc/eo.cfg.cmake b/eo/doc/eo.doxyfile.cmake similarity index 100% rename from eo/doc/eo.cfg.cmake rename to eo/doc/eo.doxyfile.cmake diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt index 7042e065e..283fd838e 100644 --- a/eo/src/CMakeLists.txt +++ b/eo/src/CMakeLists.txt @@ -2,16 +2,16 @@ ### 1) Include the sources ###################################################################################### -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### ### 2) Define the eo target ###################################################################################### -SET(EO_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) -SET(LIBRARY_OUTPUT_PATH ${EO_LIB_OUTPUT_PATH}) +set(EO_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib) +set(LIBRARY_OUTPUT_PATH ${EO_LIB_OUTPUT_PATH}) -SET(EO_SOURCES +set(EO_SOURCES eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp @@ -20,35 +20,36 @@ SET(EO_SOURCES eoSIGContinue.cpp ) -ADD_LIBRARY(eo STATIC ${EO_SOURCES}) -INSTALL(TARGETS eo ARCHIVE DESTINATION local/${LIB} COMPONENT libraries) - -FILE(GLOB HDRS *.h eo) -INSTALL(FILES ${HDRS} DESTINATION local/include${INSTALL_SUB_DIR}/eo COMPONENT headers) - -INSTALL(DIRECTORY do es ga gp other utils - DESTINATION local/include${INSTALL_SUB_DIR}/eo - COMPONENT headers - FILES_MATCHING PATTERN "*.h" PATTERN "checkpointing" PATTERN external_eo - ) +add_library(eo STATIC ${EO_SOURCES}) ###################################################################################### ### 3) Optionnal: define your target(s)'s version: no effect for windows ###################################################################################### -SET(EO_VERSION ${GLOBAL_VERSION}) -SET_TARGET_PROPERTIES(eo PROPERTIES VERSION "${EO_VERSION}") +set(EO_VERSION ${GLOBAL_VERSION}) +set_target_properties(eo PROPERTIES VERSION "${EO_VERSION}") + +install(TARGETS eo ARCHIVE DESTINATION local/${LIB} COMPONENT libraries) + +file(GLOB HDRS *.h eo) +install(FILES ${HDRS} DESTINATION local/include${INSTALL_SUB_DIR}/eo COMPONENT headers) + +install(DIRECTORY do es ga gp other utils + DESTINATION local/include${INSTALL_SUB_DIR}/eo + COMPONENT headers + FILES_MATCHING PATTERN "*.h" PATTERN "checkpointing" PATTERN external_eo + ) ###################################################################################### ### 4) Where must cmake go now ? ###################################################################################### -ADD_SUBDIRECTORY(es) -ADD_SUBDIRECTORY(ga) -ADD_SUBDIRECTORY(utils) +add_subdirectory(es) +add_subdirectory(ga) +add_subdirectory(utils) -IF(ENABLE_PYEO) - ADD_SUBDIRECTORY(pyeo) -ENDIF(ENABLE_PYEO) +if(ENABLE_PYEO) + add_subdirectory(pyeo) +endif(ENABLE_PYEO) ###################################################################################### diff --git a/eo/src/es/CMakeLists.txt b/eo/src/es/CMakeLists.txt index b71260fb5..77c54f6e0 100644 --- a/eo/src/es/CMakeLists.txt +++ b/eo/src/es/CMakeLists.txt @@ -9,8 +9,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Define the es and cma targets ###################################################################################### -SET(ES_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) -SET(CMA_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(ES_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 diff --git a/eo/src/ga/CMakeLists.txt b/eo/src/ga/CMakeLists.txt index a463735c1..f1dcca276 100644 --- a/eo/src/ga/CMakeLists.txt +++ b/eo/src/ga/CMakeLists.txt @@ -9,7 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Define the ga target ###################################################################################### -SET(GA_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(GA_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${GA_LIB_OUTPUT_PATH}) SET(GA_SOURCES diff --git a/eo/src/mpi/CMakeLists.txt b/eo/src/mpi/CMakeLists.txt index 00a338777..a94d3af95 100644 --- a/eo/src/mpi/CMakeLists.txt +++ b/eo/src/mpi/CMakeLists.txt @@ -9,7 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Define the eompi target ###################################################################################### -SET(EOMPI_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(EOMPI_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${EOMPI_LIB_OUTPUT_PATH}) SET(EOMPI_SOURCES @@ -20,10 +20,10 @@ SET(EOMPI_SOURCES ) ADD_LIBRARY(eompi STATIC ${EOMPI_SOURCES}) -INSTALL(TARGETS eompi ARCHIVE DESTINATION lib COMPONENT libraries) +INSTALL(TARGETS eompi ARCHIVE DESTINATION local/${LIB} COMPONENT libraries) FILE(GLOB HDRS *.h) -INSTALL(FILES ${HDRS} DESTINATION include/eo/mpi COMPONENT headers) +INSTALL(FILES ${HDRS} DESTINATION local/include${INSTALL_SUB_DIR}/eo/mpi COMPONENT headers) ###################################################################################### ### 3) Optionnal diff --git a/eo/src/serial/CMakeLists.txt b/eo/src/serial/CMakeLists.txt index 5358b30a4..937044974 100644 --- a/eo/src/serial/CMakeLists.txt +++ b/eo/src/serial/CMakeLists.txt @@ -9,7 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Define the eoserial target ###################################################################################### -SET(EOSERIAL_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(EOSERIAL_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${EOSERIAL_LIB_OUTPUT_PATH}) SET(EOSERIAL_SOURCES diff --git a/eo/src/utils/CMakeLists.txt b/eo/src/utils/CMakeLists.txt index ccb7efe81..f66406880 100644 --- a/eo/src/utils/CMakeLists.txt +++ b/eo/src/utils/CMakeLists.txt @@ -9,7 +9,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Define the ga target ###################################################################################### -SET(EOUTILS_LIB_OUTPUT_PATH ${EO_BINARY_DIR}/lib) +SET(EOUTILS_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${EOUTILS_LIB_OUTPUT_PATH}) SET(EOUTILS_SOURCES diff --git a/eo/test/CMakeLists.txt b/eo/test/CMakeLists.txt index ed9575e85..3fba65f4c 100644 --- a/eo/test/CMakeLists.txt +++ b/eo/test/CMakeLists.txt @@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Specify where CMake can find the libraries ###################################################################################### -LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ###################################################################################### ### 3) Define your targets and link the librairies diff --git a/eo/test/mpi/CMakeLists.txt b/eo/test/mpi/CMakeLists.txt index fe7ecb0fd..525508117 100644 --- a/eo/test/mpi/CMakeLists.txt +++ b/eo/test/mpi/CMakeLists.txt @@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ### 2) Specify where CMake can find the libraries ###################################################################################### -LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) +LINK_DIRECTORIES(${EO_BIN_DIR}/lib) LINK_DIRECTORIES(${MPI_DIR}/lib) ###################################################################################### diff --git a/eo/tutorial/Lesson1/CMakeLists.txt b/eo/tutorial/Lesson1/CMakeLists.txt index bcad406f5..a80b3f404 100644 --- a/eo/tutorial/Lesson1/CMakeLists.txt +++ b/eo/tutorial/Lesson1/CMakeLists.txt @@ -11,12 +11,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) ###################################################################################### IF(NOT WIN32 OR CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) + LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio IF(WIN32 AND NOT CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) + LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### diff --git a/eo/tutorial/Lesson2/CMakeLists.txt b/eo/tutorial/Lesson2/CMakeLists.txt index 1b7c04999..876e1689f 100644 --- a/eo/tutorial/Lesson2/CMakeLists.txt +++ b/eo/tutorial/Lesson2/CMakeLists.txt @@ -11,12 +11,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) ###################################################################################### IF(NOT WIN32 OR CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) + LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio IF(WIN32 AND NOT CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) + LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### diff --git a/eo/tutorial/Lesson3/CMakeLists.txt b/eo/tutorial/Lesson3/CMakeLists.txt index e999e616a..926aacc90 100644 --- a/eo/tutorial/Lesson3/CMakeLists.txt +++ b/eo/tutorial/Lesson3/CMakeLists.txt @@ -11,12 +11,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils) ###################################################################################### IF(NOT WIN32 OR CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) + LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio IF(WIN32 AND NOT CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) + LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### diff --git a/eo/tutorial/Lesson4/CMakeLists.txt b/eo/tutorial/Lesson4/CMakeLists.txt index 8048bdccc..335272b20 100644 --- a/eo/tutorial/Lesson4/CMakeLists.txt +++ b/eo/tutorial/Lesson4/CMakeLists.txt @@ -5,10 +5,10 @@ EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param - ${EO_BINARY_DIR}/tutorial/Lesson4/ESEA.param + ${EO_BIN_DIR}/tutorial/Lesson4/ESEA.param COMMAND ${CMAKE_COMMAND} -E copy_if_different ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param - ${EO_BINARY_DIR}/tutorial/Lesson4/RealEA.param + ${EO_BIN_DIR}/tutorial/Lesson4/RealEA.param ) ############## @@ -21,7 +21,7 @@ EXECUTE_PROCESS( # COMMAND ${CMAKE_COMMAND} # ARGS -E copy_if_different # ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param -# ${EO_BINARY_DIR}/tutorial/Lesson4) +# ${EO_BIN_DIR}/tutorial/Lesson4) #ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param) #ADD_CUSTOM_COMMAND( # TARGET param @@ -29,7 +29,7 @@ EXECUTE_PROCESS( # COMMAND ${CMAKE_COMMAND} # ARGS -E copy_if_different # ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param -# ${EO_BINARY_DIR}/tutorial/Lesson4) +# ${EO_BIN_DIR}/tutorial/Lesson4) ###################################################################################### ### 1) Include the sources @@ -45,12 +45,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga) ###################################################################################### IF(NOT WIN32 OR CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) + LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio IF(WIN32 AND NOT CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) + LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### diff --git a/eo/tutorial/Lesson5/CMakeLists.txt b/eo/tutorial/Lesson5/CMakeLists.txt index 011687b8a..b487804be 100644 --- a/eo/tutorial/Lesson5/CMakeLists.txt +++ b/eo/tutorial/Lesson5/CMakeLists.txt @@ -10,12 +10,12 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### IF(NOT WIN32 OR CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) + LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio IF(WIN32 AND NOT CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) + LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### diff --git a/eo/tutorial/Lesson6/CMakeLists.txt b/eo/tutorial/Lesson6/CMakeLists.txt index 8614165b5..c58759233 100644 --- a/eo/tutorial/Lesson6/CMakeLists.txt +++ b/eo/tutorial/Lesson6/CMakeLists.txt @@ -9,12 +9,12 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) ###################################################################################### IF(NOT WIN32 OR CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}/lib) + LINK_DIRECTORIES(${EO_BIN_DIR}/lib) ENDIF(NOT WIN32 OR CYGWIN) # especially for Visual Studio IF(WIN32 AND NOT CYGWIN) - LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE}) + LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE}) ENDIF(WIN32 AND NOT CYGWIN) ###################################################################################### diff --git a/mo/doc/CMakeLists.txt b/mo/doc/CMakeLists.txt index 1709ce9cb..490695bc0 100755 --- a/mo/doc/CMakeLists.txt +++ b/mo/doc/CMakeLists.txt @@ -4,9 +4,9 @@ if(DOXYGEN_FOUND) # Directory where the generation will be launched - set(MO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Documentation directory") + set(MO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "Documentation directory" FORCE) # Name of the doxygene configuration file - set(MO_DOC_CONFIG_FILE "mo.doxyfile" CACHE PATH "Documentation configuration file") + set(MO_DOC_CONFIG_FILE "mo.doxyfile" CACHE INTERNAL "Documentation configuration file") if(DOXYGEN_EXECUTABLE) # Creating the custom target if(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) diff --git a/moeo/doc/CMakeLists.txt b/moeo/doc/CMakeLists.txt index 4666a8a90..ce6e5397a 100644 --- a/moeo/doc/CMakeLists.txt +++ b/moeo/doc/CMakeLists.txt @@ -5,9 +5,9 @@ if(DOXYGEN_FOUND) # Directory where the generation will be launched - set(MOEO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Documentation directory") + set(MOEO_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "Documentation directory" FORCE) # Name of the doxygene configuration file - set(MOEO_DOC_CONFIG_FILE "moeo.doxyfile" CACHE PATH "Documentation configuration file") + set(MOEO_DOC_CONFIG_FILE "moeo.doxyfile" CACHE INTERNAL "Documentation configuration file") if(DOXYGEN_EXECUTABLE) # Creating the custom target if(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE}) diff --git a/smp/doc/CMakeLists.txt b/smp/doc/CMakeLists.txt index e93a9d7c5..ba26a8e31 100644 --- a/smp/doc/CMakeLists.txt +++ b/smp/doc/CMakeLists.txt @@ -4,9 +4,9 @@ if(DOXYGEN_FOUND) # Directory where the generation will be launched - set(SMP_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Documentation directory") + set(SMP_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "Documentation directory" FORCE) # Name of the doxygene configuration file - set(SMP_DOC_CONFIG_FILE "smp.doxyfile" CACHE PATH "Documentation configuration file") + set(SMP_DOC_CONFIG_FILE "smp.doxyfile" CACHE INTERNAL "Documentation configuration file") if(DOXYGEN_EXECUTABLE) # Creating the custom target if(UNIX AND NOT ${CMAKE_VERBOSE_MAKEFILE})