Remove experimental C++ import from CMakeLists - #10
Conversation
UUID must be set at CMAKE_TOOLCHAIN_FILE
|
I think it is better to replace that with |
|
I disagree, that is just hard to read. |
|
Why exactly is it hard to read? I just don’t understand why we should put additional pressure on the user by requiring them to take more actions when that makes absolutely no sense. The same approach is used in every major project with modules. |
|
Because |
|
I replace an actual string with |
|
The users can't edit every single project they build. It just makes sense they set UUID at toolchain level or pass it via args like -Detc. There are multiple uuid's, I will also add CPS support in another that will require another UUID. It makes sense it is set at toolchain level |
|
If we use the approach proposed above, set with an up-to-date string, users won't have to override it most of the time. When they actually need to, they can override with -D or in any other way. Right now you're proposing to put an extra step for all users, which is just an unnecessary overcomplication of things. |
|
You assume everyone compiling the project will use the same cmake version. Also it isn't like stuff remain experimental for a little bit. Import std is experimental for at least the last 2 years. With god knows how many UUID's |
|
Once again, your approach proposes that the user needs to specify a string every time. In the approach proposed above that is used in most modules projects, the user still has the ability to override, but only when there is an actual need to. You are proposing to make this a mandatory step, whilst it shouldn't be one. |
|
Sure, you can do that. But it is a waste of time. In the end same amount of effort is needed. |
|
I don't get how this is a waste of time, if the need to manually specify the string is guaranteed to be lower |
|
CMake UUID's change every month, %95 of the users will have to set it via toolchain files or -Dopts anyway. |
|
You said "95% of users", which is lower than a 100%. How is this a "waste of time"? |
|
Furthermore, CMake |
|
If you care so much about the convenience of the minority, I can't argue about that, it is a matter of preference. |
|
Thanks for raising this — the underlying problem was real, and it did bite us. Pinning We went with a third option in #9: a table keyed on the running CMake version, so the correct UUID is selected automatically and unknown releases fall through to a diagnostic instead of a wrong value. That preserves the property you were arguing for — no single hardcoded UUID that goes stale — without requiring every consumer to supply one. On the disagreement in this thread, I think you were both right about different things: your point that the UUID can't be pinned to one release was correct, and @DockedFerret800's point that most consumers shouldn't have to supply it was also correct. The table satisfies both. One thing worth knowing: the toolchain-file workflow you describe already works, unmodified. A toolchain file is read during The mechanism that was genuinely blocked is Your CPS work is unaffected either way, since Closing this as superseded by #9 and #12, but the diagnosis in it was sound and directly shaped where we landed. Thanks. |
UUID must be set at CMAKE_TOOLCHAIN_FILE