summaryrefslogtreecommitdiff
path: root/epan/wmem
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-08-16 22:21:59 +0100
committerJoão Valverde <j@v6e.pt>2016-08-23 21:33:09 +0000
commit640382c74364f61da36bdc5b1272e8cda28f1d8f (patch)
tree60c64cb62d309f1f978f68714e11397f88e21d29 /epan/wmem
parent505bcefd20501ae0811f6074f2113b52788d78c5 (diff)
downloadwireshark-640382c74364f61da36bdc5b1272e8cda28f1d8f.tar.gz
CMake: Allow setting per target compiler warnings
Setting our compiler warning flags in CMAKE_C_FLAGS does not allow using different flags per target. Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS and using the COMPILE_OPTIONS property to set them. This change is just setting mechanism and there should be no difference in generated warnings. The check_X_compiler_flag cmake test is changed to test each flag individually. We need a list, not a space separated string, and the aggregate test is not significant. Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25 Reviewed-on: https://code.wireshark.org/review/17150 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/wmem')
-rw-r--r--epan/wmem/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/wmem/CMakeLists.txt b/epan/wmem/CMakeLists.txt
index 524b8b4921..52d798ad18 100644
--- a/epan/wmem/CMakeLists.txt
+++ b/epan/wmem/CMakeLists.txt
@@ -59,6 +59,7 @@ add_library(wmem OBJECT
set_target_properties(wmem PROPERTIES
FOLDER "Libs/epan/wmem"
COMPILE_DEFINITIONS "WS_BUILD_DLL"
+ COMPILE_OPTIONS "${WS_WARNINGS_C_FLAGS}"
)
add_executable(wmem_test EXCLUDE_FROM_ALL wmem_test.c $<TARGET_OBJECTS:wmem>)
@@ -68,6 +69,7 @@ target_link_libraries(wmem_test ${GLIB2_LIBRARIES} wsutil)
set_target_properties(wmem_test PROPERTIES
FOLDER "Tests"
COMPILE_DEFINITIONS "WS_BUILD_DLL"
+ COMPILE_OPTIONS "${WS_WARNINGS_C_FLAGS}"
)
CHECKAPI(