[cmake-developers] ninja bug on windows

Bill Hoffman bill.hoffman at kitware.com
Tue Mar 13 19:08:31 EDT 2012


On 3/13/2012 5:58 PM, Peter Kümmel wrote:
>
> Not perfect because you tested it on an old build ;)
OK, I did a clean build tree, and it works now, thanks.



I just checked in a fix for
LinkDirectory

The remaining failing tests on windows are:
BuildDepends, ModuleDefinition, Plugin, and PrecompiledHeader


BuildDepends  - not sure what is up with this one, but it fails on the 
OSX as well.

ModuleDefinition - this one is because enable exports is not implemented 
for ninja yet, the properties for that are done like this:

SET_TARGET_PROPERTIES(example_exe PROPERTIES
   ENABLE_EXPORTS 1
   OUTPUT_NAME example
   # Test placing exe import library in unique directory.
   ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/exe
   )

Plugin - fails for the same reason as ModuleDefinition


PrecompiledHeader - This one seems to be a dependency problem.

The first time you run it you get this:

122: Run Build Command:C:/cygwin/bin/ninja.exe
[3/4] Building C object CMakeFiles\foo.dir\foo1.c.obj
122: FAILED: C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe   /nologo /DWIN32 
/D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi  /Ob0 /Od /RTC1 
/Yufoo_precompiled.h /FIfoo_precompiled.h "/FpC:/Users/hoffman/Work/My 
Builds/cmake-ninja/Tests/PrecompiledHeader/PCH/foo_precompiled.pch" 
/FoCMakeFiles\foo.dir\foo1.c.obj /Fdfoo.pdb -c "C:\Users\hoffman\Work\My 
Builds\cmake\Tests\PrecompiledHeader\foo1.c"
122:
122: foo1.c
122: C:\Users\hoffman\Work\My 
Builds\cmake\Tests\PrecompiledHeader\foo1.c : fatal error C1083: Cannot 
open precompiled header file: 'C:/Users/hoffman/Work/My 
Builds/cmake-ninja/Tests/PrecompiledHeader/PCH/foo_precompiled.pch': 
Permission denied
[3/4] Building C object CMakeFiles\foo.dir\foo_precompile.c.obj  out: 
foo_precom[3/4] Building C object CMakeFiles\foo.dir\foo2.c.obj 
                           out: foo2.c
122: ninja: build stopped: subcommand failed.
1/1 Test #122: PrecompiledHeader ................***Failed    1.96 sec

If I run the test again, it passes.   Might be that ninja is doing more 
in parallel than gmake, nmake or visual studio.


-Bill



More information about the cmake-developers mailing list