From 0eb719e713a5480baf7dcf404355626f71853cc9 Mon Sep 17 00:00:00 2001 From: matthiasbaldi Date: Tue, 1 Sep 2020 16:54:47 +0200 Subject: improve linux gcc version check --- build/shared/SharedConfig_Common.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/shared/SharedConfig_Common.cmake b/build/shared/SharedConfig_Common.cmake index 67ca67a..6a34588 100644 --- a/build/shared/SharedConfig_Common.cmake +++ b/build/shared/SharedConfig_Common.cmake @@ -75,8 +75,8 @@ endfunction(SetupInternalBuildDirectory) function(SetupCompilerFlags) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) set(OUTPUT_VARIABLE "") - # Execute GCC with the -dumpversion option, to give us a version string - execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-dumpversion" OUTPUT_VARIABLE GCC_VERSION_STRING) + # Execute GCC with the --version option, to give us a version string + execute_process(COMMAND ${CMAKE_CXX_COMPILER} "--version" OUTPUT_VARIABLE GCC_VERSION_STRING) # Match only the major and minor versions of the version string string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]" GCC_MAJOR_MINOR_VERSION_STRING "${GCC_VERSION_STRING}") -- cgit v1.2.3