From 640382c74364f61da36bdc5b1272e8cda28f1d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Tue, 16 Aug 2016 22:21:59 +0100 Subject: CMake: Allow setting per target compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde --- codecs/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'codecs') diff --git a/codecs/CMakeLists.txt b/codecs/CMakeLists.txt index 5d926cb050..34bd7be885 100644 --- a/codecs/CMakeLists.txt +++ b/codecs/CMakeLists.txt @@ -61,6 +61,7 @@ set(FULL_SO_VERSION "0.0.0") set_target_properties(wscodecs PROPERTIES PREFIX "lib" COMPILE_DEFINITIONS "WS_BUILD_DLL" + COMPILE_OPTIONS "${WS_WS_WARNINGS_C_FLAGS}" LINK_FLAGS "${WS_LINK_FLAGS}" VERSION ${FULL_SO_VERSION} SOVERSION 0 FOLDER "DLLs" -- cgit v1.2.1