Skip to content

Commit bbed724

Browse files
authored
Merge pull request #1078 from ilovezfs/cmake-weak-symbols
formula: help CMake with 10.12 SDK on 10.11
2 parents 6353750 + 4c358d6 commit bbed724

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Library/Homebrew/formula.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ def inspect
12661266
# Note: there isn't a std_autotools variant because autotools is a lot
12671267
# less consistent and the standard parameters are more memorable.
12681268
def std_cmake_args
1269-
%W[
1269+
args = %W[
12701270
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG
12711271
-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
12721272
-DCMAKE_INSTALL_PREFIX=#{prefix}
@@ -1275,6 +1275,14 @@ def std_cmake_args
12751275
-DCMAKE_VERBOSE_MAKEFILE=ON
12761276
-Wno-dev
12771277
]
1278+
1279+
# Avoid false positives for clock_gettime support on 10.11.
1280+
# CMake cache entries for other weak symbols may be added here as needed.
1281+
if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
1282+
args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0"
1283+
end
1284+
1285+
args
12781286
end
12791287

12801288
# an array of all core {Formula} names

0 commit comments

Comments
 (0)