I'm building a C++ program on macOS. I want to try clang from the clang website, rather than the default that comes with Xcode from Apple. I downloaded a binary build of clang+llvm, unpacked it and added this line to my root CMakeLists.txt:
set(CMAKE_CXX_COMPILER /MyStuff/clang+llvm-15.0.1-x86_64-apple-darwin/bin/clang++)
Now I get errors from CMake:
CMake Error at CMakeLists.txt:20 (find_package):
Could not find a package configuration file provided by "range-v3" with any
of the following names:
range-v3Config.cmake
range-v3-config.cmake
That range-v3 is a package for a C++ library that I had installed with vcpkg.
Do I need to somehow update vcpkg to use the newer clang? How?
I'm using CLion, and vcpkg documentation had me set the "toolchain file" (whatever that is) with the IDE settings. I can see that CLion invokes CMake like this, passing that toolchain file.
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_MAKE_PROGRAM=/Applications/CLion.app/Contents/bin/ninja/mac/ninja
-DCMAKE_TOOLCHAIN_FILE=/Users/rob/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake
-G Ninja -S /Workspace/MyProject -B /Workspace/MyProject/cmake-build-debug