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