Skip to content

CMake: Support for using build_profile.json#1670

Merged
dsnopek merged 1 commit into
godotengine:masterfrom
enetheru:build_profile
Jan 12, 2025
Merged

CMake: Support for using build_profile.json#1670
dsnopek merged 1 commit into
godotengine:masterfrom
enetheru:build_profile

Conversation

@enetheru

@enetheru enetheru commented Dec 11, 2024

Copy link
Copy Markdown
Collaborator

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

@dsnopek dsnopek left a comment

Copy link
Copy Markdown
Collaborator

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
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants