Skip to content

Conversation

@enetheru
Copy link
Collaborator

@enetheru enetheru commented Dec 11, 2024

Update to the CMake scripts to implement the use of build profiles.
This is upto date with the latest changes from @Faless

Changes

Add python_callouts.py to hold functions which call python utilities

  • generate trimmed API
  • generate file list
  • generate bindings

if GODOT_BUILD_PROFILE is specified, a trimmed API file is created in the CMAKE_CURRENT_BINARY_DIR and used as the source for binding generation

Simplify Code Generation Variables

  • use generator expressions
  • use math for bits
  • simplify if statements
@enetheru enetheru force-pushed the build_profile branch 2 times, most recently from 35ca242 to fddcb8d Compare December 11, 2024 12:22
@enetheru enetheru force-pushed the build_profile branch 5 times, most recently from fb65d7b to 92696e4 Compare December 28, 2024 23:31
@enetheru enetheru force-pushed the build_profile branch 3 times, most recently from e716971 to 5d41a48 Compare January 11, 2025 00:53
Add python_callouts.py to hold functions which call python utilities - generate trimmed API - generate file list - generate bindings if GODOT_BUILD_PROFILE is specified, a trimmed API file is created in the CMAKE_CURRENT_BINARY_DIR and used as the source for binding generation Simplify Code Generation Variables - use generator expressions - use math for bits - simplify if statements
@enetheru enetheru marked this pull request as ready for review January 11, 2025 08:17
@enetheru enetheru requested a review from a team as a code owner January 11, 2025 08:17
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!

It worked great in my testing! I tried it with the test project via:

cmake .. -DGODOT_ENABLE_TESTING=YES -DGODOT_BUILD_PROFILE=../test/build_profile.json -G Ninja cmake --build . --target godot-cpp.test.template_debug 

The build artifacts all looked correct and the tests passed :-)

Skimming the code, that all looks good to me too. Re-organizing the python callouts into python_callouts.cmake seems like a good idea.

@dsnopek dsnopek added enhancement This is an enhancement on the current functionality cmake topic:buildsystem Related to the buildsystem or CI setup labels Jan 12, 2025
@dsnopek dsnopek added this to the 4.x milestone Jan 12, 2025
@dsnopek dsnopek merged commit 94a1f4f into godotengine:master Jan 12, 2025
11 checks passed
@enetheru enetheru deleted the build_profile branch January 12, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup

2 participants