SerenityOS / jakt

The Jakt Programming Language
BSD 2-Clause "Simplified" License
2.77k stars 244 forks source link

CMake: Always grab the resource-dir from the Clang we find_package'd #1559

Closed ADKaster closed 3 months ago

ADKaster commented 3 months ago

If the developer has another clang in their path that is different from the one that ends up getting found via find_package, this could lead to some really unexpected behavior.

ADKaster commented 3 months ago

@alimpfard this patch also means that if you do end up passing something like -DClang_DIR=/path/to/dir/with/ClangConfig.cmake, then we will use the correct resource path for that clang.