From fae3ee5b53d8724e6edee19acad6ce82eb172846 Mon Sep 17 00:00:00 2001 From: tlegrand Date: Fri, 10 Aug 2007 14:27:12 +0000 Subject: [PATCH] added CMake configuration file --- eo/CMakeLists.txt | 103 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 eo/CMakeLists.txt diff --git a/eo/CMakeLists.txt b/eo/CMakeLists.txt new file mode 100644 index 00000000..bd136796 --- /dev/null +++ b/eo/CMakeLists.txt @@ -0,0 +1,103 @@ + +###################################################################################### +### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line +###################################################################################### + +INCLUDE(eo-conf.cmake OPTIONAL) + +###################################################################################### + + + +###################################################################################### +### 1) Main project config +###################################################################################### + +# set the project name and other variables +PROJECT(EO) + +SET(PACKAGE_BUGREPORT "eodev-help@sourceforge.net") +SET(PACKAGE_NAME "Evolving Objects") +SET(PACKAGE_STRING "Evolving Objects 1.02-cvs1") +SET(PACKAGE_TARNAME "eo") +SET(PACKAGE_VERSION "1.02-cvs1") +SET(VERSION "1.02") + +# check cmake version compatibility +CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR) + +# regular expression checking +INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") + +# set a language for the entire project. +ENABLE_LANGUAGE(CXX) +ENABLE_LANGUAGE(C) + +#################################################################################### + + +##################################################################################### +### 2) Include required modules +##################################################################################### +INCLUDE(CMakeBackwardCompatibilityCXX) + +INCLUDE(FindDoxygen) + +INCLUDE(FindGnuplot) + +INCLUDE(CheckLibraryExists) + +INCLUDE(ConfigureChecks.cmake) + +# now create config headers +configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ) + +###################################################################################### + + +##################################################################################### +### 3) Manage the build type +##################################################################################### + +# the user should choose the build type on windows environments,excepted under cygwin (default=none) +SET(CMAKE_DEFAULT_BUILD_TYPE None CACHE STRING "Variable that stores the default CMake build type" FORCE) + +IF(WIN32 AND NOT CYGWIN) + IF(NOT CMAKE_BUILD_TYPE) + SET( CMAKE_BUILD_TYPE + ${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING + "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." + FORCE) + ENDIF(NOT CMAKE_BUILD_TYPE) + MESSAGE(STATUS "") + MESSAGE(STATUS "Warning: The type of build is: ${CMAKE_BUILD_TYPE}.") + MESSAGE(STATUS "The available types are: None Debug Release RelWithDebInfo MinSizeRel.") + MESSAGE(STATUS "You can choose it with: cmake -D") + MESSAGE(STATUS "") +ENDIF(WIN32 AND NOT CYGWIN) + +##################################################################################### + + +###################################################################################### +### 3) Where must cmake go now ? +###################################################################################### + +SUBDIRS(app contrib doc src test tutorial) + +###################################################################################### + + +###################################################################################### +### 4) Test config +###################################################################################### + +#SET(ENABLE_CMAKE_TESTING TRUE CACHE BOOL "Should we test using Dart") + +IF (ENABLE_CMAKE_TESTING) + ENABLE_TESTING() +ENDIF (ENABLE_CMAKE_TESTING) + +###################################################################################### + +