Skip to content

Commit

Permalink
Trying to solve issue on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
piponazo committed Jun 10, 2020
1 parent 6624c5b commit a405cf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/compilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN

# This fails under Fedora - MinGW - Gcc 8.3
if (NOT MINGW)
if (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
if (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.0")
if (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
add_compile_options(-fstack-clash-protection -fcf-protection)
else()
add_compile_options(-fstack-clash-protection)
endif()
endif()

if (COMPILER_IS_GCC OR (COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.7 ))
if (COMPILER_IS_GCC OR (COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "3.6" ))
# is not available for clang 3.4.2. it appears to be present in clang 3.7.
add_compile_options(-fstack-protector-strong)
endif()
Expand Down
4 changes: 4 additions & 0 deletions cmake/mainSetup.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# In this file we configure some CMake settings we do not want to make visible directly in the main
# CMakeLists.txt file.

if(POLICY CMP0054) # CMake 3.1: Only interpret if() arguments as variables or keywords when unquoted.
cmake_policy(SET CMP0054 NEW)
endif()

include(GNUInstallDirs)
include(CheckFunctionExists)
include(GenerateExportHeader)
Expand Down

0 comments on commit a405cf2

Please sign in to comment.