diff options
author | Manish Upadhyay <59823396+maupadhyay@users.noreply.github.com> | 2021-04-13 14:12:20 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 14:12:20 +0530 |
commit | ecf54bdaf75133e5246e9988087824527446f3f4 (patch) | |
tree | 82a4d6f7d2852efa8b3835388c29fcc25a0f69f7 | |
parent | 42eb5267d1ffc1d22066438599a9e2dec020d9ca (diff) | |
parent | 0eb719e713a5480baf7dcf404355626f71853cc9 (diff) |
Merge pull request #18 from matthiasbaldi/main
Improve linux gcc version check
-rw-r--r-- | build/shared/SharedConfig_Common.cmake | 4 |
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}") |