-
-
Notifications
You must be signed in to change notification settings - Fork 580
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: Remove hardcoded warnings list and forcing -Werror on library builds #1324
CMake: Remove hardcoded warnings list and forcing -Werror on library builds #1324
Conversation
…builds The CMake buildsystem should be completely reviewed to properly match what is done by SCons, instead of making its own arbitrary decisions on how godot-cpp should be compiled. Currently the SCons setup doesn't include warning options, so CMake shouldn't either. Options similar to upstream Godot's SCons setup could be added, and then replicated for CMake.
I see that #1007 aims at adding warning options to SCons - so once it's finalized and merged, this can be revisited to add the same warnings to CMake. I insist that if we support multiple buildsystems, we should strive to make them produce the exact same output. So they need to take the exact same input. |
I agree that this is a problem. Right now, the majority of open PRs on godot-cpp are build system related. And a sizeable percentage are cmake related (they aren't all tagged, so I can't easily get a count, but it could even be a majority). But, personally, I don't just know cmake, so beyond the simplest changes, I can't personally review them either. We really need someone on the GDExtension team who understands and cares about cmake, in addition to understanding how the scons build system works so we can be sure that both are working in the same way with the same overall philosophy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insofar as I understand cmake, these changes make sense.
Locally, I tested building godot-cpp on it's own and the tests using cmake with the make backend - it seemed to work fine!
Cherry-picked for |
Cherry-picking to 4.1 in #1373 |
The CMake buildsystem should be completely reviewed to properly match what is done by SCons, instead of making its own arbitrary decisions on how godot-cpp should be compiled.
Currently the SCons setup doesn't include warning options, so CMake shouldn't either. Options similar to upstream Godot's SCons setup could be added, and then replicated for CMake.
This kind of issue is exactly why I'm against having multiple buildsystems. It's very difficult to keep them in sync, especially since officially we only commit to maintaining SCons, yet many users reach straight for CMake as more familiar to them (or usually more familiar to their IDE...).
If we really want to support CMake (which can make sense for something used to interface with thirdparty codebases, often using CMake), then it probably needs to be redone from scratch by someone who understands and cares about the SCons buildsystem, and can strive to keep them in sync. That won't be me :)