Hi, I have an issue and I do not know if there is a solution to it...
I have two CMakeLists.txt files as described below (just the important parts): === root/src/CMakeLists.txt === (build a shared library) # Compilation add_library( ${CMAKE_PROJECT_NAME} SHARED ${CMAKE_BINARY_DIR}/xsd/mapping_file.cxx) # XML mapping source files are generated set_source_files_properties( ${CMAKE_BINARY_DIR}/xsd/mapping_file.cxx PROPERTIES GENERATED 1) # Make sure the source files are generated before the executable builds. add_dependencies(${CMAKE_PROJECT_NAME} cxx_xml_mapping) === root/xsd/CMakeLists.txt === (generates C++ / XML mapping files using code synthesis XSD) # 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") What happens is that when I build my library with "make" , it compiles and works fine. If I do a "make install", it will compile again due to the add_custom_target (which is always considered out of date and hence built every time, cf. documentation). Is there anyway to not compile again when running the make install??? Thank you for your help. Romain Chanu
_______________________________________________ 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