Hello,

As you may be aware recent Fortran standards have introduced the notion of 
standardised interoperability of Fortran with C. To enable practical 
implementation of standardised interoperability the Fortran standard has the 
notion of the Fortran compiler having a "companion C processor" - read 
compatible C compiler. Each Fortran implementation is free to choose which C is 
its companion or companions. The question therefore arises as to whether CMake 
is yet smart enough to correctly choose compatible combinations of C and 
Fortran compilers.

An example might be as follows.

A system has C compilers C1, C2 and C3 and Fortran compilers F1 and F2 
installed. Compiler C1 is not interoperable with F1 or F2, C2 is interoperable 
with F1 but not F2 and C3 is interoperable with both F1 and F2. It would be 
highly desirable for CMake to:

(i)                Inform the user (e.g. by a fatal error) that if they choose 
C1 as their C compiler then there is no compatible Fortran compiler available 
on their system;

(ii)              If the user does not specify either a C or Fortran compiler 
that a compatible pair be chosen by CMake. In the example given it might be 
preferable (all other things being equal) for C3 to be chosen as the C compiler 
since it maximizes the number of Fortran compilers with which the software can 
be built.

Does CMake current offer any support in this area? Are there any plans to 
implement / extend such support?

Many thanks,
David.

-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to