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

CMake: Support for using build_profile.json #1670

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

enetheru
Copy link
Contributor

I was trying to get Link-Time Optimisation working to close out one of the Issues or PR's and was running into binary limits for MSVC, which was also failing in scons.

I could alleviate that problem in SCons using build_profile=build_profile.json in the test project to reduce the binary size enough to get it working. However that option was not yet implemented in the CMake project.

This PR is to bring the CMake situation upto scratch with regards to using build_profiles

The change list is a little messy atm as it is built upon the name_clash changes, when that is merged I will re-base and it will look a lot cleaner.

Changes

CMake:

  • add GODOT_BUILD_PROFILE cache option
  • Split file list generation into a function with args
  • add status and debug messages
  • re-arrange python commands to make reading them simpler

Build Profile:

  • Add missing VisualInstance3D class to build_profile.json

Python:

  • Fix binding_generator.py print_file_list function so that random print statements don't pollute the list.

@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 4 times, most recently from 5bcc2c5 to fb65d7b Compare December 28, 2024 23:19
Simplify <platform>_generate cmake function signature, as TARGET_ALIAS and TARGET_NAME are still in scope and do not need to be passed.
Add USE_FOLDERS, and FOLDER properties to group targets in VS and XCode
Guard test target with GODOT_ENABLE_TESTING
Generate all three variants in the form godot-cpp.test.<target> to remove the -DTEST_TARGET option clutter.
Update the docs/cmake.rst with information about the testing target
Update the Github CI
Python:
- Redirect stdout for get_file_list to prevent stdout pollution
CMake:
- add GODOT_BUILD_PROFILE cache option
- Split file list generation into its own function
- add status and debug messages
Python Snippets in CMake:
- re-format for better readability
Build Profile:
- Add missing VisualInstance3D class to build_profile.json
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

Successfully merging this pull request may close these issues.

1 participant