[CMake] To quote (path) variables or not, and everywhere?

Mateusz Loskot mateusz at loskot.net
Mon Sep 25 12:15:16 EDT 2017


On 25 September 2017 at 16:58, Miller Henry <MillerHenry at johndeere.com> wrote:
> To add fuel to this, I like to argue that paths should not be quoted if at all possible.

I agree.

> I find that in many cases where a path is quoted those quotes are being done to
> work around a bad project structure and you can reorganize your project to get rid of the need for quotes.

What if (Windows) user runs cmake inside

c:\my awesome projects\one-superb\build

and there is xxx_command(${CMAKE_SOURCE_DIR})

I find lack of CMake standarised conventions and idioms a mistake,
softly saying.

Best regards
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the CMake mailing list