Hi
I want to generate a source file 'SourceFileInfo.cpp', then build a library and
then delete the generated file.
So I wrote:
<snip>
add_custom_command (
OUTPUT SourceFileInfo.cpp
COMMAND ../VersionInfo/_gnuRelease/versionInfo . KERNEL
DEPENDS ${SRCS}
COMMENT "Generating SourceFileInfo.cpp"
VERBATIM)
list(APPEND SRCS SourceFileInfo.cpp)
add_library( Kernel STATIC ${SRCS} )
message("Removing file")
file( REMOVE SourceFileInfo.cpp )
But the message 'Removing file' appears as the first action when executing make
and the file remains after make has finished.
I guess that one can't interpret a CMakeLists.txt file sequentially, just like
you can't interpret a makefile sequentially.
What am I doing wrong?
Where can I find an explanation of CMake command ordering?
Best regards
David
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake