On Fri, Jun 6, 2014 at 8:43 AM, Brad King <brad.k...@kitware.com> wrote:
> On 06/06/2014 11:37 AM, Andrew Fuller wrote: > > Should I be quoting all my generator expressions? > > Is that the proper syntax? > > The CMake language does not actually know anything about generator > expressions. They are just strings like any other command arguments > as far as it knows. See the command argument syntax documentation > here: > > > http://www.cmake.org/cmake/help/v3.0/manual/cmake-language.7.html#command-arguments > > In order to ensure the command receives a generator expression in > its entirety it should be double-quoted if it contains any literal > spaces or ${var} evaluations that may have ; in them. Otherwise > it is not necessary to quote and sometimes looks nicer not to. It > is always safe to quote generator expressions though. > > -Brad > > I agree it often looks better without the quotes. But correctness trumps aesthetics. I guess where I went astray was that it appeared to work unquoted when doing a simple test with add_executable and so I standardized on unquoted which then came back to bite me unexpectedly later. I think I'm understanding better the situation thanks to your explanation combined with that link. I shall quote them all!
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake