diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 18369349a..bdbabe4fc 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -45,7 +45,6 @@ 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) diff --git a/edo/application/CMakeLists.txt b/edo/application/CMakeLists.txt index c03fa57de..88462c0a7 100644 --- a/edo/application/CMakeLists.txt +++ b/edo/application/CMakeLists.txt @@ -6,7 +6,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/common ) -ADD_SUBDIRECTORY(common) +ADD_SUBDIRECTORY(common) # Rosenbrock and Sphere #ADD_SUBDIRECTORY(eda_sa) ADD_SUBDIRECTORY(eda) ADD_SUBDIRECTORY(cmaes) diff --git a/edo/application/cmaes/CMakeLists.txt b/edo/application/cmaes/CMakeLists.txt index ade261ac7..3fb2b0466 100644 --- a/edo/application/cmaes/CMakeLists.txt +++ b/edo/application/cmaes/CMakeLists.txt @@ -1,33 +1,37 @@ -PROJECT(cmaes) +project(cmaes) #find_package(Eigen3 REQUIRED) #include_directories(EIGEN3_INCLUDE_DIR) -INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} ) -MESSAGE( "MESSAGE:" ${EIGEN3_INCLUDE_DIR} ) +include_directories( ${EIGEN3_INCLUDE_DIR} ) +#message( "MESSAGE:" ${EIGEN3_INCLUDE_DIR} ) -#FIND_PACKAGE(Boost 1.33.0) -INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) -LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) +#find_package(Boost 1.33.0) +include_directories(${Boost_INCLUDE_DIRS}) +link_directories(${Boost_LIBRARY_DIRS}) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${EO_SRC_DIR}/src) +include_directories(${EDO_SRC_DIR}/src) +link_directories(${EO_BIN_DIRS}/${LIB}) +link_directories(${EDO_BIN_DIRS}/${LIB}) -SET(RESOURCES - ${PROJECT_NAME}.param - ) +# set(RESOURCES +# ${PROJECT_NAME}.param +# ) +# +# foreach(file ${RESOURCES}) +# execute_process( +# COMMAND ${CMAKE_COMMAND} -E copy_if_different +# ${CMAKE_CURRENT_SOURCE_DIR}/${file} +# ${EDO_BIN_DIR}/${file} +# ) +# endforeach(file) -FOREACH(file ${RESOURCES}) - EXECUTE_PROCESS( - COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${EDO_BINARY_DIR}/${file} - ) -ENDFOREACH(file) +#file(GLOB SOURCES *.cpp) -#FILE(GLOB SOURCES *.cpp) +set(EXECUTABLE_OUTPUT_PATH ${EDO_BIN_DIR}) -SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) - -ADD_EXECUTABLE(${PROJECT_NAME} main.cpp) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${Boost_LIBRARIES}) +add_executable(${PROJECT_NAME} main.cpp) +target_link_libraries(${PROJECT_NAME} eo eoutils edoutils ${Boost_LIBRARIES}) diff --git a/edo/application/common/CMakeLists.txt b/edo/application/common/CMakeLists.txt index 14c3509e3..f9ddc8cdc 100644 --- a/edo/application/common/CMakeLists.txt +++ b/edo/application/common/CMakeLists.txt @@ -10,6 +10,6 @@ FOREACH(file ${RESOURCES}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${EDO_BINARY_DIR}/${file} + ${EDO_BIN_DIR}/${file} ) ENDFOREACH(file) diff --git a/edo/application/eda/CMakeLists.txt b/edo/application/eda/CMakeLists.txt index 2dfe5774c..bb5a3700b 100644 --- a/edo/application/eda/CMakeLists.txt +++ b/edo/application/eda/CMakeLists.txt @@ -1,27 +1,33 @@ -PROJECT(eda) +project(eda) -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}) -LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) +include_directories(${Boost_INCLUDE_DIRS}) +link_directories(${Boost_LIBRARY_DIRS}) -SET(RESOURCES +include_directories(${EO_SRC_DIR}/src) +include_directories(${EDO_SRC_DIR}/src) +link_directories(${EO_BIN_DIR}/${LIB}) +link_directories(${EDO_BIN_DIR}/${LIB}) + +set(RESOURCES ${PROJECT_NAME}.param ) -FOREACH(file ${RESOURCES}) - EXECUTE_PROCESS( +foreach(FILE ${RESOURCES}) + execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${EDO_BINARY_DIR}/${file} + ${EDO_BIN_DIR}/${file} ) -ENDFOREACH(file) +endforeach(FILE) -FILE(GLOB SOURCES *.cpp) +file(GLOB SOURCES *.cpp) -SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) +set(EXECUTABLE_OUTPUT_PATH ${EDO_BIN_DIR}) + +add_executable(${PROJECT_NAME} ${SOURCES}) +target_link_libraries(${PROJECT_NAME} eo eoutils edoutils ${Boost_LIBRARIES}) -ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/edo/application/eda_sa/CMakeLists.txt b/edo/application/eda_sa/CMakeLists.txt index 39a9a5464..5cfb550fc 100644 --- a/edo/application/eda_sa/CMakeLists.txt +++ b/edo/application/eda_sa/CMakeLists.txt @@ -15,13 +15,13 @@ FOREACH(file ${RESOURCES}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${EDO_BINARY_DIR}/${file} + ${EDO_BIN_DIR}/${file} ) ENDFOREACH(file) FILE(GLOB SOURCES *.cpp) -SET(EXECUTABLE_OUTPUT_PATH ${EDO_BINARY_DIR}) +SET(EXECUTABLE_OUTPUT_PATH ${EDO_BIN_DIR}) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} edo edoutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/edo/src/CMakeLists.txt b/edo/src/CMakeLists.txt index c013c133e..d8dbf1abb 100644 --- a/edo/src/CMakeLists.txt +++ b/edo/src/CMakeLists.txt @@ -5,7 +5,7 @@ include_directories(${EO_SRC_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -set(EDO_LIB_OUTPUT_PATH ${EDO_BINARY_DIR}/lib) +set(EDO_LIB_OUTPUT_PATH ${EDO_BIN_DIR}/lib) set(LIBRARY_OUTPUT_PATH ${EDO_LIB_OUTPUT_PATH}) @@ -22,7 +22,7 @@ install(FILES ${HDRS} DESTINATION local/include${INSTALL_SUB_DIR}/edo COMPONENT ###################################################################################### install(DIRECTORY utils - DESTINATION local/include${INSTALL_SUB_DIR}/moeo + DESTINATION local/include${INSTALL_SUB_DIR}/edo COMPONENT headers FILES_MATCHING PATTERN "*.h" ) diff --git a/edo/src/edo.cpp b/edo/src/edo.cpp deleted file mode 100644 index aab9c37b4..000000000 --- a/edo/src/edo.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* -The Evolving Distribution Objects framework (EDO) is a template-based, -ANSI-C++ evolutionary computation library which helps you to write your -own estimation of distribution algorithms. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Copyright (C) 2010 Thales group -*/ -/* -Authors: - Caner Candan -*/ - -#include "edo" diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt index eef07d615..9bf3781ed 100644 --- a/eo/CMakeLists.txt +++ b/eo/CMakeLists.txt @@ -51,7 +51,7 @@ if(ENABLE_CMAKE_EXAMPLE) message("EO examples:") endif(${CMAKE_VERBOSE_MAKEFILE}) add_subdirectory(tutorial) - add_subdirectory(app) + #add_subdirectory(app) # FIXME must be updated endif(ENABLE_CMAKE_EXAMPLE) diff --git a/eo/app/mastermind/CMakeLists.txt b/eo/app/mastermind/CMakeLists.txt index b76bc0d4e..5ae1cab06 100644 --- a/eo/app/mastermind/CMakeLists.txt +++ b/eo/app/mastermind/CMakeLists.txt @@ -2,14 +2,14 @@ ### 1) Include the sources ###################################################################################### -INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) ###################################################################################### ### 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