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

Mateusz Loskot mateusz at loskot.net
Thu Sep 28 12:49:47 EDT 2017


On 25 September 2017 at 18:40, Zan Lynx <zlynx at acm.org> wrote:
> On 09/25/2017 10:15 AM, Mateusz Loskot wrote:
>> What if (Windows) user runs cmake inside
>>
>> c:\my awesome projects\one-superb\build
>>
>> and there is xxx_command(${CMAKE_SOURCE_DIR})
>
> Indeed.
>
> In my opinion, if software cannot handle arbitrary path names which
> contain anything then that software is broken.

This is no good.
As CMake advocate, I've noticed traces of disappointment accumulated
over the years. In CMake 2 times, that was a small pill to swallow.
In CMake 3.9, it's very frustrating.
Idioms, conventions, PEP kind of papers, whatever is a must.

Niall Douglas crafted a quick CMake'ification demo for Boost [1] and
from the short README one can learn more about **how** to properly
develop a good build setup with CMake than from the CMake documentation.

[1] https://github.com/ned14/boost-bmv-cmake

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


More information about the CMake mailing list