diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-09-18 08:41:13 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-18 12:26:34 +0300 |
commit | 0ffd288fab5686f55d68d0d39baf59568f4389e7 (patch) | |
tree | c92e584c1a4d417f437b41cb85638ed37e4d1255 /build_files/cmake/platform/platform_apple.cmake | |
parent | 6bf5cc62e0901175d98506216932ec6ffd4506a5 (diff) |
Build: fix gtest build flags affecting actual library
Switch to target_ functions to avoid this.
Diffstat (limited to 'build_files/cmake/platform/platform_apple.cmake')
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index f2a8bd42a3e..27fcaf823e8 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -352,10 +352,6 @@ endif() if(WITH_CYCLES AND WITH_CYCLES_EMBREE) find_package(Embree 3.8.0 REQUIRED) - # Increase stack size for Embree, only works for executables. - if(NOT WITH_PYTHON_MODULE) - string(APPEND PLATFORM_LINKFLAGS " -Wl,-stack_size,0x100000") - endif() # Embree static library linking can mix up SSE and AVX symbols, causing # crashes on macOS systems with older CPUs that don't have AVX. Using @@ -475,6 +471,9 @@ string(APPEND PLATFORM_LINKFLAGS string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++") string(APPEND PLATFORM_LINKFLAGS " -stdlib=libc++") +# Make stack size more similar to Embree, required for Embree. +string(APPEND PLATFORM_LINKFLAGS_EXECUTABLE " -Wl,-stack_size,0x100000") + # Suppress ranlib "has no symbols" warnings (workaround for T48250) set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>") |