aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-06-26 12:15:27 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit59e0e42d7f612f4e9f526a0632a86dc0300ad76f (patch)
tree197ee2ba7c16c840205bc109ead5ebe5d34ea993 /src/CMakeLists.txt
parent304eff45622c058bacad63326d5ffc2b8f75b8da (diff)
cmake: modernized to the best of my knowledge
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b11d397..aa1c2a0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,7 +10,35 @@ add_executable(winman
${IVI_APP_PROTO}
${IVI_CON_PROTO})
-add_definitions(-DWINMAN_VERSION_STRING="${PACKAGE_VERSION}")
+target_compile_definitions(winman
+ PRIVATE
+ WINMAN_VERSION_STRING="${PACKAGE_VERSION}"
+ _GNU_SOURCE) # XXX should I define this here?!
+
+target_compile_options(winman
+ PRIVATE
+ -Wall -Wextra -Wno-unused-parameter -Wno-comment)
+
+set_target_properties(winman
+ PROPERTIES
+ CXX_EXTENSIONS OFF
+ CXX_STANDARD 14
+ CXX_STANDARD_REQUIRED ON)
+
+set_target_properties(winman
+ PROPERTIES
+ C_EXTENSIONS OFF
+ C_STANDARD 99
+ C_STANDARD_REQUIRED ON)
+
+if (NOT ${SANITIZER_MODE} STREQUAL "none" AND NOT ${SANITIZER_MODE} STREQUAL "")
+ target_compile_options(winman
+ PRIVATE
+ -fsanitize=${SANITIZER_MODE} -g -fno-omit-frame-pointer)
+ set_target_properties(winman
+ PROPERTIES
+ LINK_FLAGS "-fsanitize=${SANITIZER_MODE} -g")
+endif()
target_link_libraries(winman
${WLC_LIBRARIES})