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

CMake policy CMP0057 warning #17

Open
BenjaminNavarro opened this issue Apr 22, 2019 · 0 comments
Open

CMake policy CMP0057 warning #17

BenjaminNavarro opened this issue Apr 22, 2019 · 0 comments

Comments

@BenjaminNavarro
Copy link

Probably due to my recent CMake version (3.12.2) I get a policy warning followed by an error when trying to use PMM:

CMake Warning (dev) at build/_pmm/1.3.1/conan.cmake:558 (if):
  Policy CMP0057 is not set: Support new IN_LIST if() operator.  Run "cmake
  --help-policy CMP0057" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  IN_LIST will be interpreted as an operator when the policy is set to NEW.
  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  build/_pmm/1.3.1/conan.cmake:635 (_conan_ensure_remotes)
  build/_pmm/1.3.1/main.cmake:32 (_pmm_conan)
  build/_pmm/1.3.1/main.cmake:47 (_pmm_project_fn)
  CMakeLists.txt:12 (pmm)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at build/_pmm/1.3.1/conan.cmake:558 (if):
  if given arguments:

    "NOT" "(" "url" "IN_LIST" "all_urls" ")"

  Unknown arguments specified
Call Stack (most recent call first):
  build/_pmm/1.3.1/conan.cmake:635 (_conan_ensure_remotes)
  build/_pmm/1.3.1/main.cmake:32 (_pmm_conan)
  build/_pmm/1.3.1/main.cmake:47 (_pmm_project_fn)
  CMakeLists.txt:12 (pmm)


-- Configuring incomplete, errors occurred!
See also "/home/benjamin/prog/cmake-template/build/CMakeFiles/CMakeOutput.log".

Adding cmake_policy(SET CMP0057 NEW) at the top of pmm.cmake solves the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant