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

Incorrect CMake configuration for template_release #1690

Open
NetroScript opened this issue Jan 21, 2025 · 0 comments
Open

Incorrect CMake configuration for template_release #1690

NetroScript opened this issue Jan 21, 2025 · 0 comments

Comments

@NetroScript
Copy link

Godot version

4.4-beta1

godot-cpp version

13cd2d9

System information

Windows 11, CMake 3.30.5, Visual Studio 2022

Issue description

When using CMake and compiling godot-cpp::template_release debugging features will still be enabled.

Specifically in

set( DEBUG_FEATURES "$<NOT:$<STREQUAL:${TARGET_NAME},template_release>>" )
DEBUG_FEATURES are turned off, when ${TARGET_NAME}is set to template_release, however it needs to be ${TARGET_ALIAS}.

This can also be seen in current build logs of the GitHub Actions such as
https://github.com/godotengine/godot-cpp/actions/runs/12892247119/job/35946077972
When checking the Build test GDExtension library step, a release version should be built, however the build command includes /D DEBUG_ENABLED /D DEBUG_METHODS_ENABLED

I investigated this, as for my extension the build on Windows MSVC was failing, as libgodot-cpp.windows.template_release.x86_64.libwas over 4GB in size. Thankfully #1628 puts it back at around 3.5GB so MSVC is working again.

However even when correcting the aforementioned line of code to set( DEBUG_FEATURES "$<NOT:$<STREQUAL:${TARGET_ALIAS},template_release>>") the line in

$<${DEBUG_FEATURES}:DEBUG_ENABLED DEBUG_METHODS_ENABLED>
still evaluates to true for me. However, I did not have the time to take a more detailed look.

Steps to reproduce

It is possible to use the same commands the CI is currently using:

mkdir cmake-build
cd cmake-build
cmake ../ -DGODOT_ENABLE_TESTING=YES
cmake --build . --verbose -t godot-cpp.test.template_release --config Release

Upon inspection of the generated build commands it will be visible how the debug info is always included.

Minimal reproduction project

/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant