summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthiasbaldi <matthias.baldi@lambda-it.ch>2020-09-01 16:54:47 +0200
committermatthiasbaldi <matthias.baldi@lambda-it.ch>2020-09-01 16:54:47 +0200
commit0eb719e713a5480baf7dcf404355626f71853cc9 (patch)
tree82a4d6f7d2852efa8b3835388c29fcc25a0f69f7
parent42eb5267d1ffc1d22066438599a9e2dec020d9ca (diff)
improve linux gcc version check
-rw-r--r--build/shared/SharedConfig_Common.cmake4
1 files 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}")