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 setting #397

Closed
wants to merge 1 commit into from
Closed

Cmake policy setting #397

wants to merge 1 commit into from

Conversation

ngophuc
Copy link
Contributor

@ngophuc ngophuc commented Apr 6, 2021

Error in cmake command : "Policy CMP0057 is not set"

Thanks a lot for contributing to DGtalTools, before submitting your PR, please fill up the description and make sure that all checkboxes are checked.

PR Description

your description here

Checklist

  • Doxygen documentation of the code completed (classes, methods, types, members...).
  • Main tool doxygen documentation (following existing documentation of DGtalTools documentation.
  • Check if it follows the tools structure described in CONTRIBUTING.md
  • New entry in the ChangeLog.md added.
  • Update the readme with potentially a screenshot of the tools if it applies.
  • No warning raised in Debug cmake mode (otherwise, Travis C.I. will fail).

Error in cmake command : "Policy CMP0057 is not set"
@@ -9,6 +9,7 @@ cmake_minimum_required (VERSION 3.1)

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")

cmake_policy(SET CMP0048 OLD) # project() doesn't have VERSION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMP0057 fix is done in #394.

Why CMP0048 here?

Copy link
Contributor Author

@ngophuc ngophuc Apr 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error of while running cmakefile due to the old polycies

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):
/usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
../DGtalConfig.cmake:17 (find_dependency)
CMakeLists.txt:18 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.

@ngophuc ngophuc closed this Apr 6, 2021
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

Successfully merging this pull request may close these issues.

2 participants