[CMake] add_custom_command weirdness

Christoph Höger choeger at cs.tu-berlin.de
Wed Mar 31 04:26:42 EDT 2010


No. If this file was changed, that bevavior would be perfectly normal ;)

On Tue, Mar 30, 2010 at 01:04:58PM -0400, David Cole wrote:
> That would happen if hcparser.y were changed. Does that file also change? Is
> it generated?
> 
> 
> 2010/3/30 Christoph Höger <choeger at cs.tu-berlin.de>
> 
> > Hi all,
> >
> > I have a buildsystem here for a project containing several subprojects. All
> > those subprojects have their own CMakeLists.txt in a subfolder.
> > One of those subprojects needs to run a script to generate some
> > sourcefiles:
> >
> > add_custom_command(OUTPUT ${typesh} ${typesc}
> >        COMMAND ${binbash} ${PROJECT_SOURCE_DIR}/mosilac/mktypes.sh
> >        DEPENDS ${src}/hcparser.y
> >        WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/mosilac)
> >
> > This does work. As it does in other places. But in that single place I have
> > a problem when working on other parts of the buildsystem:
> > Whenever I change a CMakeLists.txt file subsequent make calls lead to a
> > re-generation of the output files, although they're unchanged.
> >
> > Does anyone know why this happens?
> >
> > _______________________________________________
> > 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
> >


More information about the CMake mailing list