[CMake] ADD_CUSTOM_COMMAND issues
Yegor Yefremov
yegor_sub1 at visionsystems.de
Fri Jul 13 03:32:36 EDT 2007
Hello,
I want to use ADD_CUSTOM_COMMAND to create tags when building the
project. The first problem, ADD_CUSTOM_COMMAND must be placed after the
target definition. Should it be so? One can parse the CMakeLists.txt and
build dependencies so that it doesn't matter where to place
ADD_CUSTOM_COMMAND.
The second issue is that COMMENT won't be printed at all. A didn't use
APPEND.
[Citation from http://www.cmake.org/HTML/Documentation.html]:
The COMMENT, WORKING_DIRECTORY, and MAIN_DEPENDENCY options are
currently ignored when APPEND is given, but may be used in the future.
But for me it is not the case.
Best regards,
Yegor Yefremov
-------------- next part --------------
project (TEST)
# some parameters
set (CMAKE_VERBOSE_MAKEFILE OFF)
# sources
set (SRCS test.c)
add_custom_command (TARGET test POST_BUILD COMMAND ctags -R WORKING_DIRECTORY ${HWTEST_SOURCE_DIR} COMMENT "Creating tags" VERBATIM)
# executables
add_executable (test ${SRCS})
-------------- next part --------------
#include <stdio.h>
int main(int argc, char *argv)
{
printf("Hello world\n");
return 1;
}
More information about the CMake
mailing list