Skip to content

[vcpkg] set CMake policy CMP0087 for X_VCPKG_APPLOCAL_DEPS_INSTALL#15874

Merged
dan-shaw merged 1 commit intomicrosoft:masterfrom
Be-ing:cmake_policy_CMP0087
Jan 28, 2021
Merged

[vcpkg] set CMake policy CMP0087 for X_VCPKG_APPLOCAL_DEPS_INSTALL#15874
dan-shaw merged 1 commit intomicrosoft:masterfrom
Be-ing:cmake_policy_CMP0087

Conversation

@Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Jan 25, 2021

Without this, X_VCPKG_APPLOCAL_DEPS_INSTALL does not work and
CMake prints this warning at the configure step:

CMake Warning (dev) in CMakeLists.txt:
Policy CMP0087 is not set: Install CODE|SCRIPT allow the use of generator
expressions. Run "cmake --help-policy CMP0087" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

https://cmake.org/cmake/help/latest/policy/CMP0087.html

Describe the pull request

  • Which triplets are supported/not supported? Have you updated the CI baseline?
    Windows

  • Does your PR follow the maintainer guide?
    AFAIK yes

Without this, X_VCPKG_APPLOCAL_DEPS_INSTALL does not work and
CMake prints this warning at the configure step:

CMake Warning (dev) in CMakeLists.txt:
Policy CMP0087 is not set: Install CODE|SCRIPT allow the use of generator
expressions.  Run "cmake --help-policy CMP0087" for policy details.  Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

https://cmake.org/cmake/help/latest/policy/CMP0087.html
@JackBoosY JackBoosY self-assigned this Jan 26, 2021
@JackBoosY JackBoosY added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Jan 26, 2021
@JackBoosY JackBoosY added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Jan 26, 2021
@Hoikas
Copy link
Contributor

Hoikas commented Jan 26, 2021

👍 This error happens if you're embedding gtest and forget to tell it to not install itself.

@dan-shaw dan-shaw merged commit 3160817 into microsoft:master Jan 28, 2021
@Be-ing Be-ing deleted the cmake_policy_CMP0087 branch January 28, 2021 22:19
@PhoebeHui PhoebeHui changed the title set CMake policy CMP0087 for X_VCPKG_APPLOCAL_DEPS_INSTALL [vcpkg] set CMake policy CMP0087 for X_VCPKG_APPLOCAL_DEPS_INSTALL Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants