Skip to content

Commit

Permalink
cmake: set -fno-aligned-allocation on macOS ARM
Browse files Browse the repository at this point in the history
We set a deployment target that is lower than 10.14, which means
we have to disable aligned allocation otherwise compilation fails.
  • Loading branch information
selsta committed Oct 26, 2023
1 parent df9f380 commit b4491c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,9 @@ else()

if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
if(ARM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-aligned-allocation")
endif()
endif()

set(DEBUG_FLAGS "-g3")
Expand Down

0 comments on commit b4491c1

Please sign in to comment.