cppad 20230000.0
* cppad 20230000.0 * cppad: update build and test Closes #119570. Signed-off-by: Rui Chen <rui@chenrui.dev> Co-authored-by: Rui Chen <rui@chenrui.dev> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>master
parent
356867484c
commit
62d2cf36b8
|
@ -1,8 +1,8 @@
|
|||
class Cppad < Formula
|
||||
desc "Differentiation of C++ Algorithms"
|
||||
homepage "https://www.coin-or.org/CppAD"
|
||||
url "https://github.com/coin-or/CppAD/archive/20220000.5.tar.gz"
|
||||
sha256 "9fb4562f6169855eadcd86ac4671593d1c0edf97bb6ce7cbb28e19af2bfc165e"
|
||||
url "https://github.com/coin-or/CppAD/archive/20230000.0.tar.gz"
|
||||
sha256 "339018f18effe35e1d9845bb7c7070e726396f37244b1855fb242c8b89d0b623"
|
||||
license "EPL-2.0"
|
||||
version_scheme 1
|
||||
head "https://github.com/coin-or/CppAD.git", branch: "master"
|
||||
|
@ -27,11 +27,9 @@ class Cppad < Formula
|
|||
def install
|
||||
ENV.cxx11
|
||||
|
||||
mkdir "build" do
|
||||
system "cmake", "..", *std_cmake_args,
|
||||
"-Dcppad_prefix=#{prefix}"
|
||||
system "make", "install"
|
||||
end
|
||||
system "cmake", "-S", ".", "-B", "build", "-Dcppad_prefix=#{prefix}", *std_cmake_args
|
||||
system "cmake", "--build", "build"
|
||||
system "cmake", "--install", "build"
|
||||
|
||||
pkgshare.install "example"
|
||||
end
|
||||
|
@ -39,6 +37,7 @@ class Cppad < Formula
|
|||
test do
|
||||
(testpath/"test.cpp").write <<~EOS
|
||||
#include <cassert>
|
||||
#include <cppad/local/temp_file.hpp>
|
||||
#include <cppad/utility/thread_alloc.hpp>
|
||||
|
||||
int main(void) {
|
||||
|
@ -50,6 +49,7 @@ class Cppad < Formula
|
|||
EOS
|
||||
|
||||
system ENV.cxx, "#{pkgshare}/example/general/acos.cpp", "-std=c++11", "-I#{include}",
|
||||
"-L#{lib}", "-lcppad_lib",
|
||||
"test.cpp", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue