Config pour les tests unitaires
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1646 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
2a4909cbdf
commit
a4f6668c81
3 changed files with 9 additions and 20 deletions
|
|
@ -8,7 +8,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|||
PROJECT(NEWMO)
|
||||
|
||||
# Here define the name and the version of your package
|
||||
SET(PACKAGE_NAME "VRP" CACHE STRING "Package name" FORCE)
|
||||
SET(PACKAGE_NAME "NEWMO" CACHE STRING "Package name" FORCE)
|
||||
SET(PACKAGE_VERSION "0" CACHE STRING "Package version" FORCE)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public:
|
|||
* true if the neighbor1 is better than neighbor2
|
||||
*/
|
||||
virtual bool operator()(const Neigh & neighbor1, const Neigh & neighbor2) {
|
||||
return (neighbor1.fitness() > neighbor2.fitness());
|
||||
return (neighbor1.fitness() > neighbor2.fitness());
|
||||
}
|
||||
|
||||
/** Return the class id.
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${PARADISEO_EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${NEWMO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
######################################################################################
|
||||
|
|
@ -20,33 +20,22 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
|||
### 2) Specify where CMake can find the libraries
|
||||
######################################################################################
|
||||
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${ParadisEO-MO_BINARY_DIR}/lib)
|
||||
LINK_DIRECTORIES(${PARADISEO_EO_BIN_DIR}/lib)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 3) Define your targets and link the librairies
|
||||
######################################################################################
|
||||
|
||||
SET (TEST_LIST
|
||||
)
|
||||
SET (TEST_LIST t-moNeighbor)
|
||||
|
||||
FOREACH (test ${TEST_LIST})
|
||||
SET ("T_${test}_SOURCES" "${test}.cpp")
|
||||
ENDFOREACH (test)
|
||||
|
||||
|
||||
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)
|
||||
IF(ENABLE_CMAKE_TESTING)
|
||||
|
||||
# Add the tests
|
||||
FOREACH (test ${TEST_LIST})
|
||||
|
|
@ -56,10 +45,10 @@ ELSEIF(ENABLE_CMAKE_TESTING)
|
|||
|
||||
# Link the librairies
|
||||
FOREACH (test ${TEST_LIST})
|
||||
TARGET_LINK_LIBRARIES(${test} ga es eoutils eo)
|
||||
TARGET_LINK_LIBRARIES(${test} ga es eoutils eo)
|
||||
ENDFOREACH (test)
|
||||
|
||||
ENDIF(ENABLE_MINIMAL_CMAKE_TESTING)
|
||||
ENDIF(ENABLE_CMAKE_TESTING)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue