[CMake] Quoting, spaces in include paths,
CMake input files generation, life, the universe and everything.
Brandon Van Every
bvanevery at gmail.com
Tue Feb 12 11:41:14 EST 2008
On Feb 12, 2008 11:25 AM, Nicolas Tisserand <nicolas.tisserand at gmail.com> wrote:
>
> According to:
> http://www.cmake.org/Wiki/index.php?title=CMake_FAQ#How_can_I_get_quoting_and_escapes_to_work_properly.3F
Yeah, my lousy stub of a FAQ entry. Well, I've filed bug
http://cmake.org/Bug/view.php?id=6295 "Document core syntax in a
chapter format." I suggested the idea of reusing info from the
current edition of "Mastering CMake," but that suggestion has not been
favorably received.
> I first tried to be creative and played around various levels of
> quoting, before or after the "Use*.cmake" file configurations, without
> success.
> I also tried the ESCAPE_QUOTES option of the CONFIGURE_FILE function.
> No luck either.
>
> I now need some world class CMake guru wisdom...
> Any thoughts?
I hypothesize that when configure_file is performed, the single
backslashes that escape the whitespace are lost. "\ " turns into " ".
If you were to string(REPLACE "\\" "\\\\" out "${in}") for all your
paths before performing the configure_file, I think you would solve
the problem.
Cheers,
Brandon Van Every
More information about the CMake
mailing list