File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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" ,
You can’t perform that action at this time.
0 commit comments