Skip to content

Commit

Permalink
Merge pull request Homebrew#1078 from ilovezfs/cmake-weak-symbols
Browse files Browse the repository at this point in the history
formula: help CMake with 10.12 SDK on 10.11
  • Loading branch information
ilovezfs committed Sep 22, 2016
2 parents 6353750 + 4c358d6 commit bbed724
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ def inspect
# Note: there isn't a std_autotools variant because autotools is a lot
# less consistent and the standard parameters are more memorable.
def std_cmake_args
%W[
args = %W[
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_INSTALL_PREFIX=#{prefix}
Expand All @@ -1275,6 +1275,14 @@ def std_cmake_args
-DCMAKE_VERBOSE_MAKEFILE=ON
-Wno-dev
]

# Avoid false positives for clock_gettime support on 10.11.
# CMake cache entries for other weak symbols may be added here as needed.
if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0"
end

args
end

# an array of all core {Formula} names
Expand Down

0 comments on commit bbed724

Please sign in to comment.