What are the missing features in Ninja that CMake needs?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What are the missing features in Ninja that CMake needs?

Daniel Carrera
Hello,

Kitware maintains a separate release of Ninja in order to support Fortran:



I kind of want to ask what Kitware changed, but I probably won't understand the details. Instead, I was hoping someone could give me a toy example of a Fortran program that cannot be compiled without Kitware's changes to Ninja?

Today I tried to compare CMake+Ninja with Meson+Ninja and both were able to handle the toy programs that I threw at them. So I haven't found the corner of the parameter space that is fixed by Kitware's patches.

Cheers,
Daniel.

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: What are the missing features in Ninja that CMake needs?

CMake mailing list
This "compare" view on GitHub shows the difference between the
regular/upstream ninja and the Kitware patched ninja:

    https://github.com/ninja-build/ninja/compare/master...Kitware:features-for-fortran

The ReadMe explains the high-level view, and says it is gradually
being worked into upstream ninja.

Looks to me like it deals with "implicit dynamically discovered
dependencies" in the Fortran sources. (i.e., you don't have to say in
the build system input what order Fortran files get compiled in, but
the order is important, and CMake analyzes them to figure it out.)

This change probably helps CMake communicate that info to ninja so
things rebuild properly as files get edited.

I can't tell from a quick glance through exactly what the problem
scenarios are, but I bet Brad King can reply with more info --
probably not till January, though. I saw a message from him Friday
signing off until then.


Cheers,
David C.




On Sat, Dec 17, 2016 at 9:24 PM, Daniel Carrera <[hidden email]> wrote:

> Hello,
>
> Kitware maintains a separate release of Ninja in order to support Fortran:
>
> https://github.com/Kitware/ninja
>
>
> I kind of want to ask what Kitware changed, but I probably won't understand
> the details. Instead, I was hoping someone could give me a toy example of a
> Fortran program that cannot be compiled without Kitware's changes to Ninja?
>
> Today I tried to compare CMake+Ninja with Meson+Ninja and both were able to
> handle the toy programs that I threw at them. So I haven't found the corner
> of the parameter space that is fixed by Kitware's patches.
>
> Cheers,
> Daniel.
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: What are the missing features in Ninja that CMake needs?

Bill Hoffman
On 12/18/2016 8:57 AM, David Cole via CMake wrote:
> This "compare" view on GitHub shows the difference between the
> regular/upstream ninja and the Kitware patched ninja:
>
>     https://github.com/ninja-build/ninja/compare/master...Kitware:features-for-fortran
>
> The ReadMe explains the high-level view, and says it is gradually
> being worked into upstream ninja.
>
It has to do with Fortran modules. These are sort of "include" files
that are automatically generated by the Fortran compiler.  So, there is
a specific order in which Fortran source files must be compiled so that
files that include exist before they try to include them.

For some examples see this cmake test case:

https://gitlab.kitware.com/cmake/cmake/tree/master/Tests/FortranModules

It will not pass with upstream ninja.

-Bill

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake