fix build system: make eo/edo examples works
This commit is contained in:
parent
8a81bd2191
commit
0829afceb9
10 changed files with 61 additions and 79 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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 <caner.candan@thalesgroup.com>
|
||||
*/
|
||||
|
||||
#include "edo"
|
||||
Loading…
Add table
Add a link
Reference in a new issue