Don't override user provided CMAKE_OSX_DEPLOYMENT_TARGET.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Fri, 2 Oct 2020 16:41:01 +0000 (19:41 +0300)
committerPaul Bauer <paul.bauer.q@gmail.com>
Mon, 5 Oct 2020 06:09:25 +0000 (06:09 +0000)
Remove `FORCE` from the CMake `set()` in case users want to specify
another target, such as 10.15.

Allows users to resolve potential linker warnings by setting
CMAKE_OSX_DEPLOYMENT_TARGET on the CMake command line.

CMakeLists.txt
python_packaging/src/CMakeLists.txt

index 53dc65842b5b85e4b70b71d2d895f2f74b352c40..63280f868c8d244f47b0eca6aa925cde88d2b5de 100644 (file)
@@ -46,8 +46,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
     # Providing a default value >=10.14 helps to find modern C++ compatibility,
     # such as by defaulting to the Clang libc++ instead of libstdc++.
     set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14 CACHE STRING
-        "OS X deployment target affects default SDK version and compiler flags."
-        FORCE)
+        "OS X deployment target affects default SDK version and compiler flags.")
     # By default, limit the binary architecture to a single 64-bit build.
     set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
         "OS X architecture affects the compatibility of the (potentially fat) binaries produced."
index fb9dbd2f215649befc11b1ab0f0203502e5ae3cd..a0e04c002d5ee1eb06a4094a08254355768bcd1a 100644 (file)
@@ -47,8 +47,7 @@ cmake_minimum_required(VERSION 3.13.0)
 # Reference https://scikit-build.readthedocs.io/en/latest/generators.html#macosx
 # and https://github.com/MacPython/wiki/wiki/Spinning-wheels
 set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14 CACHE STRING
-    "OS X deployment target below 10.14 does not use modern standard library"
-    FORCE)
+    "OS X deployment target below 10.14 does not use modern standard library")
 set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
     "OS X should build Python package for 64-bit architecture"
     FORCE)