[CMake] ADD_CUSTOM_COMMAND with duplicated filenames in different paths

Ricardo Martins rmartins at dcc.online.pt
Wed Mar 14 14:10:36 EST 2007


Hi,

I'm having problems using ADD_CUSTOM_COMMAND with filenames that share  
the name but live in different paths:

MACRO(GENERATE_FROM_XML target xml)
   ADD_CUSTOM_COMMAND(
     OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/"${target}"
     COMMAND ${JAVA_RUNTIME} ${SAXON} -o ${PROJECT_SOURCE_DIR}/${target}
     ${xml} ${PROJECT_SOURCE_DIR}/${target}.xsl
     DEPENDS ${xml} ${PROJECT_SOURCE_DIR}/${target}.xsl
     MAIN_DEPENDENCY ${xml}
     )
ENDMACRO(GENERATE_FROM_XML)

GENERATE_FROM_XML(src/Messages/IMC/Messages.cpp ${IMC_XML})
GENERATE_FROM_XML(src/Messages/ADM/Messages.cpp ${ADM_XML})

The second directive will never be called, is there a workaround for this ?

Regards,
Ricardo Martins

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the CMake mailing list