-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
cmakeFlags cannot parse spaces #114044
Labels
0.kind: bug
Something is broken
significant
Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.
Comments
See also #112054 I would just recommend: preConfigure = ''
cmakeFlagsArray+=(
"-DFoo=\"foo bar\""
)
''; |
10 tasks
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
by just looking at the source I find
|
I'm hitting this issue while trying to specify a generator for cmake. It appears to be impossible unless you want to use
Attempting to specify
|
Since 34a2b7a the cmake setup hooks support spaces in |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
0.kind: bug
Something is broken
significant
Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.
Describe the bug
The
cmakeFlags
array cannot parse spaces correctly, and thinks any argument after a space is a another CMake flag. I think it splits the flag on spaces upon parsing it. The flags do get printed out correctly, however they are not handled the same way.I've tried using all kinds of different quotes, and escaping almost every single character, but nothing seemed to work.
To Reproduce
Steps to reproduce the behavior:
cmakeFlags = [ "-DFoo=\"foo bar\"" ];
)cmakeConfigurePhase
fail, as it thinksbar
is an seperate flag, and it cannot find this local file.CMake Error: The source directory "/build/source/build/bar"" does not exist.
Expected behavior
cmakeFlags
should be correctly passed to CMake, and the build should succeed.Additional context
Note that when manually setting
cmakeFlagsArray
, this does work.When applying this flag from a nix-shell, it also succesfully parses it.
Notify maintainers
@ttuegel @LnL7
Metadata
"x86_64-linux"
Linux 5.11.0, NixOS, 21.05pre271444.9816b99e71c (Okapi)
yes
yes
nix-env (Nix) 2.3.10
"nixos-21.05pre271444.9816b99e71c"
"home-manager, nixpkgs-21.05pre271900.11cd34cd592"
/home/ivv/.nix-defexpr/channels/nixpkgs
Maintainer information:
The text was updated successfully, but these errors were encountered: