Update to cmake2.6 + modif to support compatibility with icc
This commit is contained in:
parent
893204f8f1
commit
f2d19ce187
5 changed files with 50 additions and 32 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line
|
### 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}")
|
SET(GLOBAL_VERSION "${VERSION}")
|
||||||
|
|
||||||
# check cmake version compatibility
|
# check cmake version compatibility
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
|
||||||
|
|
||||||
# regular expression checking
|
# regular expression checking
|
||||||
INCLUDE_REGULAR_EXPRESSION("^.*$" "^$")
|
INCLUDE_REGULAR_EXPRESSION("^.*$" "^$")
|
||||||
|
|
@ -51,9 +51,6 @@ INCLUDE(ConfigureChecks.cmake)
|
||||||
|
|
||||||
INCLUDE(Dart OPTIONNAL)
|
INCLUDE(Dart OPTIONNAL)
|
||||||
|
|
||||||
# the project can have a DartConfig.cmake file
|
|
||||||
#INCLUDE(DartConfig.cmake OPTIONNAL)
|
|
||||||
|
|
||||||
# now create config headers
|
# now create config headers
|
||||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
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
|
### 4) Test config
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
#SET(ENABLE_CMAKE_TESTING TRUE CACHE BOOL "Enable testing ?")
|
|
||||||
|
|
||||||
IF (ENABLE_CMAKE_TESTING)
|
IF (ENABLE_CMAKE_TESTING)
|
||||||
ENABLE_TESTING()
|
ENABLE_TESTING()
|
||||||
ENDIF (ENABLE_CMAKE_TESTING)
|
ENDIF (ENABLE_CMAKE_TESTING)
|
||||||
|
|
@ -127,6 +127,9 @@ ENDIF (ENABLE_CMAKE_TESTING)
|
||||||
### 5) Where must cmake go now ?
|
### 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)
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
### 1) Where must cmake go now ?
|
### 1) Where must cmake go now ?
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
SUBDIRS(gprop gpsymreg mastermind)
|
ADD_SUBDIRECTORY(gprop)
|
||||||
|
ADD_SUBDIRECTORY(gpsymreg)
|
||||||
|
ADD_SUBDIRECTORY(mastermind)
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public:
|
||||||
virtual std::string className(void) const
|
virtual std::string className(void) const
|
||||||
{ return "eoStat"; }
|
{ return "eoStat"; }
|
||||||
|
|
||||||
|
|
||||||
eoStat<EOT, T>& addTo(eoCheckPoint<EOT>& cp) { cp.add(*this); return *this; }
|
eoStat<EOT, T>& addTo(eoCheckPoint<EOT>& cp) { cp.add(*this); return *this; }
|
||||||
eoStat<EOT, T>& addTo(eoMonitor& mon) { mon.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:
|
public:
|
||||||
virtual void lastCall(const std::vector<const EOT*>&) {}
|
virtual void lastCall(const std::vector<const EOT*>&) {}
|
||||||
virtual std::string className(void) const { return "eoSortedStatBase"; }
|
virtual std::string className(void) const { return "eoSortedStatBase"; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -101,7 +101,7 @@ class eoSortedStat : public eoSortedStatBase<EOT>, public eoValueParam<ParamType
|
||||||
public :
|
public :
|
||||||
eoSortedStat(ParamType _value, std::string _desc) : eoValueParam<ParamType>(_value, _desc) {}
|
eoSortedStat(ParamType _value, std::string _desc) : eoValueParam<ParamType>(_value, _desc) {}
|
||||||
virtual std::string className(void) const { return "eoSortedStat"; }
|
virtual std::string className(void) const { return "eoSortedStat"; }
|
||||||
|
|
||||||
eoSortedStat<EOT, ParamType>& addTo(eoCheckPoint<EOT>& cp) { cp.add(*this); return *this; }
|
eoSortedStat<EOT, ParamType>& addTo(eoCheckPoint<EOT>& cp) { cp.add(*this); return *this; }
|
||||||
eoSortedStat<EOT, ParamType>& addTo(eoMonitor& mon) { mon.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:
|
public:
|
||||||
|
|
||||||
using eoDistanceStat< EOT >::value;
|
using eoStat<EOT, double>::value;
|
||||||
|
|
||||||
eoDistanceStat(std::string _name = "distance")
|
eoDistanceStat(std::string _name = "distance")
|
||||||
: eoStat<EOT, double>(0.0, _name)
|
: eoStat<EOT, double>(0.0, _name)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@
|
||||||
### 1) Where must cmake go now ?
|
### 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)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -3,23 +3,32 @@
|
||||||
### 0) Copy the ESEA.param and RealEA.param files in the build directory for an easy use.
|
### 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)
|
EXECUTE_PROCESS(
|
||||||
ADD_CUSTOM_COMMAND(
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
TARGET param
|
${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param
|
||||||
POST_BUILD
|
${EO_BINARY_DIR}/tutorial/Lesson4/ESEA.param
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
ARGS -E copy_if_different
|
${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param
|
||||||
${EO_SOURCE_DIR}/tutorial/Lesson4/ESEA.param
|
${EO_BINARY_DIR}/tutorial/Lesson4/RealEA.param
|
||||||
${EO_BINARY_DIR}/tutorial/Lesson4)
|
)
|
||||||
|
|
||||||
|
#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_TARGET(param DEPENDS ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param)
|
||||||
ADD_CUSTOM_COMMAND(
|
#ADD_CUSTOM_COMMAND(
|
||||||
TARGET param
|
# TARGET param
|
||||||
POST_BUILD
|
# POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND}
|
# COMMAND ${CMAKE_COMMAND}
|
||||||
ARGS -E copy_if_different
|
# ARGS -E copy_if_different
|
||||||
${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param
|
# ${EO_SOURCE_DIR}/tutorial/Lesson4/RealEA.param
|
||||||
${EO_BINARY_DIR}/tutorial/Lesson4)
|
# ${EO_BINARY_DIR}/tutorial/Lesson4)
|
||||||
|
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
Reference in a new issue