diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1e0a5521c..acaf46590 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -14,6 +14,18 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE) set_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) +####################################################################################################################### +# fix compat with cmake < 3.26 + +if(CMAKE_VERSION VERSION_LESS 3.26) + if(MSVC) + set(CMAKE_C_COMPILER_FRONTEND_VARIANT "MSVC") + else() + set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU") + endif() + mark_as_advanced(CMAKE_C_COMPILER_FRONTEND_VARIANT) +endif() + ####################################################################################################################### # build options @@ -218,6 +230,7 @@ set_common_target_properties(carla-lilv_sord) target_compile_options(carla-lilv_sord PRIVATE $<$:/wd4005 /wd4090 /wd4133> + $<$:-Wno-maybe-uninitialized> $<$:-Wno-unused-parameter> # workaround compiler bug, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109585 $<$:-fno-strict-aliasing>