some modifications for EDO

You have to sove this problems:
EDO: t-dispatcher-round (commented)
MOOE: Lesson4 (commented)
MO: t-moRndIndexedVectorTabuList (commented)
This commit is contained in:
canape 2013-02-07 14:43:11 +01:00
commit 23df679f51
11 changed files with 84 additions and 50 deletions

View file

@ -1,33 +1,25 @@
IF(EDO_USE_LIB STREQUAL "uBLAS")
FIND_PACKAGE(Boost )
IF( Boost_FOUND )
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} )
ADD_DEFINITIONS( -DWITH_BOOST )
ELSE()
MESSAGE( "ERROR: You asked for Boost::uBLAS but it has not been found." )
SET(IS_FATAL 1)
ENDIF()
ELSEIF( EDO_USE_LIB STREQUAL "Eigen3" )
# FIXME FindEigen3.cmake does not work
#find_package(Eigen3)
#include_directories(EIGEN3_INCLUDE_DIR)
SET( EIGEN3_FOUND 1)
SET( EIGEN3_INCLUDE_DIR "/usr/include/eigen3/" )
if(EDO_USE_LIB STREQUAL "uBLAS")
find_package(Boost)
if(Boost_FOUND)
include_directories( ${Boost_INCLUDE_DIRS} )
add_definitions( -DWITH_BOOST )
else()
message(FATAL_ERROR "\n\nERROR: You asked for Boost::uBLAS but it has not been found.\n" )
endif()
elseif(EDO_USE_LIB STREQUAL "Eigen3")
find_package(Eigen3)
if(EIGEN3_FOUND)
include_directories(EIGEN3_INCLUDE_DIR)
add_definitions( -DWITH_EIGEN )
else()
message(FATAL_ERROR "\n\nERROR: You asked for Eigen3 but it has not been found.\n" )
endif()
IF( EIGEN3_FOUND )
INCLUDE_DIRECTORIES( ${EIGEN3_INCLUDE_DIR} )
ADD_DEFINITIONS( -DWITH_EIGEN )
ELSE()
MESSAGE( "ERROR: You asked for Eigen3 but it has not been found." )
SET(IS_FATAL 1)
ENDIF()
ELSE()
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()
message(FATAL_ERROR "\n\nYou must set EDO_USE_LIB to either 'uBLAS' or 'Eigen3'.\n" )
endif()
######################################################################################
@ -37,14 +29,14 @@ ENDIF()
add_subdirectory(doc)
add_subdirectory(src)
if(ENABLE_CMAKE_TESTING)
if(ENABLE_CMAKE_TESTING AND EIGEN3_FOUND) # see edoNormalAdaptive
add_subdirectory(test)
endif(ENABLE_CMAKE_TESTING)
endif()
if(ENABLE_CMAKE_EXAMPLE)
if(${CMAKE_VERBOSE_MAKEFILE})
message("EDO examples:")
endif(${CMAKE_VERBOSE_MAKEFILE})
add_subdirectory(application)
endif(ENABLE_CMAKE_EXAMPLE)
endif()

View file

@ -2,13 +2,18 @@
### 1) Where do we go now ?!?
######################################################################################
INCLUDE_DIRECTORIES(
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/common
)
ADD_SUBDIRECTORY(common) # Rosenbrock and Sphere
#ADD_SUBDIRECTORY(eda_sa)
ADD_SUBDIRECTORY(eda)
ADD_SUBDIRECTORY(cmaes)
include_directories(${EIGEN3_INCLUDE_DIR})
add_subdirectory(common) # Rosenbrock and Sphere
#add_subdirectory(eda_sa)
if(EIGEN3_FOUND) # see edoNormalAdaptive
add_subdirectory(eda)
add_subdirectory(cmaes)
endif()
######################################################################################

View file

@ -8,8 +8,8 @@ include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
include_directories(${EO_SRC_DIR}/src)
include_directories(${EDO_SRC_DIR}/src)
link_directories(${EO_BIN_DIR}/${LIB})
include_directories(${EDO_SRC_DIR}/src)
link_directories(${EDO_BIN_DIR}/${LIB})
set(RESOURCES

View file

@ -23,17 +23,13 @@
### 3) Define your targets and link the librairies
######################################################################################
find_package(Boost 1.33.0)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
include_directories(${CMAKE_SOURCE_DIR}/application/common)
include_directories(${EO_SRC_DIR}/src)
include_directories(${EDO_SRC_DIR}/src)
include_directories(${EIGEN3_INCLUDE_DIR})
set(SOURCES
#t-cholesky
t-variance
@ -42,14 +38,14 @@ set(SOURCES
t-bounderno
t-uniform
t-continue
t-dispatcher-round
# t-dispatcher-round
t-repairer-modulo
)
foreach(current ${SOURCES})
add_executable(${current} ${current}.cpp)
add_test(${current} ${current})
target_link_libraries(${current} eo eoutils edoutils ${Boost_LIBRARIES})
target_link_libraries(${current} eo eoutils edoutils)
install(TARGETS ${current} RUNTIME DESTINATION share/edo/test COMPONENT test)
endforeach()