[CMake] svn info from cmake script?

William A. Hoffman billlist at nycap.rr.com
Fri Aug 11 15:52:41 EDT 2006


At 03:18 PM 8/11/2006, Abe Stephens wrote:
>Thanks for your directions, I'm experiencing one problem however:
>
>I can't seem to communicate a variable from my project configure (which contains the ADD_CUSTOM_COMMAND) to the invocation of myscript.cmake.
>
>The command below is:
>
>COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/myscript.cmake
>I expected that I could used -D to pass a variable from the command like to the script:
>
>COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/myscript.cmake -D MYVAR:STRING=FOO
>
>
>But that didn't work.
>
>Any advice? It would be nice if myscript.cmake could use the same cache as the project configure too.
Try putting the -D before the -P.  Also, you don't need the :STRING part anymore.


-Bill



More information about the CMake mailing list