formula: make CMake SDK root choice consistent with superenv

This commit is contained in:
Bo Anderson 2020-04-07 16:45:03 +01:00
parent e60f071c50
commit 811b177cf8

View File

@ -1352,8 +1352,7 @@ class Formula
args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0" args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0"
# Ensure CMake is using the same SDK we are using. # Ensure CMake is using the same SDK we are using.
sdk = MacOS.sdk_path_if_needed args << "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_for_formula(self).path}" if MacOS.sdk_root_needed?
args << "-DCMAKE_OSX_SYSROOT=#{sdk}" if sdk
args args
end end