-
-
Notifications
You must be signed in to change notification settings - Fork 674
CMake: Remove starting .
from GODOTCPP_SUFFIX
#1814
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
Conversation
Would it make sense to add a new variable without the dot, rather than removing the dot from the existing variable? The old variable could be set in terms of the new one. I don't know how weird or annoying that would be in a CMake context, but after the big break, it'd be nice to not do breaks that don't solve important problems |
That's entirely possible to do, and satisifies the possible breakage, In the future, would a major version be able to remove the old name? or will my mistakes live forever?
I just read the scons code, does it also include the leading '.' ? It seems that it does from a casual glance, so perhaps there was reason in my orginal process. Apologies if I'm a bit wordy on this, pre-emptively dealing with consequences for changes that may break code is new to me, and more talking seems the best approach to build confidence, even for such a minor thing. |
A little bit of bike shedding can be fun, but not too much.
|
This is the same as GODOTCPP_SUFFIX but without the leading '.' GODOTCPP_SUFFIX is then based on the above.
I don't think we have a naming convention with regard to build system changes. In the past, with renamed variables in SCons, I think we've usually ended up with totally different names (not an incrementing number) and then an "alias" to the original version
Yeah, the scons configuration seems to include the leading
This would be fine with me personally. In the latest version of the PR it's using |
Removing the |
Are developers going to interact with this variable? If so, I still think it would be better to use a normal, descriptive word, rather than an abbreviation like I don't think it matters so much how the variable was derived - I think we could still call it All that said, I don't want to bike shed this too much and hold up progress. :-) If you think we should move forward with the current PR, I'd be OK with that |
Thats what I ended up feeling originally :), lets move forward with the current. |
Cherry-picked for 4.4 in PR #1836 |
This is a tiny but kinda annoying issue I want to fix.
During the configuration phase to get the binary suffix(eg windows.editor.x86_64) cmake builds up a generator expression out of the relevant pieces, and that expression is put into
GODOTCPP_SUFFIX
. Which is analagous enough to how scons builds the binary suffix, it so that part is all good.As it is currently, the first entry in the expression starts with a prepending
.
so that later when its used ike${PROJECT_NAME}${GODOT_SUFFIX}
the resulting binary looks likegodot-cpp.linux.template_release.x86_64.so
This
GODOTCPP_SUFFIX
varible is then attached to the godot-cpp target so that downstream projects can fetch it and use it for themselves, avoiding having to build up the suffix from the pieces themselves manually which can be a pain.So today I was wanting to use this suffix, but it comes with a leading
.
, and that's just not expected, and I think very rarely desired, considering all other use cases when getting parts of a whole, the delimiter isnt usually part of the resulting piece. ie a hypothetical functionget_extension
wouldn't provide.cpp
, it would just providecpp
So I want to remove the leading
.
, making the libname ~${PROJECT_NAME}.${GODOT_SUFFIX}
.The problem arises that it will effect consumer build artifacts if they use the
GODOTCPP_SUFFIX
variable, like I do, to name their libraries and configure related files. So if this change is accepted, I think it would need notice somehow provided to users, or fit into a specific release cycle of some sort. I'm not super familiar with release processes.Cheers,
Samuel.