On Wed, Sep 16, 2009 at 04:27:48PM -0400, Eric Tellefsen wrote:
> Solaris make 

My condolences :p.

> My problem has to do with the ARGS section of the custom command. 
> Specifically the 'legacy' Makefile uses an argument  --include-regex 
> "#../../XML/Types/##"  in order to remove this prefix from the generated 
> HXX files, where applicable.
>
> ----------- Code which invokes macro
> SET( STUBDIR ${CMAKE_BINARY_DIR}/Stubs )
> SET( TYPE_XSD_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
> SET( TYPE_REGEX_FLAG "#../../XML/Types/##" )
> 
> XSDGenCXXSources( TypesOutputFiles
>                     "${TYPE_REGEX_FLAG}"
>                     "${TYPE_XSD_DIR}"
>                     "${STUBDIR}"
>                     "${CMAKE_CURRENT_SOURCE_DIR}"
>                     )
> 
> ----------- Macro -----------------------------
> macro ( XSDGenCXXSources OUTPUT_FILES REGEX XSD_DIR OUTPUT_DIR Working_Dir 
> )
> 
>     SET( XSD_EXE $ENV{CODE_SYNTHESIS_HOME}/bin/xsd )
> 
>     ADD_CUSTOM_COMMAND(
>             OUTPUT  ${${OUTPUT_FILES}}
>             COMMAND mkdir
>             ARGS    -p ${OUTPUT_DIR}
>             COMMAND ${XSD_EXE}
>           ARGS    cxx-tree --generate-serialization --output-dir 
> ${OUTPUT_DIR} --include-regex " ${REGEX} " ${XSD_DIR}/*.xsd
>             COMMENT "Generating CXX files from ${XSD_DIR} and placing them 
> in ${OUTPUT_DIR}"
>             WORKING DIRECTORY ${Working_Dir}
>             )
> endmacro ( XSDGenCXXSources )

Usually, problems like this are caused by improper quoting. First, try
the VERBATIM flag to add_custom_command.

You can inspect the command line CMake generates for your custom command
by doing make VERBOSE=1. Hopefully this will give you a clue as to what
is getting mangled.

Finally, arguments to macros occasionally do funny things since they
aren't "real" variables, but that's probably not the problem here.

tyler
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to