[CMake] spaces in generator strings troublesome (Michael Ellery)

Stefan.Waigand at continental-corporation.com Stefan.Waigand at continental-corporation.com
Wed Nov 22 12:38:23 EST 2017


Hi Michael Ellery

thank you for your reply.

> perhaps handle arguments as an array variable in bash - it?s a 
> slightly saner way to deal with args with spaces:
> 
> CMDLINE=(. -G"Unix Makefiles") && cmake "${CMDLINE[@]}?

Well i already got it working in bash when i wrote that. I have the 
parameters in a variable and i use eval to execute:
    eval $CMAKE_EXECUTABLE $CMAKE_PARAMS_ALL

My point is not i cannot solve the problem. My point is, i like to 
simplify this in the future. 
The current solution is not nice - it is a workaround. It is more 
difficult to understand and maintain as it needs to be. And i am not the 
only one who has to deal with this problem. CMake uses spaces inside 
arguments where spaces are usually for separation of arguments. Do you 
agree?

Countless hours i spent debugging similar problems with paths like 
c:\Program Files. I know, one shouldn't use windows as development 
environment, but this is something we cannot change unfortunately. 
Since we force our developers to not install their perl, compilers etc. in 
such paths, things are much better.
I appreciate having the same in CMake.

Isn't it as simple as replacing all '_' by ' ' to support this and be 
backward compatible? Are there other reasons i do not see?

So i again like to kindly ask you to support (besides the established way) 
a command line like
cmake . -GUnix_Makefiles

Thank you,
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20171122/873d1a54/attachment.html>


More information about the CMake mailing list