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

INTERFACE_LIBRARY targets may only have whitelisted properties. #534

Closed
Finkman opened this issue Nov 21, 2022 · 2 comments
Closed

INTERFACE_LIBRARY targets may only have whitelisted properties. #534

Finkman opened this issue Nov 21, 2022 · 2 comments
Labels

Comments

@Finkman
Copy link

Finkman commented Nov 21, 2022

The Setup

I use pugixml (v1.13) as an in-source library in folder lib/pugixml. The entire project is build with BUILD_SHARED_LIBS=OFF.

I am using cmake 3.18.2

The Error

When I configure the project, I receive the error from cmake:

CMake Error at libs/pugixml/CMakeLists.txt:155 (add_library):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "INCLUDE_DIRECTORIES" is not allowed.

NOTE: This also happens with current master ( 1dc3266 )

Expectation

cmake configure step executes without an error.

@zeux
Copy link
Owner

zeux commented Nov 21, 2022

Given the amount of issues we've had last time with aliases etc. I'm very worried about merging any changes that change the existing alias structure at all. See issues linked from #392.

Is this error specific to CMake 3.18?

Looking at the diff from 1.11.4, I'm not sure I undestand if anything changed since then to produce this error. Notably, CMakeLists.txt does not add include directories for pugixml target itself. Does your CMake setup interact with pugixml targets in any way besides just including the pugixml folder?

@Finkman
Copy link
Author

Finkman commented Nov 21, 2022

This also happend with CMake 2.25.
But,... my guess was kind of misleading. The issue was caused by an odd mistake on my side where two different pugixml-folders interfere each other. With this, the second was trying to set properties on the target that has been defined before.
Sorry for the noise.

@Finkman Finkman closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants