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 /codecs/CMakeLists.txt | |
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 'codecs/CMakeLists.txt')
-rw-r--r-- | codecs/CMakeLists.txt | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/codecs/CMakeLists.txt b/codecs/CMakeLists.txt index ba2e263505..6f7f51cb4c 100644 --- a/codecs/CMakeLists.txt +++ b/codecs/CMakeLists.txt @@ -71,7 +71,6 @@ 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" |