2012/9/25 Peter Kümmel <[email protected]> > OK, Core_pch.pch is listed, but only as "Order-only dependency": > http://martine.github.com/**ninja/manual.html#ref_**dependencies<http://martine.github.com/ninja/manual.html#ref_dependencies> > > Does it work when you make the pch a "Implicit dependency": change '||' to > '|'? > Yes, Change "||" to "|", it works!
> > 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. > Yes, It is done. NMake Makefiles and Unix Makefiles generator both works. Here is NMake build logs: *First build:* > D:\qpSOFT\Projects\QtCreator\ok>nmake > > Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 > Copyright (C) Microsoft Corporation. All rights reserved. > > Scanning dependencies of target Core > [ 50%] Building CXX object > src/plugins/coreplugin/CMakeFiles/Core.dir/Core_pch.cpp.obj > Core_pch.cpp > [100%] Building CXX object > src/plugins/coreplugin/CMakeFiles/Core.dir/lib.cpp.obj > lib.cpp > Linking CXX shared library ..\..\..\lib\qtcreator\plugins\Nokia\Core.dll > [100%] Built target Core > > *No changes, Build again :* > D:\qpSOFT\Projects\QtCreator\ok>nmake > > Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 > Copyright (C) Microsoft Corporation. All rights reserved. > > [100%] Built target Core > > *Change Core_pch.cpp (Add #include <iostream>):* > D:\qpSOFT\Projects\QtCreator\ok>nmake > > Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 > Copyright (C) Microsoft Corporation. All rights reserved. > > Scanning dependencies of target Core > [ 50%] Building CXX object > src/plugins/coreplugin/CMakeFiles/Core.dir/Core_pch.cpp.obj > Core_pch.cpp > [100%] Building CXX object > src/plugins/coreplugin/CMakeFiles/Core.dir/lib.cpp.obj > lib.cpp > Linking CXX shared library ..\..\..\lib\qtcreator\plugins\Nokia\Core.dll > [100%] Built target Core > But I don't know It's a cmake bug? or a ninja bug? -- *Please don't ask where I come from, It's a shame!* Best Regards Yuchen
-- 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
