[cmake-developers] Ninja windows

David Cole david.cole at kitware.com
Wed Mar 7 17:24:46 EST 2012


On Wed, Mar 7, 2012 at 5:10 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> On 3/6/2012 6:17 PM, Peter Kümmel wrote:
>
>>
>> The following tests FAILED:
>> 78 - CustomCommandWorkingDirectory (Failed)
>> 80 - BuildDepends (Failed)
>> 98 - QtAutomoc (Failed)
>> 116 - Plugin (Failed)
>> 123 - ModuleDefinition (Failed)
>> 155 - CTestTestStopTime (Failed)
>> Errors while running CTest
>>
>>
>> But it builds CMake. On more complex projects RC file rules is broken
>> ($FLAGS/$DEFINES are missing).
>>
>> A ninja binary is here, also packaged with the installer:
>> https://sourceforge.net/projects/cmakescript/files/
>> (git at github.com:syntheticpp/ninja.git, token-splitter branch)
>>
>
> OK, I grabbed the binary from here:
>  https://sourceforge.net/projects/cmakescript/files/
>
> Sadly, the curl abilities of cmake are not up to working with sourceforge
> download link redirection fu...
>
> Anyway, I did get the ninja.exe.  I was sort of able to bootstrap cmake.
>
> I did this:
>
> 1. enable ninja on windows:
> diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
> index eb4327c..eec3ad7 100644
> --- a/Source/CMakeLists.txt
> +++ b/Source/CMakeLists.txt
> -if(NOT WIN32)
> +#if(NOT WIN32)
> ...
> -endif()
> +#endif()
>
> 2. build a cmake on windows with gmake
> 3. configure and build a cmake on windows with ninja.
>  - configure worked
>  - the build failed because the ninja generator did not create the bin
> directory in build tree.
>
> [413/430] Building CXX object
> Source\CMakeFiles\cpack.dir\CPack\cpack.cxx.obj
> FAILED: C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe   /nologo /DWIN32 /D_WINDOWS
> /W3 /Zm1000 /EHsc /GR /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 -IUtilities
> -I"C:\Users\hoffman\Work\My Builds\cmake\Utilities" -ISource
> -I"C:\Users\hoffman\Work\My Builds\cmake\Source" -IUtilities\cmcompress
> -I"C:\Users\hoffman\Work\My Builds\cmake\Source\CTest"
> -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DCURL_STATICLIB
> -DLIBARCHIVE_STATIC -DCMAKE_BUILD_WITH_CMAKE -DCMAKE_USE_NINJA /TP
> /FoSource\CMakeFiles\cpack.dir\CPack\cpack.cxx.obj /Fdbin\cpack.pdb -c
> "C:\Users\hoffman\Work\My Builds\cmake\Source\CPack\cpack.cxx"
> cpack.cxx
>
>
> If I go into the build tree and mkdir bin, then it builds.
>
> So, is this just a windows ninja thing?
>
> -Bill
>
>
>
>
> --
>
> 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


That might be fixed just now (perhaps) by stuff that I merged into
'next' this afternoon. Try with the very latest next of CMake. (One of
the commits from Peter K. had not yet been merged into next and it
dealt with directory creation...)



More information about the cmake-developers mailing list