-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
78 lines (54 loc) · 2.82 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
######################################################################################
### 0) Set your application properties
######################################################################################
# check cmake version compatibility
cmake_minimum_required(VERSION 2.6)
# Here define your project name
project(ZDT)
# Here define the name and the version of your package
set(PACKAGE_NAME "ZDT" CACHE STRING "Package name" FORCE)
set(PACKAGE_VERSION "1.0" CACHE STRING "Package version" FORCE)
# regular expression checking
include_regular_expression("^.*$" "^$")
# set a language for the entire project.
enable_language(CXX)
enable_language(C)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/module")
# Link ParadisEO with the project
#find_package(Paradiseo)
find_package(Paradiseo COMPONENTS moeo eoutils eo)
include_directories(${PARADISEO_INCLUDE_DIR})
######################################################################################
######################################################################################
######################################################################################
### 2) Include the sources
######################################################################################
######################################
### Include required modules & utilities
#####################################################################################
include(CMakeBackwardCompatibilityCXX)
include(FindDoxygen)
include(CheckLibraryExists)
######################################################################################
#####################################################################################
### Manage the build type
#####################################################################################
# the user should choose the build type on windows environments,excepted under cygwin (default=none)
set(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE)
find_program(MEMORYCHECK_COMMAND
NAMES purify valgrind
PATHS
"/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]"
DOC "Path to the memory checking command, used for memory error detection.")
if(CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-DCMAKE_VERBOSE_MAKEFILE=ON)
endif(CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-DDEPRECATED_MESSAGES)
######################################################################################
### 3) Link the librairies for your executable
######################################################################################
add_subdirectory(doc)
add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(application)
######################################################################################