[CMake] ADD_CUSTOM_COMMAND issues
Brandon Van Every
bvanevery at gmail.com
Mon Jul 16 21:51:17 EDT 2007
I reproduce the lack of COMMENT. My system is CMake 2.4.6, Windows
2000 SP4, MinGW generator, mingw32-make executed from a Windows
command prompt. This is a bug. Please file it in the bug tracker,
I'd say priority "3 - Medium". Feel free to cut-n-paste my
confirmation.
C:\devel\mingw\append>mingw32-make
[100%] Building C object CMakeFiles/test.dir/test.obj
Linking C executable test.exe
[100%] Built target test
The WORKING_DIRECTORY works fine. It is set to use the SOURCE dir,
and that's where the \tags directory appears. Of course it would be
better CMake style to have it in the BINARY dir, to support
out-of-source builds.
C:\devel\src\append>dir
Volume in drive C has no label.
Volume Serial Number is 08F5-AEDA
Directory of C:\devel\src\append
07/16/2007 09:42p <DIR> .
07/16/2007 09:42p <DIR> ..
07/16/2007 09:39p 222 CMakeLists.txt
07/16/2007 09:42p <DIR> tags
07/13/2007 09:28a 101 test.c
2 File(s) 323 bytes
3 Dir(s) 853,618,688 bytes free
Next question is whether the COMMENT bug is present in CVS. I don't
have time to check right now.
Cheers,
Brandon Van Every
On 7/16/07, Yegor Yefremov <yegor_sub1 at visionsystems.de> wrote:
> Brandon Van Every wrote:
> > On 7/13/07, Yegor Yefremov <yegor_sub1 at visionsystems.de> wrote:
> >>
> >> # executables
> >> add_executable (test ${SRCS})
> >> add_custom_command (TARGET test POST_BUILD COMMAND ctags -R
> >> WORKING_DIRECTORY ${TEST_SOURCE_DIR} COMMENT "Creating tags" VERBATIM)
> >
> > Does changing the order of COMMAND, WORKING_DIRECTORY, and COMMENT
> > affect the output in any way? I wonder if it's possible you could be
> > having a verbatim command of "ctags -R WORKING DIRECTORY
> > ${TEST_SOURCE_DIR} COMMENT" or some weirdness like that. It would
> > explain why you don't get a working directory or a comment. Also, try
> > it without VERBATIM and see what happens.
> >
> > What is the output of "make VERBOSE=1" on a clean build? Oh, and get
> > rid of this please:
> >
> > # some parameters
> > set (CMAKE_VERBOSE_MAKEFILE OFF)
> >
> > Does that command turn off comments?
> >
> >
> > Cheers,
> > Brandon Van Every
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> I tried various permutations but in vain.
>
> set (CMAKE_VERBOSE_MAKEFILE OFF) is the default setting. In my real
> project I have ADD_CUSTOM_COMMAND call to produce source files. I can
> see comment output there.
>
> I changed my CMakeLists.txt so that I don't call ctags but create
> directory using mkdir so you can try it on your Windows system.
>
> project (TEST)
>
> # sources
> set (SRCS test.c)
>
> # executables
> add_executable (test ${SRCS})
> add_custom_command (TARGET test POST_BUILD COMMAND mkdir tags COMMENT
> "Creating tags" WORKING_DIRECTORY ${TEST_SOURCE_DIR})
>
> Cheers,
> Yegor Yefremov
>
More information about the CMake
mailing list