[CMake] Visual Studio 2010 generator and custom command
elizabeta petreska
elizabeta.petreska at gmail.com
Wed Sep 29 06:02:33 EDT 2010
Hi,
I asked this question some time ago in the mailing list. Unfortunately, I
did not try to resolve this issue since then, so I am trying again. :)
I am using Visual Studio 2010 generator and cmake 2.8.2.
Why the following custom command is runing all the time, although the input
dependency ( myfile.txt ) is not changed ? With Visual Studio 2005 it is
working ok.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(quick_test)
ADD_CUSTOM_COMMAND(
OUTPUT "${PROJECT_BINARY_DIR}/$(ConfigurationName)/generated.txt"
COMMAND ${CMAKE_COMMAND} -E copy
"${PROJECT_SOURCE_DIR}/myfile.txt"
"${PROJECT_BINARY_DIR}/$(ConfigurationName)/generated.txt"
DEPENDS "${PROJECT_SOURCE_DIR}/myfile.txt"
)
ADD_CUSTOM_TARGET(${PROJECT_NAME} DEPENDS
"${PROJECT_BINARY_DIR}/$(ConfigurationName)/generated.txt")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100929/7197f5ed/attachment.htm>
More information about the CMake
mailing list