Package have been updated according to the tests under Windows
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1078 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
f411abb53d
commit
ae4f880827
18 changed files with 83 additions and 160 deletions
|
|
@ -3,11 +3,11 @@
|
|||
### 1) Definitions (required for tsp target)
|
||||
######################################################################################
|
||||
|
||||
SET(TSP_SRC_DIR ${ParadisEO-MO_SOURCE_DIR}/tutorial/examples/tsp CACHE PATH "TSP src directory")
|
||||
SET(TSP_BINARY_DIR ${ParadisEO-MO_BINARY_DIR}/tutorial/examples/tsp CACHE PATH "TSP binary directory")
|
||||
SET(TSP_SRC_DIR ${MO_SRC_DIR}/tutorial/examples/tsp CACHE PATH "TSP src directory")
|
||||
SET(TSP_BIN_DIR ${MO_BIN_DIR}/tutorial/examples/tsp CACHE PATH "TSP binary directory")
|
||||
|
||||
SET(FUNCTION_SRC_DIR ${ParadisEO-MO_SOURCE_DIR}/tutorial/examples/function CACHE PATH "FUNCTION src directory")
|
||||
SET(FUNCTION_BINARY_DIR ${ParadisEO-MO_BINARY_DIR}/tutorial/examples/function CACHE PATH "FUNCTION binary directory")
|
||||
SET(FUNCTION_SRC_DIR ${MO_SRC_DIR}/tutorial/examples/function CACHE PATH "FUNCTION src directory")
|
||||
SET(FUNCTION_BIN_DIR ${MO_BIN_DIR}/tutorial/examples/function CACHE PATH "FUNCTION binary directory")
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
@ -18,3 +18,59 @@ SET(FUNCTION_BINARY_DIR ${ParadisEO-MO_BINARY_DIR}/tutorial/examples/function CA
|
|||
SUBDIRS(examples Lesson1 Lesson2 Lesson3 Lesson4 Lesson5)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
ADD_CUSTOM_TARGET(install DEPENDS ${MO_SRC_DIR}/tutorial/examples/tsp/benchs
|
||||
${MO_SRC_DIR}/tutorial/Lesson1/param
|
||||
${MO_SRC_DIR}/tutorial/Lesson2/param
|
||||
${MO_SRC_DIR}/tutorial/Lesson3/param
|
||||
${MO_SRC_DIR}/tutorial/Lesson4/param
|
||||
${MO_SRC_DIR}/tutorial/Lesson5/param )
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_directory
|
||||
${MO_SRC_DIR}/tutorial/examples/tsp/benchs
|
||||
${MO_BIN_DIR}/tutorial/examples/tsp/benchs)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${MO_SRC_DIR}/tutorial/Lesson1/param
|
||||
${MO_BIN_DIR}/tutorial/Lesson1)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${MO_SRC_DIR}/tutorial/Lesson2/param
|
||||
${MO_BIN_DIR}/tutorial/Lesson2)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${MO_SRC_DIR}/tutorial/Lesson3/param
|
||||
${MO_BIN_DIR}/tutorial/Lesson3)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${MO_SRC_DIR}/tutorial/Lesson4/param
|
||||
${MO_BIN_DIR}/tutorial/Lesson4)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${MO_SRC_DIR}/tutorial/Lesson5/param
|
||||
${MO_BIN_DIR}/tutorial/Lesson5)
|
||||
|
|
|
|||
|
|
@ -4,27 +4,17 @@
|
|||
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${FUNCTION_SRC_DIR})
|
||||
|
||||
######################################################################################
|
||||
|
||||
ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson1/param )
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson1/param
|
||||
${ParadisEO-MO_BINARY_DIR}/tutorial/Lesson1)
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries
|
||||
######################################################################################
|
||||
|
||||
IF(NOT WIN32 OR CYGWIN)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${FUNCTION_BINARY_DIR}/lib)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${FUNCTION_BIN_DIR}/lib)
|
||||
ENDIF(NOT WIN32 OR CYGWIN)
|
||||
|
||||
# especially for Visual Studio
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ manage_configuration_file(eoParser & _parser)
|
|||
|
||||
_parser.createParam((double)1, "searchBound", "Bound for neighbourhood exploration.", 0, "Configuration", false);
|
||||
|
||||
_parser.createParam((double)0.5, "searchStep", "Step between two values during the neighbourhood exploration.",
|
||||
_parser.createParam((double)1, "searchStep", "Step between two values during the neighbourhood exploration.",
|
||||
0, "Configuration", false);
|
||||
|
||||
_parser.createParam(std::string("First"), "selectionType", "Type of the selection: 'Best', 'First' or 'Random'.",
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@
|
|||
###### Configuration ######
|
||||
# --initialBound=1 # Bound for the initial affectation.
|
||||
# --searchBound=1 # Bound for neighbourhood exploration.
|
||||
# --searchStep=0.5 # Step between two values during the neighbourhood exploration.
|
||||
# --searchStep=1 # Step between two values during the neighbourhood exploration.
|
||||
# --selectionType=First # Type of the selection: 'Best', 'First' or 'Random'.
|
||||
|
|
|
|||
|
|
@ -6,26 +6,16 @@
|
|||
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${TSP_SRC_DIR})
|
||||
######################################################################################
|
||||
|
||||
ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson2/param )
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson2/param
|
||||
${ParadisEO-MO_BINARY_DIR}/tutorial/Lesson2)
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries
|
||||
######################################################################################
|
||||
|
||||
IF(NOT WIN32 OR CYGWIN)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BINARY_DIR}/lib)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib)
|
||||
ENDIF(NOT WIN32 OR CYGWIN)
|
||||
|
||||
# especially for Visual Studio
|
||||
|
|
|
|||
|
|
@ -110,23 +110,8 @@ manage_configuration_file(eoParser & _parser)
|
|||
{
|
||||
std::ofstream os;
|
||||
|
||||
#ifdef _MSVC
|
||||
os.open("..\examples\tsp\benchs\berlin52.tsp");
|
||||
if(os.is_open())
|
||||
{
|
||||
_parser.createParam(std::string("..\examples\tsp\benchs\berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_parser.createParam(std::string("..\..\examples\tsp\benchs\berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
}
|
||||
os.close();
|
||||
#else
|
||||
_parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
#endif
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,27 +6,16 @@
|
|||
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${TSP_SRC_DIR})
|
||||
######################################################################################
|
||||
|
||||
ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson3/param )
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson3/param
|
||||
${ParadisEO-MO_BINARY_DIR}/tutorial/Lesson3)
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries
|
||||
######################################################################################
|
||||
|
||||
IF(NOT WIN32 OR CYGWIN)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BINARY_DIR}/lib)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib)
|
||||
ENDIF(NOT WIN32 OR CYGWIN)
|
||||
|
||||
# especially for Visual Studio
|
||||
|
|
|
|||
|
|
@ -117,23 +117,8 @@ manage_configuration_file(eoParser & _parser)
|
|||
{
|
||||
std::ofstream os;
|
||||
|
||||
#ifdef _MSVC
|
||||
os.open("..\examples\tsp\benchs\berlin52.tsp");
|
||||
if(os.is_open())
|
||||
{
|
||||
_parser.createParam(std::string("..\examples\tsp\benchs\berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_parser.createParam(std::string("..\..\examples\tsp\benchs\berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
}
|
||||
os.close();
|
||||
#else
|
||||
_parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
#endif
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,27 +6,16 @@
|
|||
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${TSP_SRC_DIR})
|
||||
######################################################################################
|
||||
|
||||
ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson4/param )
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson4/param
|
||||
${ParadisEO-MO_BINARY_DIR}/tutorial/Lesson4)
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries
|
||||
######################################################################################
|
||||
|
||||
IF(NOT WIN32 OR CYGWIN)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BINARY_DIR}/lib)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib)
|
||||
ENDIF(NOT WIN32 OR CYGWIN)
|
||||
|
||||
# especially for Visual Studio
|
||||
|
|
|
|||
|
|
@ -114,23 +114,8 @@ manage_configuration_file(eoParser & _parser)
|
|||
{
|
||||
std::ofstream os;
|
||||
|
||||
#ifdef _MSVC
|
||||
os.open("..\examples\tsp\benchs\berlin52.tsp");
|
||||
if(os.is_open())
|
||||
{
|
||||
_parser.createParam(std::string("..\examples\tsp\benchs\berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_parser.createParam(std::string("..\..\examples\tsp\benchs\berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
}
|
||||
os.close();
|
||||
#else
|
||||
_parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
#endif
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,26 +6,16 @@
|
|||
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src/utils)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${TSP_SRC_DIR})
|
||||
######################################################################################
|
||||
|
||||
ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson5/param )
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_if_different
|
||||
${ParadisEO-MO_SOURCE_DIR}/tutorial/Lesson5/param
|
||||
${ParadisEO-MO_BINARY_DIR}/tutorial/Lesson5)
|
||||
|
||||
######################################################################################
|
||||
### 2) Specify where CMake can find the libraries
|
||||
######################################################################################
|
||||
|
||||
IF(NOT WIN32 OR CYGWIN)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BINARY_DIR}/lib)
|
||||
LINK_DIRECTORIES(${EO_BIN_DIR}/lib ${TSP_BIN_DIR}/lib)
|
||||
ENDIF(NOT WIN32 OR CYGWIN)
|
||||
|
||||
# especially for Visual Studio
|
||||
|
|
|
|||
|
|
@ -94,23 +94,8 @@ manage_configuration_file(eoParser & _parser)
|
|||
{
|
||||
std::ofstream os;
|
||||
|
||||
#ifdef _MSVC
|
||||
os.open("..\examples\tsp\benchs\berlin52.tsp");
|
||||
if(os.is_open())
|
||||
{
|
||||
_parser.createParam(std::string("..\examples\tsp\benchs\berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_parser.createParam(std::string("..\..\examples\tsp\benchs\berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
}
|
||||
os.close();
|
||||
#else
|
||||
_parser.createParam(std::string("../examples/tsp/benchs/berlin52.tsp"), "instancePath", "Path to the instance.",
|
||||
0, "Configuration", false);
|
||||
#endif
|
||||
|
||||
_parser.getORcreateParam((unsigned int)time(0), "seed", "Seed for rand.", 0, "Configuration", false);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
######################################################################################
|
||||
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
|||
### 1) Define your target(s): just the tsp here
|
||||
######################################################################################
|
||||
|
||||
SET(FUNCTION_LIB_OUTPUT_PATH ${FUNCTION_BINARY_DIR}/lib)
|
||||
SET(FUNCTION_LIB_OUTPUT_PATH ${FUNCTION_BIN_DIR}/lib)
|
||||
SET(LIBRARY_OUTPUT_PATH ${FUNCTION_LIB_OUTPUT_PATH})
|
||||
|
||||
SET (FUNCTION_SOURCES affectation_eval.cpp
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class AffectationInit : public eoInit <Affectation>
|
|||
|
||||
void operator () (Affectation & _affectation) ;
|
||||
|
||||
//! A bound for the initial value for the deviations
|
||||
//! A bound for the initial value for the affectation
|
||||
double bound;
|
||||
|
||||
} ;
|
||||
|
|
|
|||
|
|
@ -46,10 +46,6 @@ functionFitness DeviationIncrEval :: operator () (const Deviation & _move, const
|
|||
deltaX1=_move.first;
|
||||
deltaX2=_move.second;
|
||||
|
||||
/*std::cout << (_affectation.fitness()
|
||||
+ ( 2*deltaX1*deltaX1 ) + ( deltaX2*deltaX2 ) + ( deltaX1*deltaX2 ) - ( 2*deltaX1 ) - deltaX2
|
||||
+ ( deltaX1 * ( (4*x1) + x2 ) ) + ( x2*deltaX1 )) << std::endl;*/
|
||||
|
||||
return _affectation.fitness()
|
||||
+ ( 2*deltaX1*deltaX1 ) + ( deltaX2*deltaX2 ) + ( deltaX1*deltaX2 ) - ( 2*deltaX1 ) - deltaX2
|
||||
+ ( deltaX1 * ( (4*x1) + x2 ) ) + ( x2*deltaX1 );
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class DeviationIncrEval : public moMoveIncrEval <Deviation>
|
|||
{
|
||||
public :
|
||||
|
||||
functionFitness operator () (const Deviation & _move, const Affectation & _route) ;
|
||||
functionFitness operator () (const Deviation & _move, const Affectation & _affectation);
|
||||
|
||||
} ;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,21 +40,21 @@ DeviationNext::DeviationNext(double _bound, double _step): bound(_bound), step(_
|
|||
{
|
||||
if(bound<0.0)
|
||||
{
|
||||
std::cout << "[affectation_next.cpp][DeviationNext]: bound is negative, " << bound << " is tranformed to ";
|
||||
std::cout << "[deviation_next.cpp][DeviationNext]: bound is negative, " << bound << " is tranformed to ";
|
||||
bound=-bound;
|
||||
std::cout << bound << "." << std::endl;
|
||||
}
|
||||
|
||||
if(step<0.0)
|
||||
{
|
||||
std::cout << "[affectation_next.cpp][DeviationNext]: step is negative, " << step << " is tranformed to ";
|
||||
std::cout << "[deviation_next.cpp][DeviationNext]: step is negative, " << step << " is tranformed to ";
|
||||
step=-step;
|
||||
std::cout << step << "." << std::endl;
|
||||
}
|
||||
|
||||
if(step>bound)
|
||||
{
|
||||
std::cout << "[affectation_next.cpp][DeviationNext]: step is higher than bound, " << step << " is tranformed to ";
|
||||
std::cout << "[deviation_next.cpp][DeviationNext]: step is higher than bound, " << step << " is tranformed to ";
|
||||
step = bound / 2;
|
||||
std::cout << step << "." << std::endl;
|
||||
}
|
||||
|
|
@ -71,12 +71,12 @@ bool DeviationNext::operator () (Deviation & _move, const Affectation & _affecta
|
|||
|
||||
//std::cout << "deltaX1 = " << deltaX1 << ", deltaX2 = " << deltaX2 << std::endl;
|
||||
|
||||
if( (deltaX1>=bound) && (deltaX2)>=bound )
|
||||
if( (deltaX1 >= bound) && (deltaX2 > bound) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(deltaX2 >= bound)
|
||||
if(deltaX2 > bound)
|
||||
{
|
||||
deltaX1+=step;
|
||||
deltaX2=-bound;
|
||||
|
|
|
|||
|
|
@ -1,26 +1,9 @@
|
|||
|
||||
######################################################################################
|
||||
### 0) Copy the "benchs" directory in the build directory to easily run the lessons
|
||||
######################################################################################
|
||||
|
||||
ADD_CUSTOM_TARGET(install DEPENDS ${ParadisEO-MO_SOURCE_DIR}/tutorial/examples/tsp/benchs)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET install
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS -E copy_directory
|
||||
${ParadisEO-MO_SOURCE_DIR}/tutorial/examples/tsp/benchs
|
||||
${ParadisEO-MO_BINARY_DIR}/tutorial/examples/tsp/benchs)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
INCLUDE_DIRECTORIES(${EO_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
||||
INCLUDE_DIRECTORIES(${MO_SRC_DIR}/src)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
|
@ -29,7 +12,7 @@ INCLUDE_DIRECTORIES(${ParadisEO-MO_SOURCE_DIR}/src)
|
|||
### 2) Define your target(s): just the tsp here
|
||||
######################################################################################
|
||||
|
||||
SET(TSP_LIB_OUTPUT_PATH ${TSP_BINARY_DIR}/lib)
|
||||
SET(TSP_LIB_OUTPUT_PATH ${TSP_BIN_DIR}/lib)
|
||||
SET(LIBRARY_OUTPUT_PATH ${TSP_LIB_OUTPUT_PATH})
|
||||
|
||||
SET (TSP_SOURCES graph.cpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue