[CMake] Ninja generator fail for QNX on Windows

Bill Hoffman bill.hoffman at kitware.com
Mon Sep 22 12:32:47 EDT 2014


On 9/22/2014 11:53 AM, Cristian Adam wrote:
>
> "-d explain" parameter gives for lots of files (probably all) in the
> project (headers, source files, object files, static libraries,
> executables)
> "is dirty"
>
> This means that ninja's method of detecting if a file has been changed
> doesn't quite work for QNX.  Or is this being set by cmake?
> Some compiler flag which needs a -Wc, or -Wp prefix?

I would look close at the output of explain:

For example, in building cmake:

If I start with an up to date build, and do this:

  touch ../cmake/Source/cmake.cxx

ninja -d explain

I get something like this:

    Creating library bin\ctest.lib and object bin\ctest.exp
ninja explain: output Source\CMakeFiles\CMakeLib.dir\cmake.cxx.obj older 
than most recent input C:\Users\hoffman\Work\My 
Builds\cmake\Source\cmake.cxx (433106324 vs 433106443)
ninja explain: Source\CMakeFiles\CMakeLib.dir\cmake.cxx.obj is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: bin\cmake.exe is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: bin\cmcldeps.exe is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: bin\cpack.exe is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: bin\ctest.exe is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: Tests\CMakeLib\CMakeLibTests.exe is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: Tests\CTestTestMemcheck\memcheck_fail.exe is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: Tests\CTestTestMemcheck\BC.exe is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: Tests\CTestTestMemcheck\purify.exe is dirty
ninja explain: Source\CMakeLib.lib is dirty
ninja explain: Tests\CTestTestMemcheck\valgrind.exe is dirty


Maybe if you looked at the very first older than in your output instead 
of the dirty ones it might tell you what ninja thinks is out of date. 
Could be some sort of path issue that has something to do with the way 
the paths are constructed.  Again, without seeing the details I can only 
guess.

Do makefiles work for you?  What if you try the "Unix Makefiles" 
generator on the same machine does it have the same problem?

-Bill


More information about the CMake mailing list