On 25.09.2012 08:13, Loaden wrote:
*After change Core_pch.cpp (add #include <iostream> in it), here is the
build log:*
[1/2] Building CXX object
src\plugins\coreplugin\CMakeFiles\Core.dir\Core_pch.cpp.obj
[2/2] Linking CXX shared library lib\qtcreator\plugins\Nokia\Core.dll
Yes, lib.cpp is not compiled again.
build.ninja
=============================================================================
# Object build statements for SHARED_LIBRARY target Core
build src\plugins\coreplugin\CMakeFiles\Core.dir\lib.cpp.obj: CXX_COMPILER
..\src\plugins\coreplugin\lib.cpp || src\plugins\coreplugin\Core_pch.pch
DEFINES = -DCore_EXPORTS -DUNICODE -D_CRT_SECURE_NO_WARNINGS
OK, Core_pch.pch is listed, but only as "Order-only dependency":
http://martine.github.com/ninja/manual.html#ref_dependencies
Does it work when you make the pch a "Implicit dependency": change '||' to '|'?
This could be fixed in you pch macro by making each source file depend on the
pch file.
Or is this already done? Then you have found a bug in the ninja generator.
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://www.cmake.org/mailman/listinfo/cmake