You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the CMake: Configure project successfully installs my requirements, telling me (excerpted to focus on boost-test):
[cmake] The package boost-test is compatible with built-in CMake targets of FindBoost.cmake:
[cmake]
[cmake] find_package(Boost REQUIRED COMPONENTS test)
[cmake] target_link_libraries(main PRIVATE Boost::test)
[cmake]
[cmake] or the generated cmake configs via:
[cmake]
[cmake] find_package(boost_test REQUIRED CONFIG)
[cmake] target_link_libraries(main PRIVATE Boost::test)
and then in CMake, I do find_package to find the things I requested from vcpkg, using either of the forms suggested. It finds my other requirements, but I can't get it to find boost-test, using either of the recommended lines, and I get the error:
[cmake] CMake Error at C:/Users/amethyst/repo/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
[cmake] Could not find a package configuration file provided by "boost_test"
[cmake] (requested version 1.87.0) with any of the following names:
[cmake]
[cmake] boost_testConfig.cmake
[cmake] boost_test-config.cmake
[cmake]
[cmake] Add the installation prefix of "boost_test" to CMAKE_PREFIX_PATH or set
[cmake] "boost_test_DIR" to a directory containing one of the above files. If
[cmake] "boost_test" provides a separate development package or SDK, be sure it has
[cmake] been installed.
[cmake] Call Stack (most recent call first):
[cmake] out/build/x64-debug/vcpkg_installed/x64-windows/share/boost/BoostConfig.cmake:67 (find_package)
[cmake] out/build/x64-debug/vcpkg_installed/x64-windows/share/boost/BoostConfig.cmake:128 (boostcfg_find_component)
[cmake] out/build/x64-debug/vcpkg_installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:3 (_find_package)
[cmake] C:/Users/amethyst/repo/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
[cmake] C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.30/Modules/FindBoost.cmake:610 (find_package)
[cmake] out/build/x64-debug/vcpkg_installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:3 (_find_package)
[cmake] C:/Users/amethyst/repo/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
[cmake] core/CMakeLists.txt:63 (find_package)
Looking in the directory where the other .cmake files are for boost components, I see none for boost_test. BUT, I do see one for boost_unit_test_framework, which is what I was kinda expecting since I am adapting my project from MacOS/Linux to Windows, and previously was looking for boost_unit_test_framework.
So, I suspect that the output from vcpkg telling me how to find boost-test are incorrect.
use a vcpkg recommended cmake line to try to find boost-test: either find_package(Boost REQUIRED COMPONENTS test) or find_package(boost_test REQUIRED CONFIG) to try to find
Run CMake Configure
Error
Expected behavior
If I find boost-test from vcpkg, the way it tells me to find that package in cmake should match and be usable.
Failure logs
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm using vcpkg in CMake on Windows in Visual Studio Code (to build a C++/Python library using Boost.Python). In my
vcpkg.json
I haveRunning the CMake: Configure project successfully installs my requirements, telling me (excerpted to focus on boost-test):
and then in CMake, I do
find_package
to find the things I requested from vcpkg, using either of the forms suggested. It finds my other requirements, but I can't get it to find boost-test, using either of the recommended lines, and I get the error:Looking in the directory where the other .cmake files are for boost components, I see none for boost_test. BUT, I do see one for
boost_unit_test_framework
, which is what I was kinda expecting since I am adapting my project from MacOS/Linux to Windows, and previously was looking forboost_unit_test_framework
.So, I suspect that the output from vcpkg telling me how to find boost-test are incorrect.
Indeed, I can find by using
which is how I was finding it before.
Environment
To Reproduce
Steps to reproduce the behavior:
"boost-test",
invcpkg.json
find_package(Boost REQUIRED COMPONENTS test)
orfind_package(boost_test REQUIRED CONFIG)
to try to findExpected behavior
If I find
boost-test
from vcpkg, the way it tells me to find that package in cmake should match and be usable.Failure logs
Additional context
The text was updated successfully, but these errors were encountered: