Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCPKG_MANIFEST_MODE can not be set to TRUE after adding a vcpkg.json file #12208

Closed
petersteneteg opened this issue Jul 2, 2020 · 0 comments · Fixed by #12227
Closed

VCPKG_MANIFEST_MODE can not be set to TRUE after adding a vcpkg.json file #12208

petersteneteg opened this issue Jul 2, 2020 · 0 comments · Fixed by #12227
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:manifests This PR or Issue pertains to the Manifests feature

Comments

@petersteneteg
Copy link
Contributor

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

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:

  1. run cmake configure on a project without a manifest file
  2. add a manifest file
  3. set VCPKG_MANIFEST_MODE to true in cmake
  4. 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

@PhoebeHui PhoebeHui added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Jul 2, 2020
@PhoebeHui PhoebeHui self-assigned this Jul 2, 2020
@strega-nil strega-nil added the info:manifests This PR or Issue pertains to the Manifests feature label Jul 8, 2020
strega-nil added a commit that referenced this issue Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:manifests This PR or Issue pertains to the Manifests feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants