Hi, I am trying to find a solution with add_custom_command that can only depends on file generated within the same directory as where it is defined. What would I need to change here to make this small example work:
$ cat CMakeLists.txt project(d12) cmake_minimum_required(VERSION 2.8) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bla.txt COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/bla.txt DEPENDS ${d12_BINARY_DIR}/sub/foo.txt ) add_custom_target(bla ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bla.txt ) add_subdirectory(sub) and $ cat sub/CMakeLists.txt add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foo.txt COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/foo.txt ) Ref: svn co https://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/12 Thanks for suggestions, -- Mathieu _______________________________________________ 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