Skip to content

Commit

Permalink
chaiscript: use modern cmake syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Dec 21, 2024
1 parent 20694d9 commit 6c10bbc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Formula/c/chaiscript.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ class Chaiscript < Formula
depends_on "cmake" => :build

def install
system "cmake", ".", *std_cmake_args
system "make", "install"
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
(testpath/"test.cpp").write <<~CPP
#include <chaiscript/chaiscript.hpp>
#include <chaiscript/chaiscript_stdlib.hpp>
#include <cassert>
int main() {
chaiscript::ChaiScript chai;
assert(chai.eval<int>("123") == 123);
Expand Down

0 comments on commit 6c10bbc

Please sign in to comment.