On 03/06/2012 02:07 PM, Andrea Crotti wrote:


I opened a thread some time ago about this, and I actually thought it
was a bug in the documentation, because then why everything works otherwise?

This simple example which I produced

add_custom_target(a
  ${CMAKE_COMMAND} -E echo "a"
  )

add_custom_target(b
  ${CMAKE_COMMAND} -E echo "b"
  DEPENDS a
  )


does exactly what would be expected, even if there files a or b don't exist. So I might suppose that this intra-target dependencies work but not always,
is that correct?

I tried to substitute the wrong DEPENDS with the add_dependencies and it seems to work now. That doesn't explain why it works on Windows and my other Linux box, but well if that's the correct
way to do it I'll stick with that..
--

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