[Cmake] Dependency on generated file

Ken Martin ken.martin at kitware.com
Tue May 13 09:18:03 EDT 2003


 
>     # add a post build command (confusing...)
>     ADD_CUSTOM_COMMAND(
>       SOURCE generator
>       COMMAND ${EXECUTABLE_OUTPUT_PATH}/generator${EXE_EXTENSION}
>       ARGS your_args
>       TARGET generator
>       OUTPUTS ${PROJECT_BINARY_DIR}/out.c)

Actually to be safe on windows you need to put CMAKE_CFG_INTDIR in the
path to the exec as well. So the command should be closer to..

COMMAND
${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/generator${EXE_EXTENSION}







More information about the CMake mailing list