Bill Hoffman wrote:
Actually from the wiki:
http://www.cmake.org/Wiki/CMake_FAQ
Your custom commands should look like this:
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foo0.qaz
COMMAND ${DOIT_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/someinput0.txt
${CMAKE_CURRENT_BINARY_DIR}/foo0.qaz
DEPENDS ${DOIT_EXE})
I wrote that wiki entry.
That will make sure the DOIT_EXE is built before the command is run.
I would swear that once upon a time, that was not true. The DEPENDS was
a file level dependency. It would not trigger a target level dependency.
Newer versions of cmake also support just using the target name there,
so you can even have:
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foo0.qaz
COMMAND ${DOIT_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/someinput0.txt
${CMAKE_CURRENT_BINARY_DIR}/foo0.qaz
DEPENDS doit)
)
The wiki should be updated to show that information.
It's a wiki, so you could. Are you saying you want someone else to?
Cheers,
Brandon Van Every
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake