Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-09-18 08:41:13 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-18 12:26:34 +0300
commit0ffd288fab5686f55d68d0d39baf59568f4389e7 (patch)
treec92e584c1a4d417f437b41cb85638ed37e4d1255 /build_files/cmake/platform
parent6bf5cc62e0901175d98506216932ec6ffd4506a5 (diff)
Build: fix gtest build flags affecting actual library
Switch to target_ functions to avoid this.
Diffstat (limited to 'build_files/cmake/platform')
-rw-r--r--build_files/cmake/platform/platform_apple.cmake7
-rw-r--r--build_files/cmake/platform/platform_win32.cmake2
2 files changed, 4 insertions, 5 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>")
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index dd5d04d7c92..7d7efb83b8e 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -767,7 +767,7 @@ if(WITH_TBB)
endif()
# used in many places so include globally, like OpenGL
-blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
+include_directories(SYSTEM "${PTHREADS_INCLUDE_DIRS}")
set(WINTAB_INC ${LIBDIR}/wintab/include)