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
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})
#include <stdio.h>

int main(int argc, char *argv)
{
  printf("Hello world\n");

  return 1;
}
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to