cmocka: add static lib and cmockery support.

Closes #9082.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Stephen 2017-01-19 16:50:02 -08:00 committed by Mike McQuaid
parent cf5c06f792
commit af14742bfb

View file

@ -15,12 +15,13 @@ class Cmocka < Formula
def install
args = std_cmake_args
args << "-DWITH_STATIC_LIB=ON" << "-DWITH_CMOCKERY_SUPPORT=ON" << "-DUNIT_TESTING=ON"
if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0"
end
mkdir "build" do
system "cmake", "..", "-DUNIT_TESTING=On", *args
system "cmake", "..", *args
system "make"
system "make", "install"
end