-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
28 lines (20 loc) · 1.01 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
# Reference: https://arne-mertz.de/2018/06/cmake-project-structure/
cmake_minimum_required(VERSION 3.5)
project(2019-c1-tp3)
# Esto majora el debugging con gdb
# Cambiar -O1 por -O0 si trae problemas, le puse O1 para que no me tire
# warnings de fortify
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O1")
option(WITH_GUI "Preparar compilación con interfaz gráfica (necesita SDL instalado)" OFF)
SET( CMAKE_EXPORT_COMPILE_COMMANDS ON )
# Algunos flags para pasar al compilador (gnu++11 en vez de c++11 para que sea cross-plat)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=gnu++11 -ggdb3 -g")
add_subdirectory("src")
add_subdirectory("tests")
if (WITH_GUI)
set_target_properties(ExtremeExorcism PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
endif (WITH_GUI)
set_target_properties(correrTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
file(COPY resources DESTINATION ${CMAKE_BINARY_DIR}/bin)