-
Notifications
You must be signed in to change notification settings - Fork 49
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
Allow toml lists in tool.scikit-build.cmake.define #874
Comments
Sounds good, but instead of erroring out if an inner |
@LecrisUT - does that work? I thought lists of lists weren't really a thing in CMake. |
Yeah, last I've encountered it was in a PR on Catch2. As long as you have the appropriate escaping it works. Don't remember how the |
So it does! # test.cmake
cmake_minimum_required(VERSION 3.28)
set(compound "foo\\;bar" "baz" "quux\\;foo")
foreach (sublist IN LISTS compound)
message(STATUS "!!!")
foreach (item IN LISTS sublist)
message(STATUS "${item}")
endforeach ()
endforeach () Output:
|
The following entry leads to a cryptic error:
However, I believe it should be allowed. Simply join the entries with a
;
and issue a warning if any entry already contains a;
(which would split the "item" in CMake-land).I think the tangible UX improvement comes when the list entries are many or long:
The text was updated successfully, but these errors were encountered: