diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2017-09-24 02:30:08 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2017-10-13 21:32:18 +0000 |
commit | 9bba3866ffc0d382d511d298d2460c618bfa6c0d (patch) | |
tree | d900cce53485ca54b579cc71c3e0e726ff898041 /cmake | |
parent | 68ef8797118b6015ac47130c789cd93e73b03597 (diff) |
CMake: Allow user build flags to override default build flags
Autotools has the very useful feature by design of allowing the user
to override the default build flags (you break it you keep it).
Apparently CMake applies COMPILE_OPTIONS target property after
CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those
variables instead to make it work then.
Specific target flag overrides can still be added with COMPILER_OPTIONS
(e.g: generated files with -Wno-warning) but this is less effective and
then we're back at the point where this overrides user flags. It's less
of a concern though.
Change-Id: I44761a79be4289238e02d4e781fef0099628817b
Reviewed-on: https://code.wireshark.org/review/23675
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>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/WiresharkPlugin.cmake | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/cmake/modules/WiresharkPlugin.cmake b/cmake/modules/WiresharkPlugin.cmake index 04b11377f2..488175fca6 100644 --- a/cmake/modules/WiresharkPlugin.cmake +++ b/cmake/modules/WiresharkPlugin.cmake @@ -33,7 +33,6 @@ macro(ADD_PLUGIN_LIBRARY _plugin) set_target_properties(${_plugin} PROPERTIES PREFIX "" - COMPILE_OPTIONS "${WS_WARNINGS_C_FLAGS}" LINK_FLAGS "${WS_LINK_FLAGS}" FOLDER "Plugins" ) |