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:
authorCampbell Barton <campbell@blender.org>2022-01-12 10:44:43 +0300
committerCampbell Barton <campbell@blender.org>2022-01-12 10:55:13 +0300
commitebad1d8d339dbcbe918738b493a52f803c538c95 (patch)
treeb9e76530674836d24ba132da0037078eb8b04d25
parent795cea2cce3bcfaa7489034a90722ee57cb8e358 (diff)
CMake: exclude linker options for APPLE and non-UNIX
These are only used for non-apple unix systems.
-rw-r--r--CMakeLists.txt14
-rw-r--r--build_files/cmake/platform/platform_unix.cmake2
2 files changed, 9 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c5b5eb317e..88c71899f8e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -559,12 +559,14 @@ if(WIN32)
set(CPACK_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${})
endif()
-# Compiler toolchain
-if(CMAKE_COMPILER_IS_GNUCC)
- option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
- mark_as_advanced(WITH_LINKER_GOLD)
- option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
- mark_as_advanced(WITH_LINKER_LLD)
+# Compiler tool-chain.
+if(UNIX AND NOT APPLE)
+ if(CMAKE_COMPILER_IS_GNUCC)
+ option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
+ mark_as_advanced(WITH_LINKER_GOLD)
+ option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
+ mark_as_advanced(WITH_LINKER_LLD)
+ endif()
endif()
option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 2f1a622c63d..0aaec3083a3 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -18,7 +18,7 @@
# All rights reserved.
# ***** END GPL LICENSE BLOCK *****
-# Libraries configuration for any *nix system including Linux and Unix.
+# Libraries configuration for any *nix system including Linux and Unix (excluding APPLE).
# Detect precompiled library directory
if(NOT DEFINED LIBDIR)