Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpp-gsl: update checksum and cmake build syntax #202145

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Formula/c/cpp-gsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CppGsl < Formula
desc "Microsoft's C++ Guidelines Support Library"
homepage "https://github.com/Microsoft/GSL"
url "https://github.com/Microsoft/GSL/archive/refs/tags/v4.1.0.tar.gz"
sha256 "14255cb38a415ba0cc4f696969562be7d0ed36bbaf13c5e4748870babf130c48"
sha256 "0a227fc9c8e0bf25115f401b9a46c2a68cd28f299d24ab195284eb3f1d7794bd"
license "MIT"
head "https://github.com/Microsoft/GSL.git", branch: "main"

Expand All @@ -13,8 +13,9 @@ class CppGsl < Formula
depends_on "cmake" => :build

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

test do
Expand All @@ -25,6 +26,7 @@ def install
return 0;
}
CPP

system ENV.cxx, "test.cpp", "-o", "test", "-std=c++14"
system "./test"
end
Expand Down
Loading