paradiseo/test/eo/CMakeLists.txt
Adèle Harrissart 1353157cb6 Using library <random> in order to re-implement the methods of the class eoRng
(issue #24).
Add two new CMake Cache Values: ENABLE_CXX11_RANDOM & ENABLE_64_BIT_RNG_NUMBERS.
Add a test file; Python chi-square & shapiro-wilk tests: done.
2014-10-04 15:52:27 +02:00

122 lines
3.3 KiB
CMake
Executable file

###############################################################################
##
## CMakeLists file for eo/test
##
###############################################################################
######################################################################################
### 1) Include the sources
######################################################################################
#include_directories(${EO_SRC_DIR}/src)
#include_directories(${EO_SRC_DIR}/contrib)
include_directories(${EO_SRC_DIR}/contrib/MGE)
#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
######################################################################################
### 2) Specify where CMake can find the libraries
######################################################################################
#link_directories(${EO_BIN_DIR}/lib)
######################################################################################
### 3) Define your targets and link the librairies
######################################################################################
set (TEST_LIST
t-eofitness
t-eoRandom
t-eobin
t-eoVirus
t-MGE
t-MGE1bit
t-MGE-control
t-eoStateAndParser
t-eoCheckpointing
t-eoSSGA
t-eoExternalEO
t-eoSymreg
t-eo
t-eoReplacement
t-eoSelect
t-eoGenOp
t-eoGA
t-eoReal
t-eoVector
t-eoESAll
t-eoPBIL
t-eoFitnessAssembled
t-eoFitnessAssembledEA
t-eoRoulette
t-eoSharing
t-eoCMAES
t-eoSecondsElapsedContinue
t-eoRNG
t-eoEasyPSO
t-eoInt
t-eoInitPermutation
t-eoSwapMutation
t-eoShiftMutation
t-eoTwoOptMutation
t-eoRingTopology
t-eoSyncEasyPSO
t-eoOrderXover
t-eoExtendedVelocity
t-eoLogger
#t-eoIQRStat # Temporary by-passed in order to test coverage
t-eoParallel
#t-openmp # does not work anymore since functions used in this test were removed from EO
#t-eoDualFitness
t-eoParser
)
# For C++11 random numbers
if(ENABLE_CXX11_RANDOM)
set (TEST_LIST ${TEST_LIST} t-eoRNGcxx11) # tests the eoRng class update (thanks to the new C++11 random library)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I /usr/include/python2.7 -lpython2.7") # Install developpement package for Python and add Python library link
endif(ENABLE_CXX11_RANDOM)
foreach (test ${TEST_LIST})
set ("T_${test}_SOURCES" "${test}.cpp")
endforeach (test)
if(ENABLE_MINIMAL_CMAKE_TESTING)
set (MIN_TEST_LIST t-eoEasyPSO)
foreach (mintest ${MIN_TEST_LIST})
set ("T_${mintest}_SOURCES" "${mintest}.cpp")
add_executable(${mintest} ${T_${mintest}_SOURCES})
add_test(${mintest} ${mintest})
target_link_libraries(${mintest} ga es cma eoutils eo)
endforeach (mintest)
elseif(ENABLE_CMAKE_TESTING)
foreach (test ${TEST_LIST})
add_executable(${test} ${T_${test}_SOURCES})
add_test(${test} ${test})
target_link_libraries(${test} ga es cma eoutils eo)
install(TARGETS ${test} RUNTIME DESTINATION share/${PROJECT_TAG}/eo/test COMPONENT test)
endforeach (test)
set(RESOURCES
boxplot.py
boxplot_to_png.py
boxplot_to_pdf.py
t-openmp.py
)
foreach(file ${RESOURCES})
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/${file}
${CMAKE_CURRENT_BINARY_DIR}/${file}
)
endforeach(file)
endif(ENABLE_MINIMAL_CMAKE_TESTING)
######################################################################################