Skip to content

Conversation

@dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Nov 1, 2025

Fixes #1876

This implements option nr 3 from that issue, but I wonder if option nr 1 would be better?

This PR ends up creating an inconsistency by default, where the debug template is built with use_static_cpp=no and the release template is built with use_static_cpp=yes

Perhaps this is the worst of all worlds?

@dsnopek dsnopek added this to the 4.x milestone Nov 1, 2025
@dsnopek dsnopek requested a review from a team as a code owner November 1, 2025 13:30
@dsnopek dsnopek added the bug This has been identified as a bug label Nov 1, 2025
@enetheru
Copy link
Collaborator

enetheru commented Nov 3, 2025

commenting on the right pr this time i hope

but it looks like your change would set STATIC_CPP if both GODOTCPP_USE_STATIC_CPP and GODOTCPP_USE_HOT_RELOAD are enabled?

You're right of course.
static_cpp = godotcpp_static_cpp and not godotcpp_use_hot_reload

set(STATIC_CPP "$<AND:$<BOOL:${GODOTCPP_USE_STATIC_CPP}>,$<NOT:$<BOOL:${GODOTCPP_USE_HOT_RELOAD}>>>")

CMake generator expressions are so ugly, cmake in general is ugly, but the generator expressions are next level ugly.
Here's another alt.

set(NOT_RELOAD "$<NOT:$<BOOL:${GODOTCPP_USE_HOT_RELOAD}>>"
set(STATIC_CPP "$<AND:$<BOOL:${GODOTCPP_USE_STATIC_CPP}>,${NOT_RELOAD}>")

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

Labels

bug This has been identified as a bug cherrypick:4.4 cherrypick:4.5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enabling "use_static_cpp" breaks hot reload on Linux

2 participants