From 7ed62c1139acce5beef53d9712cd1dba62cb969d Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 26 Jul 2024 17:38:16 -0400 Subject: [PATCH] frobtads: use modern cmake syntax Signed-off-by: Rui Chen --- Formula/f/frobtads.rb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Formula/f/frobtads.rb b/Formula/f/frobtads.rb index 880e1506eff0b..22f30986842ba 100644 --- a/Formula/f/frobtads.rb +++ b/Formula/f/frobtads.rb @@ -24,13 +24,24 @@ class Frobtads < Formula uses_from_macos "ncurses" def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" end test do - assert_match(/FrobTADS #{version}$/, shell_output("#{bin}/frob --version")) + (testpath/"hello.t").write <<~EOS + #charset "us-ascii" + #include + + main(args) { + "Hello, Homebrew!"; + } + EOS + + system bin/"t3make", "hello.t" + system bin/"frob", "--no-pause", "hello.t3" + + assert_match version.to_s, shell_output("#{bin}/frob --version") end end