On 12/13/2016 09:26 PM, Daniel Carrera wrote:
> First of all, I want to say that I think it's amazing that Kitware has
> gone through the trouble of maintaining a separate build of Ninja with
> bugfixes so that us Fortran users can use Ninja with CMake:

Thanks for trying it out!

> -- The Fortran compiler identification is PGI 16.10.0
> -- Check for working Fortran compiler: /usr/local/bin/pgfortran
> CMake Error: Error required internal CMake variable not set, cmake may be not 
> be built correctly.
> Missing variable is:
> CMAKE_Fortran_PREPROCESS_SOURCE

This is not a problem with Ninja or our branch of it, but rather with
CMake's information about the PGI Fortran compiler not being updated
to support the Ninja generator.  One can see the value for a few other
compilers (from commit 39ebfc79e614dc395d5ace2ad5818b3ba75ca478):

```
$ git grep -A 1 Fortran_PREPROCESS_SOURCE
Modules/Compiler/GNU-Fortran.cmake:set(CMAKE_Fortran_PREPROCESS_SOURCE
Modules/Compiler/GNU-Fortran.cmake-  "<CMAKE_Fortran_COMPILER> -cpp <DEFINES> 
<INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")
--
Modules/Compiler/Intel-Fortran.cmake:set(CMAKE_Fortran_PREPROCESS_SOURCE
Modules/Compiler/Intel-Fortran.cmake-  "<CMAKE_Fortran_COMPILER> -fpp <DEFINES> 
<INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
--
Modules/Compiler/SunPro-Fortran.cmake:set(CMAKE_Fortran_PREPROCESS_SOURCE
Modules/Compiler/SunPro-Fortran.cmake-  "<CMAKE_Fortran_COMPILER> <DEFINES> 
<INCLUDES> <FLAGS> -F <SOURCE> -o <PREPROCESSED_SOURCE>")
```

The `Modules/Compiler/PGI-Fortran.cmake` module needs to be updated too.
I don't have that compiler handy, so if you can figure out the appropriate
line to add to that file, please try it out.  If you get it working please
post it and Cc me so it can be integrated.

Thanks,
-Brad

-- 

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 via email to