Re: spaces in generator strings troublesome (Michael Ellery)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: spaces in generator strings troublesome (Michael Ellery)

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:

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,

Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: