Fix configuration for older CMake versions
@@ -99,10 +99,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_compile_options(-fvisibility=hidden)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
- #disable gcc caller-saves flag for O2-O3
+ #disable gcc caller-saves flag for O2-O3 optimizations
#workaround fix for gcc 9.3+
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
- if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.3)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.3 OR
+ CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 9.9)
add_compile_options(-fno-caller-saves)
endif()
endif()
