Update to cmake2.6 + modif to support compatibility with icc

This commit is contained in:
paradiseo 2009-01-12 09:14:02 +00:00
commit f2d19ce187
5 changed files with 50 additions and 32 deletions

View file

@ -1,4 +1,4 @@
######################################################################################
### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line
######################################################################################
@ -24,7 +24,7 @@ SET(VERSION "1.02" CACHE STRING "Global version" FORCE)
SET(GLOBAL_VERSION "${VERSION}")
# check cmake version compatibility
CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
# regular expression checking
INCLUDE_REGULAR_EXPRESSION("^.*$" "^$")
@ -51,9 +51,6 @@ INCLUDE(ConfigureChecks.cmake)
INCLUDE(Dart OPTIONNAL)
# the project can have a DartConfig.cmake file
#INCLUDE(DartConfig.cmake OPTIONNAL)
# now create config headers
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
@ -110,13 +107,16 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
#####################################################################################
######################################################################################
### compilation of examples?
######################################################################################
SET(ENABLE_CMAKE_EXAMPLE TRUE CACHE BOOL "Enable copy of benchs and parameters file?")
######################################################################################
### 4) Test config
######################################################################################
#SET(ENABLE_CMAKE_TESTING TRUE CACHE BOOL "Enable testing ?")
IF (ENABLE_CMAKE_TESTING)
ENABLE_TESTING()
ENDIF (ENABLE_CMAKE_TESTING)
@ -127,6 +127,9 @@ ENDIF (ENABLE_CMAKE_TESTING)
### 5) Where must cmake go now ?
######################################################################################
SUBDIRS(app doc src test tutorial)
ADD_SUBDIRECTORY(app)
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(test)
ADD_SUBDIRECTORY(tutorial)
######################################################################################

View file

@ -3,6 +3,7 @@
### 1) Where must cmake go now ?
######################################################################################
SUBDIRS(gprop gpsymreg mastermind)
ADD_SUBDIRECTORY(gprop)
ADD_SUBDIRECTORY(gpsymreg)
ADD_SUBDIRECTORY(mastermind)
######################################################################################

View file

@ -71,7 +71,7 @@ public:
virtual std::string className(void) const
{ return "eoStat"; }
eoStat<EOT, T>& addTo(eoCheckPoint<EOT>& cp) { cp.add(*this); return *this; }
eoStat<EOT, T>& addTo(eoMonitor& mon) { mon.add(*this); return *this; }
};
@ -87,7 +87,7 @@ class eoSortedStatBase : public eoUF<const std::vector<const EOT*>&, void>
public:
virtual void lastCall(const std::vector<const EOT*>&) {}
virtual std::string className(void) const { return "eoSortedStatBase"; }
};
/**
@ -101,7 +101,7 @@ class eoSortedStat : public eoSortedStatBase<EOT>, public eoValueParam<ParamType
public :
eoSortedStat(ParamType _value, std::string _desc) : eoValueParam<ParamType>(_value, _desc) {}
virtual std::string className(void) const { return "eoSortedStat"; }
eoSortedStat<EOT, ParamType>& addTo(eoCheckPoint<EOT>& cp) { cp.add(*this); return *this; }
eoSortedStat<EOT, ParamType>& addTo(eoMonitor& mon) { mon.add(*this); return *this; }
};
@ -392,7 +392,7 @@ class eoDistanceStat : public eoStat<EOT, double>
{
public:
using eoDistanceStat< EOT >::value;
using eoStat<EOT, double>::value;
eoDistanceStat(std::string _name = "distance")
: eoStat<EOT, double>(0.0, _name)

View file

@ -4,6 +4,11 @@
### 1) Where must cmake go now ?
######################################################################################
SUBDIRS(Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 Lesson6)
ADD_SUBDIRECTORY(Lesson1)
ADD_SUBDIRECTORY(Lesson2)
ADD_SUBDIRECTORY(Lesson3)
ADD_SUBDIRECTORY(Lesson4)
ADD_SUBDIRECTORY(Lesson5)
ADD_SUBDIRECTORY(Lesson6)
######################################################################################

View file

@ -3,23 +3,32 @@
### 0) Copy the ESEA.param and RealEA.param files in the build directory for an easy use.
######################################################################################
ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param)
ADD_CUSTOM_COMMAND(
TARGET param
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param
${EO_BINARY_DIR}/tutorial/Lesson4)
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param
${EO_BINARY_DIR}/tutorial/Lesson4/ESEA.param
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param
${EO_BINARY_DIR}/tutorial/Lesson4/RealEA.param
)
#ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param)
#ADD_CUSTOM_COMMAND(
# TARGET param
# POST_BUILD
# COMMAND ${CMAKE_COMMAND}
# ARGS -E copy_if_different
# ${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param
# ${EO_BINARY_DIR}/tutorial/Lesson4)
ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param)
ADD_CUSTOM_COMMAND(
TARGET param
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param
${EO_BINARY_DIR}/tutorial/Lesson4)
#ADD_CUSTOM_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param)
#ADD_CUSTOM_COMMAND(
# TARGET param
# POST_BUILD
# COMMAND ${CMAKE_COMMAND}
# ARGS -E copy_if_different
# ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param
# ${EO_BINARY_DIR}/tutorial/Lesson4)
######################################################################################