-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (37 loc) · 1.71 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
# Version minimum de CMake qui est nécessaire pour compiler :
cmake_minimum_required(VERSION 2.6)
#########
# Nom du projet :
#################
project(AlienInvasion)
set(PLUGIN_API_VERSION_MAJOR 0)
set(PLUGIN_API_VERSION_MINOR 0)
set(AI_VERSION_MAJOR 0)
set(AI_VERSION_MINOR 1)
set(F_TYPE double)
set(EXEC_NAME alien)
########################
# On a besoin de quelques fichiers non-standards :
##################################################
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/.cmake/Modules/")
message(STATUS "Installation PREFIX: " ${CMAKE_INSTALL_PREFIX})
#################
# Quelques flags de compilation :
#################################
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -W -Wextra -Wall -Wc++11-compat -Wpedantic -Woverflow -Wmissing-declarations -Wuninitialized -Winline -Wfloat-equal -Wdiv-by-zero -Wdeprecated -Wdeprecated-declarations -Wcast-align -Wcast-qual -Wbuiltin-macro-redefined -ftrapv -ffinite-math-only")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -g")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O3")
IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
# SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_BUILD_TYPE Debug)
ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
# The macro below forces the build directory to be different from source directory:
include(MacroOutOfSourceBuild)
macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build.")
add_subdirectory(src)
#########
# Configuration :
#################
configure_file(config.h.cmake ${CMAKE_SOURCE_DIR}/include/config.hpp)
# install(FILES share/verif/config.yaml DESTINATION share/verif/)
# vim: spelllang=