paradiseo/trunk/paradiseo-moeo/test/CMakeLists.txt
legrand 29660e75bb deleted cl compiler flags and updated config
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@944 331e1502-861f-0410-8da2-ba01fb791d7f
2008-02-14 09:37:22 +00:00

64 lines
2 KiB
CMake

###############################################################################
##
## CMakeLists file for ParadisEO-MOEO/test
##
###############################################################################
######################################################################################
### 1) Include the sources
######################################################################################
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
INCLUDE_DIRECTORIES(${ParadisEO-MOEO_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
######################################################################################
######################################################################################
### 2) Specify where CMake can find the libraries
######################################################################################
IF(NOT WIN32 OR CYGWIN)
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MOEO_BINARY_DIR}/lib)
ENDIF(NOT WIN32 OR CYGWIN)
# especially for Visual Studio
IF(WIN32 AND NOT CYGWIN)
LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE}
${ParadisEO-MOEO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE})
ENDIF(WIN32 AND NOT CYGWIN)
######################################################################################
######################################################################################
### 3) Define your targets and link the librairies
######################################################################################
SET (TEST_LIST t-moeo)
FOREACH (test ${TEST_LIST})
SET ("T_${test}_SOURCES" "${test}.cpp")
ENDFOREACH (test)
IF(ENABLE_CMAKE_TESTING)
# Add the tests
FOREACH (test ${TEST_LIST})
ADD_EXECUTABLE(${test} ${T_${test}_SOURCES})
ADD_TEST(${test} ${test})
ENDFOREACH (test)
# Link the librairies
FOREACH (test ${TEST_LIST})
TARGET_LINK_LIBRARIES(${test} moeo ga es eoutils eo)
ENDFOREACH (test)
ENDIF(ENABLE_CMAKE_TESTING)
######################################################################################