Skip to content

Commit 26e3bfe

Browse files
Update sunshine.rb
1 parent e64acad commit 26e3bfe

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

packaging/sunshine.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class @PROJECT_NAME@ < Formula
4040

4141
on_macos do
4242
depends_on xcode: ["15.3", :build]
43+
depends_on "llvm" => [:build, :test]
4344
end
4445

4546
on_linux do
@@ -187,19 +188,19 @@ def caveats
187188
if ENV["HOMEBREW_BUILDPATH"]
188189
buildpath = ENV["HOMEBREW_BUILDPATH"]
189190

190-
# Change to the build directory for gcovr to work properly
191-
cd "#{buildpath}/build" do
191+
# Change to the source directory for gcovr to work properly
192+
cd buildpath do
192193
# Use the same GCC version that was used for compilation
193-
gcov_executable = "gcov"
194+
gcov_executable = "#{Formula["llvm"].opt_bin}/llvm-cov gcov"
194195

195196
if OS.linux?
196197
# Use GCC 14 to match what was used during compilation
197198
gcc14 = Formula["gcc@14"]
198199
gcov_executable = "#{gcc14.opt_bin}/gcov-14"
199200
end
200201

201-
system "gcovr", ".",
202-
"-r", "../src",
202+
system "gcovr", "build",
203+
"-r", ".",
203204
"--gcov-executable", gcov_executable,
204205
"--exclude-noncode-lines",
205206
"--exclude-throw-branches",

0 commit comments

Comments
 (0)