<br><font size=2 face="sans-serif">Tyler,</font>
<br>
<br><font size=2 face="sans-serif">Thank you for the tips on VERBATIM &
make VERBOSE=1. 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 "#../../XML/Types/##"</font></tt><font size=2 face="sans-serif">
is now properly quoted. 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. 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>
> On Wed, Sep 16, 2009 at 04:27:48PM -0400, Eric Tellefsen wrote:<br>
> > Solaris make <br>
> <br>
> My condolences :p.<br>
> <br>
> > My problem has to do with the ARGS section of the custom command.
<br>
> > Specifically the 'legacy' Makefile uses an argument --include-regex
<br>
> > "#../../XML/Types/##" in order to remove this
prefix from the generated <br>
> > HXX files, where applicable.<br>
> ><br>
> > ----------- Code which invokes macro<br>
> > SET( STUBDIR ${CMAKE_BINARY_DIR}/Stubs )<br>
> > SET( TYPE_XSD_DIR ${CMAKE_CURRENT_SOURCE_DIR} )<br>
> > SET( TYPE_REGEX_FLAG "#../../XML/Types/##" )<br>
> > <br>
> > XSDGenCXXSources( TypesOutputFiles<br>
> >
"${TYPE_REGEX_FLAG}"<br>
> >
"${TYPE_XSD_DIR}"<br>
> >
"${STUBDIR}"<br>
> >
"${CMAKE_CURRENT_SOURCE_DIR}"<br>
> >
)<br>
> > <br>
> > ----------- Macro -----------------------------<br>
> > macro ( XSDGenCXXSources OUTPUT_FILES REGEX XSD_DIR OUTPUT_DIR
Working_Dir <br>
> > )<br>
> > <br>
> > SET( XSD_EXE $ENV{CODE_SYNTHESIS_HOME}/bin/xsd
)<br>
> > <br>
> > ADD_CUSTOM_COMMAND(<br>
> > OUTPUT ${${OUTPUT_FILES}}<br>
> > COMMAND mkdir<br>
> > ARGS -p
${OUTPUT_DIR}<br>
> > COMMAND ${XSD_EXE}<br>
> > ARGS cxx-tree
--generate-serialization --output-dir <br>
> > ${OUTPUT_DIR} --include-regex " ${REGEX} " ${XSD_DIR}/*.xsd<br>
> > COMMENT "Generating
CXX files from ${XSD_DIR} and placing them <br>
> > in ${OUTPUT_DIR}"<br>
> > WORKING DIRECTORY ${Working_Dir}<br>
> > )<br>
> > endmacro ( XSDGenCXXSources )<br>
> <br>
> Usually, problems like this are caused by improper quoting. First,
try<br>
> the VERBATIM flag to add_custom_command.<br>
> <br>
> You can inspect the command line CMake generates for your custom command<br>
> by doing make VERBOSE=1. Hopefully this will give you a clue as to
what<br>
> is getting mangled.<br>
> <br>
> Finally, arguments to macros occasionally do funny things since they<br>
> aren't "real" variables, but that's probably not the problem
here.<br>
> <br>
> tyler<br>
> _______________________________________________<br>
> Powered by www.kitware.com<br>
> <br>
> Visit other Kitware open-source projects at http://www.kitware.<br>
> com/opensource/opensource.html<br>
> <br>
> Please keep messages on-topic and check the CMake FAQ at: http:<br>
> //www.cmake.org/Wiki/CMake_FAQ<br>
> <br>
> Follow this link to subscribe/unsubscribe:<br>
> 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>