changed cmake config for patch1

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1176 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2008-03-20 12:56:17 +00:00
commit 222c63b924
3 changed files with 67 additions and 58 deletions

View file

@ -31,39 +31,47 @@ LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MO_BINARY_DIR}/lib)
######################################################################################
SET (TEST_LIST t-moBestImprSelect
t-moExponentialCoolingSchedule
t-moFirstImprSelect
t-moFitComparator
t-moFitSolContinue
t-moGenSolContinue
t-moHC
t-moHC_2
t-moHCMoveLoopExpl
t-moILS
t-moILS_HC
t-moILS_TS
t-moILS_SA
t-moImprBestFitAspirCrit
t-moItRandNextMove
t-moLinearCoolingSchedule
t-moLSCheckPoint
t-moNoAspirCrit
t-moNoFitImprSolContinue
t-moRandImprSelect
t-moSA
t-moSimpleMoveTabuList
t-moSimpleSolutionTabuList
t-moExponentialCoolingSchedule
t-moFirstImprSelect
t-moFitComparator
t-moFitSolContinue
t-moGenSolContinue
t-moHC
t-moHC_2
t-moHCMoveLoopExpl
t-moILS
t-moILS_HC
t-moILS_TS
t-moILS_SA
t-moImprBestFitAspirCrit
t-moItRandNextMove
t-moLinearCoolingSchedule
t-moLSCheckPoint
t-moNoAspirCrit
t-moNoFitImprSolContinue
t-moRandImprSelect
t-moSA
t-moSimpleMoveTabuList
t-moSimpleSolutionTabuList
t-moSteadyFitSolContinue
t-moTS
t-moTS_2
t-moTSMoveLoopExpl )
t-moTS
t-moTS_2
t-moTSMoveLoopExpl)
FOREACH (test ${TEST_LIST})
SET ("T_${test}_SOURCES" "${test}.cpp")
ENDFOREACH (test)
IF(ENABLE_CMAKE_TESTING)
IF(ENABLE_MINIMAL_CMAKE_TESTING)
SET (MIN_TEST_LIST t-moHC)
FOREACH (mintest ${MIN_TEST_LIST})
SET ("T_${mintest}_SOURCES" "${mintest}.cpp")
ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES})
ADD_TEST(${mintest} ${mintest})
ENDFOREACH (mintest)
ELSEIF(ENABLE_CMAKE_TESTING)
# Add the tests
FOREACH (test ${TEST_LIST})
@ -76,7 +84,7 @@ IF(ENABLE_CMAKE_TESTING)
TARGET_LINK_LIBRARIES(${test} ga es eoutils eo)
ENDFOREACH (test)
ENDIF(ENABLE_CMAKE_TESTING)
ENDIF(ENABLE_MINIMAL_CMAKE_TESTING)
######################################################################################

View file

@ -56,9 +56,18 @@ FOREACH (test ${TEST_LIST})
ENDFOREACH (test)
IF(ENABLE_CMAKE_TESTING)
IF(ENABLE_MINIMAL_CMAKE_TESTING)
SET (MIN_TEST_LIST t-moeoEasyEA)
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} moeo ga es eoutils eo)
ENDFOREACH (mintest)
ELSEIF(ENABLE_CMAKE_TESTING)
# Add the tests
FOREACH (test ${TEST_LIST})
ADD_EXECUTABLE(${test} ${T_${test}_SOURCES})
ADD_TEST(${test} ${test})
@ -69,7 +78,7 @@ IF(ENABLE_CMAKE_TESTING)
TARGET_LINK_LIBRARIES(${test} moeo ga es eoutils eo)
ENDFOREACH (test)
ENDIF(ENABLE_CMAKE_TESTING)
ENDIF(ENABLE_MINIMAL_CMAKE_TESTING)
######################################################################################

View file

@ -71,9 +71,24 @@ FOREACH (test ${TEST_RUN} ${TEST_LIST} ${TEST_STOP})
ENDFOREACH (test)
IF(ENABLE_CMAKE_TESTING)
# Add the tests
IF(ENABLE_MINIMAL_CMAKE_TESTING)
SET (MIN_TEST_LIST t-MultiStart)
FOREACH (test ${TEST_RUN})
ADD_TEST(${test} ${test})
ENDFOREACH (test)
FOREACH (mintest ${MIN_TEST_LIST})
SET ("T_${mintest}_SOURCES" "${mintest}.cpp")
ADD_EXECUTABLE(${mintest} ${T_${mintest}_SOURCES})
ADD_TEST(${mintest} "mpiexec" "-n" "4" "${CMAKE_CURRENT_BINARY_DIR}/${mintest}" "@param")
TARGET_LINK_LIBRARIES(${mintest} peo ${XML2_LIBS} rmc_mpi ga es eoutils eo peo)
ENDFOREACH (mintest)
FOREACH (test ${TEST_STOP})
ADD_TEST(${test} ${test})
ENDFOREACH (test)
ELSEIF(ENABLE_CMAKE_TESTING)
FOREACH (test ${TEST_RUN} ${TEST_LIST} ${TEST_STOP})
ADD_EXECUTABLE(${test} ${T_${test}_SOURCES})
ENDFOREACH (test)
@ -93,31 +108,8 @@ IF(ENABLE_CMAKE_TESTING)
# Link the librairies
FOREACH (test ${TEST_RUN} ${TEST_LIST} ${TEST_STOP})
TARGET_LINK_LIBRARIES(${test} peo ${XML2_LIBS} rmc_mpi ga es eoutils eo peo)
ENDFOREACH (test)
ENDFOREACH (test)
ENDIF(ENABLE_CMAKE_TESTING)
ENDIF(ENABLE_MINIMAL_CMAKE_TESTING)
######################################################################################
######################################################################################
### 5) Windows advanced config - especially for Microsoft Visual Studio 8
######################################################################################
IF(CMAKE_CXX_COMPILER MATCHES cl)
IF(NOT WITH_SHARED_LIBS)
IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005")
SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy")
SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /Z7 /Od")
SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2")
SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE")
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005")
ENDIF(NOT WITH_SHARED_LIBS)
ENDIF(CMAKE_CXX_COMPILER MATCHES cl)
######################################################################################