Fix build of CMake tests if source dir has spaces.
author Nicolás Alvarez
committer Nicolás Alvarez
commit 95f5559135ed0f32f2d548c47ae741fc045a7e71
tree 006a1d8b4f7406437e9cea7b2a79ef8d39eb3f5d
parent 5a3ffd3bd539e5fa88c65660215a1a06a45e791c
Fix build of CMake tests if source dir has spaces.

The build system was using add_definition() to pass compile-time paths
to the test code, but this breaks if the paths have special characters
such as spaces, and the needed quoting/escaping is tricky to get right
in a portable way. I changed it to use a header file that gets
configure_file'd. Strings in the C preprocessor have a more portable
syntax than shells and buildsystems in multiple OSs :)
projectmanagers/cmake/tests/paths.h.cmake [ new file with mode 0644 ]