[CMake] Calling cmake from within cmake.
Brandon Van Every
bvanevery at gmail.com
Mon Oct 8 12:37:42 EDT 2007
On 10/8/07, Josef Karthauser <joe.karthauser at geomerics.com> wrote:
>
> EXEC_PROGRAM(${CMAKE_COMMAND} ${CONFIG_SUBDIR}/${CONFIG}
> ARGS -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=${CONFIG}
> -DBUILD_SUBTREE=1
> ${CMAKE_HOME_DIRECTORY}
> )
>
> However that doesn't work because the double quotes aren't escaped. How
> do I escape quotes in cmake?
Might need either \"NMake Makefiles\" or \\"NMake Makefiles\\". The
latter is needed when doing regexes. I'm not sure in what other
contexts the \\ may be needed.
BTW you don't need the ARGS keyword in EXEC_PROGRAM,
ADD_CUSTOM_COMMAND, or ADD_CUSTOM_TARGET. It's correct but archaic.
Cheers,
Brandon Van Every
More information about the CMake
mailing list