diff --git a/modules/UseCorrade.cmake b/modules/UseCorrade.cmake index e2a7d73cf..7f4bcc944 100644 --- a/modules/UseCorrade.cmake +++ b/modules/UseCorrade.cmake @@ -102,10 +102,10 @@ endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?Clang" AND NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") OR CORRADE_TARGET_EMSCRIPTEN) set(CORRADE_PEDANTIC_COMPILER_OPTIONS "-Wall" "-Wextra" - "$<$,CXX>:-Wold-style-cast>" + "$<$:-Wold-style-cast>" "-Winit-self" # -Werror=return-type doesn't work on nvcc, use it just for C and C++ - "$<$,C>,$,CXX>>:-Werror=return-type>" + "$<$,$>:-Werror=return-type>" "-Wmissing-declarations" # -Wpedantic is since 4.8, until then only -pedantic (which doesn't # have any -Wno-pedantic or a way to disable it for a particular line) @@ -139,7 +139,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "(Appl # TODO: do this with check_c_compiler_flags() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") list(APPEND CORRADE_PEDANTIC_COMPILER_OPTIONS - "$<$,CXX>:-Wzero-as-null-pointer-constant>" + "$<$:-Wzero-as-null-pointer-constant>" # TODO: enable when this gets to Clang (not in 3.9, but in master # since https://github.com/llvm-mirror/clang/commit/0a022661c797356e9c28e4999b6ec3881361371e) @@ -330,7 +330,7 @@ endif() # COMPILE_FEATURES is present either. It doesn't cover adding flags using # target_compile_options(), though. set(_CORRADE_CXX_STANDARD_ONLY_IF_NOT_ALREADY_SET - "$,CXX>,$>>,$>>") + "$,$>>,$>>") foreach(_standard 11 14 17 20) if(CORRADE_CXX${_standard}_STANDARD_FLAG) set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS