1. If there is a restriction / condition regarding the "out-of-date" behavior, it might be good to update the documentation.
2. Yes you are right, I got confused at some point :-\ It is fixed. But still, it is compiling twice during "make" and "make install" (it should not compile during the latest command) 3. I am not 100% sure also... Anyone to give us an advice on that matter?? Cheers, Romain Chanu 2009/11/2 Tyler Roscoe <ty...@cryptio.net> > On Mon, Nov 02, 2009 at 10:48:49PM +0800, Romain CHANU wrote: > > # Add a custom target to manage dependencies > > add_custom_target(cxx_xml_mapping DEPENDS xml_mapping) > > > > add_custom_command( > > OUTPUT cxx_xml_mapping > > COMMAND ${XSD_EXECUTABLE} ARGS ${XSD_ARGS} > > ${CMAKE_CURRENT_SOURCE_DIR}/*.xsd > > DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.xsd > > COMMENT "Generating C++ / XML mapping files") > > Not sure if this is your problem but: > > 1. I don't think that verbiage in the docs about custom commands > *always* being out-of-date applies to makefile generators. I've only > seen that behavior in Visual Studio. > > 2. Your custom_command needs to have an OUTPUT that corresponds to the > DEPENDS of your custom_target. Here you have two different names, > xml_mapping and cxx_xml_mapping. > > 3. I'm not sure your custom_command can DEPEND on *.xsd. How is CMake > supposed to know whether *.xsd refers to 4 files or 40 files, and thus > how can it know when that set of files is up-to-date or not? > > hth, > 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