X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=cmake%2FQuasselMacros.cmake;h=9ba0003a8d42fae4987e2313b58c41e1106d943c;hp=3f9f09269af5cf6c4c27c0fd8a3630709b195540;hb=HEAD;hpb=c8ddabf364eff2400c61cea395aefe69eb8ba1b3 diff --git a/cmake/QuasselMacros.cmake b/cmake/QuasselMacros.cmake index 3f9f0926..9ba0003a 100644 --- a/cmake/QuasselMacros.cmake +++ b/cmake/QuasselMacros.cmake @@ -410,8 +410,12 @@ endfunction() function(process_cmake_cxx_flags) string(TOUPPER ${CMAKE_BUILD_TYPE} upper_build_type) set(cxx_flags "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${upper_build_type}}") - separate_arguments(sep_cxx_flags UNIX_COMMAND ${cxx_flags}) - add_compile_options(${sep_cxx_flags}) + if(CMAKE_VERSION VERSION_LESS 3.12) + separate_arguments(sep_cxx_flags UNIX_COMMAND ${cxx_flags}) + add_compile_options(${sep_cxx_flags}) + else() + add_compile_options("SHELL:${cxx_flags}") + endif() set(CMAKE_CXX_FLAGS "" PARENT_SCOPE) set(CMAKE_CXX_FLAGS_${upper_build_type} "" PARENT_SCOPE) endfunction()