<br><font size=2 face="sans-serif">Tyler,</font>
<br>
<br><font size=2 face="sans-serif">Thank you for the tips on VERBATIM &amp;
make VERBOSE=1. &nbsp;I added VERBOSE to my add_custom_command, but it
seems that it fixed one problem and caused another.</font>
<br>
<br><font size=2 face="sans-serif">On the plus side, the </font><tt><font size=2>passed
arg &quot;#../../XML/Types/##&quot;</font></tt><font size=2 face="sans-serif">
is now properly quoted. &nbsp;On the minus side, the xsd command invocation
fails outright, because for some reason the directory name being passed
in for the location of the .xsd files ( </font><tt><font size=2>${TYPE_XSD_DIR}
) IS being quoted. &nbsp;Previously this was not the case (regarding this
directory</font></tt>
<br>
<br><tt><font size=2>Any suggestions?</font></tt>
<br>
<br><tt><font size=2>Eric</font></tt>
<br>
<br><tt><font size=2>cmake-bounces@cmake.org wrote on 09/16/2009 04:51:17
PM:<br>
<br>
&gt; On Wed, Sep 16, 2009 at 04:27:48PM -0400, Eric Tellefsen wrote:<br>
&gt; &gt; Solaris make <br>
&gt; <br>
&gt; My condolences :p.<br>
&gt; <br>
&gt; &gt; My problem has to do with the ARGS section of the custom command.
<br>
&gt; &gt; Specifically the 'legacy' Makefile uses an argument &nbsp;--include-regex
<br>
&gt; &gt; &quot;#../../XML/Types/##&quot; &nbsp;in order to remove this
prefix from the generated <br>
&gt; &gt; HXX files, where applicable.<br>
&gt; &gt;<br>
&gt; &gt; ----------- Code which invokes macro<br>
&gt; &gt; SET( STUBDIR ${CMAKE_BINARY_DIR}/Stubs )<br>
&gt; &gt; SET( TYPE_XSD_DIR ${CMAKE_CURRENT_SOURCE_DIR} )<br>
&gt; &gt; SET( TYPE_REGEX_FLAG &quot;#../../XML/Types/##&quot; )<br>
&gt; &gt; <br>
&gt; &gt; XSDGenCXXSources( TypesOutputFiles<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &quot;${TYPE_REGEX_FLAG}&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &quot;${TYPE_XSD_DIR}&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &quot;${STUBDIR}&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &quot;${CMAKE_CURRENT_SOURCE_DIR}&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; )<br>
&gt; &gt; <br>
&gt; &gt; ----------- Macro -----------------------------<br>
&gt; &gt; macro ( XSDGenCXXSources OUTPUT_FILES REGEX XSD_DIR OUTPUT_DIR
Working_Dir <br>
&gt; &gt; )<br>
&gt; &gt; <br>
&gt; &gt; &nbsp; &nbsp; SET( XSD_EXE $ENV{CODE_SYNTHESIS_HOME}/bin/xsd
)<br>
&gt; &gt; <br>
&gt; &gt; &nbsp; &nbsp; ADD_CUSTOM_COMMAND(<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTPUT &nbsp;${${OUTPUT_FILES}}<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COMMAND mkdir<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ARGS &nbsp; &nbsp;-p
${OUTPUT_DIR}<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COMMAND ${XSD_EXE}<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ARGS &nbsp; &nbsp;cxx-tree
--generate-serialization --output-dir <br>
&gt; &gt; ${OUTPUT_DIR} --include-regex &quot; ${REGEX} &quot; ${XSD_DIR}/*.xsd<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COMMENT &quot;Generating
CXX files from ${XSD_DIR} and placing them <br>
&gt; &gt; in ${OUTPUT_DIR}&quot;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WORKING DIRECTORY ${Working_Dir}<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>
&gt; &gt; endmacro ( XSDGenCXXSources )<br>
&gt; <br>
&gt; Usually, problems like this are caused by improper quoting. First,
try<br>
&gt; the VERBATIM flag to add_custom_command.<br>
&gt; <br>
&gt; You can inspect the command line CMake generates for your custom command<br>
&gt; by doing make VERBOSE=1. Hopefully this will give you a clue as to
what<br>
&gt; is getting mangled.<br>
&gt; <br>
&gt; Finally, arguments to macros occasionally do funny things since they<br>
&gt; aren't &quot;real&quot; variables, but that's probably not the problem
here.<br>
&gt; <br>
&gt; tyler<br>
&gt; _______________________________________________<br>
&gt; Powered by www.kitware.com<br>
&gt; <br>
&gt; Visit other Kitware open-source projects at http://www.kitware.<br>
&gt; com/opensource/opensource.html<br>
&gt; <br>
&gt; Please keep messages on-topic and check the CMake FAQ at: http:<br>
&gt; //www.cmake.org/Wiki/CMake_FAQ<br>
&gt; <br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; http://www.cmake.org/mailman/listinfo/cmake<br>
</font></tt>
<br>
<span style="font-family:'Arial',sans-serif; font-size:8pt; color:#000000">---</span><br>
<span style="font-family:'Courier New',monospace; font-size:10pt; color:#000000">This communication may contain confidential and/or privileged information.<br>
If you are not the intended recipient (or have received this communication<br>
in error) please notify the sender immediately and destroy this<br>
communication. Any unauthorized copying, disclosure or distribution of the<br>
material in this communication is strictly forbidden.<br>
<br>
Deutsche Bank does not render legal or tax advice, and the information<br>
contained in this communication should not be regarded as such.</span>