-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Closed
Copy link
Labels
category:vcpkg-bugThe issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)info:manifestsThis PR or Issue pertains to the Manifests featureThis PR or Issue pertains to the Manifests feature
Description
If one has an existing cmake cache and adds a vcpkg.json manifest file and then set VCPKG_MANIFEST_MODE to true
the manifest file will not be found since the _VCPKG_MANIFEST_DIR internal cache variable was already set and will not be updated. Hence the manifest file it not found and an error is printed
the cache variable it set here
vcpkg/scripts/buildsystems/vcpkg.cmake
Line 27 in 9ddf284
set(${OUT} ${_vcpkg_get_dir_out} CACHE INTERNAL "_vcpkg_get_directory_name_of_file_above: ${OUT}") |
and this check prevents it from being updated
if(DEFINED ${OUT}) |
Environment
- OS: Windows
- CMake: 3.17.2
To Reproduce
Steps to reproduce the behavior:
- run cmake configure on a project without a manifest file
- add a manifest file
- set VCPKG_MANIFEST_MODE to true in cmake
- run configure again
Expected behavior
The newly added manifest file should be found
Or an error saying the one has to clear the cache to make it work
Failure logs
CMake Error at C:/Users/petst55.AD/Documents/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:41 (message):
vcpkg manifest mode was enabled, but we couldn't find a manifest file
(vcpkg.json) in any directories above
C:/Users/petst55.AD/Documents/Inviwo/sgct/sgct. Please add a manifest, or
disable manifests by turning off VCPKG_MANIFEST_MODE.
Call Stack (most recent call first):
C:/Users/petst55.AD/Documents/Inviwo/sgct/build/CMakeFiles/3.17.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:10 (project)
Configuring incomplete, errors occurred!
See also "C:/Users/petst55.AD/Documents/Inviwo/sgct/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/petst55.AD/Documents/Inviwo/sgct/build/CMakeFiles/CMakeError.log".
FYI @strega-nil
Metadata
Metadata
Assignees
Labels
category:vcpkg-bugThe issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)info:manifestsThis PR or Issue pertains to the Manifests featureThis PR or Issue pertains to the Manifests feature