aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristoph Gysin <christoph.gysin@gmail.com>2015-12-01 21:07:06 +0200
committerChristoph Gysin <christoph.gysin@gmail.com>2015-12-01 22:03:09 +0200
commita043c9030ca974b7f4514d1158ffe926458f7732 (patch)
tree76a4e9a65be953dbefca22eec72d8632942b92f2 /CMakeLists.txt
parentf7ec3d00a08f0d44ae0c8fd756c24f12d68cee9b (diff)
cmake: separate C flags and preprocesser definitions
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d8c3c6a..51209aea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,13 @@ set(CMAKE_C_STANDARD 99)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
-add_definitions("-Wall -Wextra -Wno-unused-parameter -D_GNU_SOURCE")
+add_definitions(
+ -D_GNU_SOURCE
+)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter")
+
list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_CURRENT_SOURCE_DIR}/CMake"
)