[Cmake] SET_SOURCE_FILE_PROPERTIES not working?

Christopher Baus christopher at baus.net
Mon Jul 26 17:48:19 EDT 2004


-- 
Christopher Baus
http://www.baus.net/
Tahoe, Wine, and Linux.

> Christopher Baus wrote:
>>>See the question "How can I generate a source file during the build?" in
>>>the FAQ:
>>>
>>>   http://www.cmake.org/Wiki/CMake_FAQ#Using_CMake
>>
>>
>>
>> The example doesn't actually work.  It always results in:
>>
>> Building dependencies. cmake.depends...
>> make[3]: *** No rule to make target `SVNVersion.cpp', needed by
>
> I tested the example before putting it on the FAQ.  Are you sure you
> have the full path to SVNVersion.cpp (using CMAKE_CURRENT_BINARY_DIR) in
> the ADD_CUSTOM_COMMAND?

SET_SOURCE_FILES_PROPERTIES(SVNVersion.cpp PROPERTIES GENERATED 1)


ADD_CUSTOM_COMMAND(OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/SVNOptions.cpp
                   COMMAND ${BASH}
                   ARGS ./gensvnversion.sh
                   )

ADD_EXECUTABLE(app ${APP_SRCS})

TARGET_LINK_LIBRARIES(app util)
LINK_LIBRARIES(argtable2 xml2 z)





More information about the Cmake mailing list