On Wed, Mar 14, 2012 at 10:52:22AM -0400, Bill Hoffman wrote:
> On 3/13/2012 10:39 PM, Peter Collingbourne wrote:
>> Maybe another time we can think about ways to improve PCH support,
>> but for now I guess we can add an OR Ninja to this test and add
>> OBJECT_OUTPUTS support to the Ninja generator.
> I tried making that blog active for ninja and a I get a new error:
>
>
> 122: ninja: ERROR: 'PCH\foo_precompiled.pch', needed by
> 'CMakeFiles\foo.dir\foo1.c.obj', missing and no known rule to make it
>
>
> So, Ninja is not handling OBJECT_OUTPUTS and OBJECT_DEPENDS correctly?
>
>
> SET_SOURCE_FILES_PROPERTIES(foo_precompile.c PROPERTIES
> OBJECT_OUTPUTS "${PCH_DIR}/foo_precompiled.pch")
>
> # These source files use the precompiled header.
> SET_SOURCE_FILES_PROPERTIES(${foo_SRCS} PROPERTIES
> OBJECT_DEPENDS "${PCH_DIR}/foo_precompiled.pch")
The Ninja generator is handling OBJECT_DEPENDS correctly but not
OBJECT_OUTPUTS. Adding support shouldn't be too difficult -- we
just need to output a phony build statement creating a dependency
from any OBJECT_OUTPUTS to the object file.
Thanks,
--
Peter
--
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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers