Skip to content

Commit 787a118

Browse files
compiler check
1 parent 0821eff commit 787a118

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,12 @@ if (USE_CPU_EXTENSIONS)
115115
endif()
116116

117117
if (AWS_ARCH_ARM32)
118-
target_compile_options(${PROJECT_NAME} PRIVATE
119-
-Wno-unknown-pragmas
118+
# XXHash impl uses some unrolling pragmas that were not supported until gcc 8.0+ on arm
119+
# disable warning for that. it will be slower but will continue working.
120+
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "8.0")
121+
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-unknown-pragmas
120122
)
123+
endif ()
121124
endif()
122125

123126
target_include_directories(${PROJECT_NAME} PUBLIC

0 commit comments

Comments
 (0)