[CMake] qt .qrc file modifications require two builds

David Cole david.cole at kitware.com
Wed Dec 16 19:36:09 EST 2009


On Wed, Dec 16, 2009 at 6:16 PM, Clinton Stimpson <clinton at elemtech.com>wrote:

> On Wednesday 16 December 2009 04:05:22 pm Brad King wrote:
> > Clinton Stimpson wrote:
> > > It looks like a bug in the Xcode generator.
> > > Here's an even simpler example:
> > >
> > > project(test_xcode)
> > >
> > > add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/test.h
> > >     COMMAND cp ${CMAKE_SOURCE_DIR}/test.h.in${CMAKE_BINARY_DIR}/test.h
> > >     DEPENDS ${CMAKE_SOURCE_DIR}/test.h.in
> > >     )
> > >
> > > include_directories(${CMAKE_BINARY_DIR})
> > >
> > > add_executable(test_xcode
> > >     ${CMAKE_BINARY_DIR}/test.h
> > >     ${CMAKE_SOURCE_DIR}/test.h.in
> > >     main.cpp)
> > >
> > > I have to hit build twice if test.h.in is modified.
> >
> > This is a known limitation, and it is very hard to fix because
> > Xcode does not provide real custom command support.  It only
> > provides "shell script" build phases which we use to drive a
> > Makefile system that has the real custom commands.  Currently
> > the projects that CMake generates do not convince Xcode to
> > run the shell script build phase at the right time in all cases.
> >
> > See CMake's BuildDepends test:
> >
> >
> >
> http://www.cmake.org/cgi-bin/viewcvs.cgi/Tests/BuildDepends/CMakeLists.txt
> ?
> >revision=1.14&root=CMake&view=markup
> >
> > Note the "HELP_XCODE" blocks.
> >
> > -Brad
>
> What about adding a custom build phase and insert it before the "Compile
> Sources" build phase?
>
> <
> http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/200-
> Build_Phases/bs_build_phases.html>
>
>
Generated Xcode projects do use "Run Script" build phases... Perhaps there's
a way we could specify input and output files for those build phases. Those
bits of the UI seem to be empty when I inspect an Xcode project built from
your "test.h.in" example here.

This issue appears to be reporting the same thing...

http://public.kitware.com/Bug/view.php?id=8291

(So there's already a bug tracker entry about it...)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091216/438316be/attachment.htm>


More information about the CMake mailing list