[Bf-blender-cvs] [ebad1d8d339] master: CMake: exclude linker options for APPLE and non-UNIX
Campbell Barton
noreply at git.blender.org
Wed Jan 12 08:55:50 CET 2022
Commit: ebad1d8d339dbcbe918738b493a52f803c538c95
Author: Campbell Barton
Date: Wed Jan 12 18:44:43 2022 +1100
Branches: master
https://developer.blender.org/rBebad1d8d339dbcbe918738b493a52f803c538c95
CMake: exclude linker options for APPLE and non-UNIX
These are only used for non-apple unix systems.
===================================================================
M CMakeLists.txt
M build_files/cmake/platform/platform_unix.cmake
===================================================================
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)
More information about the Bf-blender-cvs
mailing list