Skip to content

Commit

Permalink
fixed potential issues with ARM compilation under Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
svenwoop committed Jun 15, 2022
1 parent 64774c9 commit 489b746
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions common/cmake/gnu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ MACRO(_SET_IF_EMPTY VAR VALUE)
ENDMACRO()

IF (EMBREE_ARM)
# No thing to declare.
SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__")
SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__")
SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
ELSE ()
_SET_IF_EMPTY(FLAGS_SSE2 "-msse2")
_SET_IF_EMPTY(FLAGS_SSE42 "-msse4.2")
Expand All @@ -17,7 +20,7 @@ ELSE ()
_SET_IF_EMPTY(FLAGS_AVX512 "-mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mprefer-vector-width=256")
ENDIF ()

OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." OFF)
OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
IF (EMBREE_IGNORE_CMAKE_CXX_FLAGS)
SET(CMAKE_CXX_FLAGS "")
ENDIF()
Expand Down

0 comments on commit 489b746

Please sign in to comment.