Merge pull request #1111 from Exiv2/fix_GCC48

fix_GCC48
This commit is contained in:
Robin Mills 2020-03-26 13:25:41 +00:00 committed by GitHub
commit d7f5ce42dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,8 +29,9 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
add_compile_options(-fstack-clash-protection -fcf-protection)
endif()
if (COMPILER_IS_GCC OR (COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.7 ))
# is not available for clang 3.4.2. it appears to be present in clang 3.7.
if( (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5.0) # Not in GCC 4.8
OR (COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.7) # Not in Clang 3.4.2
)
add_compile_options(-fstack-protector-strong)
endif()
endif()