summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Kilies <MarioKilies@GMX.net>2011-01-31 14:00:00 +0100
committerMario Kilies <MarioKilies@GMX.net>2011-01-31 14:00:00 +0100
commitf604643e972f986bd8dca2e5423ee5c82970ad9f (patch)
tree10f9852b0de91637455484a88737a47b56047752
parent8c5b4b9de9f5fdcf01e56ffbb347fcdc605edf73 (diff)
CMake now uses build types and sets additional compiler flags for release and debug builds.
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30917d7..8a897f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,8 +4,15 @@ cmake_minimum_required(VERSION 2.6)
# Set the project name. This will be used by CMake to name project related variables.
project(oxen)
+# Unix Makefile generator: Default to build type 'Release'
+IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE Release)
+ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+
# Set C compiler flags
set(CMAKE_C_FLAGS "-Wall -pedantic -std=c99 -D_POSIX_SOURCE")
+SET(CMAKE_C_FLAGS_RELEASE "-O3")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
# Find dependencies
# Find ncurses