Skip to content

Conversation

@enetheru
Copy link
Collaborator

@enetheru enetheru commented Mar 5, 2025

People seem to want to build godot-cpp by itself, without any arguments, not even specifying a target.

So we have to detect if we are top level and make template_debug available for the all target.

This can only happen when we are the top level target, because if we enable template_debug for all when we are part of something larger than its unnecessary compilation.

This adresses #1724 and duplicate #1727

@enetheru enetheru requested a review from a team as a code owner March 5, 2025 08:04
Copy link
Collaborator

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

Thanks! This seems to work in my testing

However, I just want to make sure this isn't something you have technical reservations about based on your comments in #1724? But if you're happy with the code added in this PR, I think it's fine to move forward with it

@enetheru
Copy link
Collaborator Author

enetheru commented Mar 6, 2025

@dsnopek no reservations for this fix, we've aleady had two reports from people expecting a default build, so merging it woud be in our best interest.
If we weren't trying to match scons I would argue for a warning message that we are top level, and then quit, but matching SCons takes precedence.

People seem to want to build godot-cpp without any arguments, not even specifying a target. We have to detect if we are top level though because it conflicts with being consumed.
@dsnopek dsnopek added cmake topic:buildsystem Related to the buildsystem or CI setup cherrypick:4.4 labels Mar 6, 2025
@dsnopek dsnopek added this to the 4.x milestone Mar 6, 2025
@dsnopek dsnopek merged commit 55cbea7 into godotengine:master Mar 6, 2025
11 checks passed
@enetheru enetheru deleted the default_target branch March 7, 2025 07:44
@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