Hello >>Can you create a VS project manually through the IDE in which >>this works correctly?
I add custom build step manually through VS10 dialog for the following cmake code , and it works as it should. But if I run this through cmake ( not manually ) it does not work: CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(quick_test) ADD_CUSTOM_COMMAND( OUTPUT generated.txt COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/generated.txt.in ${PROJECT_BINARY_DIR}/generated.txt DEPENDS generated.txt.in ) ADD_CUSTOM_TARGET(${PROJECT_NAME} DEPENDS generated.txt) What it seems odd is this : If I change the name of the input file or the name od the output file , then it does work with cmake too. Maybe this just my imagination can not tell for sure. My guess is maybe this has to do something that the output file ( generated.txt) is substring of the input file ( generated.txt.in ). Thank you On Wed, Apr 28, 2010 at 6:52 PM, Brad King <brad.k...@kitware.com> wrote: > elizabeta petreska wrote: > > I am using Visual Studio 2010 generator and cmake 2.8.1 > > The example code you show, does work with Visual Studio 2005 generator > > and visual studio 2008 generator , but does not work with Visual Studio > > 2010 generator, i.e > > If I touch the ${PROJECT_BINARY_DIR}/generated.txt, the target is not > > built anew. > > Can you create a VS project manually through the IDE in which > this works correctly? > > -Brad >
_______________________________________________ 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