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 CMP0074 #77

Open
kostya416 opened this issue Oct 8, 2024 · 1 comment
Open

CMake policy CMP0074 #77

kostya416 opened this issue Oct 8, 2024 · 1 comment
Assignees

Comments

@kostya416
Copy link
Contributor

I am using set (PostgreSQL_ROOT "xxxxx") in my CMake file and getting following warning / error from CMake:

CMake Warning (dev) at 3rd-party/taopq/CMakeLists.txt:12 (find_package):
Policy CMP0074 is not set: find_package uses _ROOT variables.

it can be fixed by adding following lines to CMakeLists.txt for taopq before find_package call:

if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()

@uilianries
Copy link
Member

@kostya416 Thank you for reporting your case, but I would prefer not customizing CMP0074 only due PostgreSQL_ROOT.

What could be done is moving taopq to use CMake targets instead, following the official CMake modules: https://cmake.org/cmake/help/latest/module/FindPostgreSQL.html#imported-targets

@uilianries uilianries self-assigned this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants