Skip to content

Conversation

@enetheru
Copy link
Collaborator

@enetheru enetheru commented Mar 10, 2025

Changes:

  • Made all warnings private.
  • Warning as error private
  • Consistency in generator expressions

Justification:
CMake can propagate usage requirements to consumers of targets through PUBLIC, PRIVATE, INTERFACE flags on some options.

  • PUBLIC - used for the target, and any dependents
  • PRIVATE - used only on the target
  • INTERFACE - used only on the depedent

By having PRIVATE in all our options we were dictating to consumers a bunch of options that do not necessarily apply to their builds.

@dsnopek
Copy link
Collaborator

dsnopek commented Mar 13, 2025

Can you explain the significance of these changes? What does it mean for warnings to be private, and why do we want that?

@dsnopek dsnopek added the topic:buildsystem Related to the buildsystem or CI setup label Mar 13, 2025
@enetheru
Copy link
Collaborator Author

Can you explain the significance of these changes? What does it mean for warnings to be private, and why do we want that?

I've updated the description, I'll try to be more descriptive in future PR's Sorry.

Made all warnings private. Warning as error private Consistency in generator expressions
@dsnopek
Copy link
Collaborator

dsnopek commented Mar 14, 2025

Ok, thanks! I appreciate the explanation because I don't really know CMake and am relying on your expertise :-)

@dsnopek dsnopek merged commit 67ca2fb into godotengine:master Mar 14, 2025
11 checks passed
@enetheru enetheru deleted the privatise branch March 14, 2025 22:38
@dsnopek
Copy link
Collaborator

dsnopek commented Mar 17, 2025

Cherry-picked for 4.4 in PR #1745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake topic:buildsystem Related to the buildsystem or CI setup

2 participants