[CMake] add_custom_command
Amine Chadly
amine.chadly at gmail.com
Wed Oct 17 09:00:40 EDT 2012
On Mon, Oct 15, 2012 at 12:54 AM, Totte Karlsson
<totte at dunescientific.com>wrote:
> Hi,
>
Hello !
> I have an executable target, that I want to be executed as part of its own
> build.
>
> The target takes one argument, which is output folder of a text file. This
> text file is part of my source dir.
>
> In my CMake file I have, at the end
>
> set( resultFileFolder "${PROJECT_SOURCE_DIR}/wiki/**reports")
> set( resultFile "${resFileFolder}/tests_auto.**xml")
>
> add_custom_command(
> DEPENDS ${target}
> OUTPUT ${resultFile}
> COMMAND ${CMAKE_CURRENT_BINARY_DIR}/**bin/${target}
> ARGS ${resultFileFolder}
> )
>
More information about the CMake
mailing list