Skip to content

Commit

Permalink
CMake: Add homebrew llvm to the find_package paths
Browse files Browse the repository at this point in the history
Because llvm overrides packages that are provided by macOS system
packages, homebrew goes out of its way to avoid letting them be default
findable. Adding this extra search path avoids having to pass a
CMAKE_PREFIX_PATH or CMAKE_MODULE_PATH argument when using brew llvm.
  • Loading branch information
ADKaster committed Mar 18, 2024
1 parent c5c0731 commit 435baff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ find_package(Threads REQUIRED)

SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC)
find_package(Clang CONFIG)
find_package(Clang CONFIG
PATHS /opt/homebrew/opt/llvm
)

set(JAKT_CPP_AUTO_IMPORT_PROCESSOR_DEFAULT none)
if (Clang_FOUND)
Expand Down

0 comments on commit 435baff

Please sign in to comment.