11class Adaptivecpp < Formula
22 desc "SYCL and C++ standard parallelism for CPUs and GPUs"
3- homepage "https://github.com/AdaptiveCpp/AdaptiveCpp "
3+ homepage "https://adaptivecpp. github.io/ "
44 url "https://github.com/AdaptiveCpp/AdaptiveCpp/archive/refs/tags/v24.10.0.tar.gz"
55 sha256 "3bcd94eee41adea3ccc58390498ec9fd30e1548af5330a319be8ce3e034a6a0b"
66 license "BSD-2-Clause"
7+ revision 1
78 head "https://github.com/AdaptiveCpp/AdaptiveCpp.git" , branch : "develop"
89
910 bottle do
@@ -18,27 +19,32 @@ class Adaptivecpp < Formula
1819
1920 depends_on "cmake" => :build
2021 depends_on "boost"
21- depends_on "llvm"
22+ depends_on "llvm@19 "
2223 uses_from_macos "python"
2324
2425 on_macos do
2526 depends_on "libomp"
2627 end
2728
2829 def install
29- libomp_root = Formula [ "libomp" ] . opt_prefix
30+ args = [ ]
31+ if OS . mac?
32+ libomp_root = Formula [ "libomp" ] . opt_prefix
33+ args << "-DOpenMP_ROOT=#{ libomp_root } "
34+ end
3035
31- system "cmake" , "-S" , "." , "-B" , "build" , "-DOpenMP_ROOT= #{ libomp_root } " , *std_cmake_args
36+ system "cmake" , "-S" , "." , "-B" , "build" , * args , *std_cmake_args
3237 system "cmake" , "--build" , "build"
3338 system "cmake" , "--install" , "build"
3439
3540 # Avoid references to Homebrew shims directory
36- shim_references = [ prefix /"etc/AdaptiveCpp/acpp-core.json" ]
37- inreplace shim_references , Superenv . shims_path / ENV . cxx , ENV . cxx
41+ inreplace prefix /"etc/AdaptiveCpp/acpp-core.json" , Superenv . shims_path / ENV . cxx , ENV . cxx
42+ return unless OS . mac?
3843
3944 # we add -I#{libomp_root}/include to default-omp-cxx-flags
4045 inreplace prefix /"etc/AdaptiveCpp/acpp-core.json" ,
41- "\" default-omp-cxx-flags\" : \" " , "\" default-omp-cxx-flags\" : \" -I#{ libomp_root } /include "
46+ "\" default-omp-cxx-flags\" : \" " ,
47+ "\" default-omp-cxx-flags\" : \" -I#{ libomp_root } /include "
4248 end
4349
4450 test do
0 commit comments