summaryrefslogtreecommitdiffstats
path: root/Modules/FortranCInterface/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* FortranCInterface: Add support for PGI on WindowsChristian Pfeiffer2017-05-061-3/+3
|
* FortranCInt: Pass CONFIG flags to try_compileChristian Pfeiffer2017-05-061-2/+3
| | | | | | This change ensures that Intel Fortran's /libs: in CMAKE_Fortran_FLAGS and Visual C++'s /MT or /MD in the CMAKE_C_FLAGS_RELEASE do not conflict with each other.
* FortranCInterface: Make mangling detection robust to PIC FortranBrad King2016-11-041-0/+3
| | | | | | | | | When using a Fortran compiler that produces PIC executables by default with a C compiler that does not produce PIC by default then the mangling detection executable fails to link. Explicitly enable PIC for the C compiler just in case the Fortran compiler needs it to link. Issue: #16405
* Simplify CMake per-source license noticesBrad King2016-09-271-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Avoid if() quoted auto-dereferenceBen Boeckel2014-10-201-1/+1
| | | | | | | When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly dereference or quote the variable. We want if() to auto-dereference the variable and not its value. Also replace MATCHES with STREQUAL where equivalent.
* Keep cmake_minimum_required calls in sync with current versionDaniele E. Domenichelli2014-05-191-1/+1
| | | | | | Update cmake_minimum_required calls in CMakeLists.txt in Modules and in CMakeLists.txt generated by other modules, so that they are always in sync with current CMake version.
* FortranCInterface: Fix mangling detection with Cray Fortran >= 7.3.2Brad King2011-03-241-1/+12
| | | | | | | | | | | | | | | The Cray Fortran compiler started using module init symbols in version 7.3.2. Starting in commit 71287734 (Teach FortranC interface for Intel, PGI, and gcc 4.2, 2009-08-05) we provide C versions of the module init symbols so that the detection executable can link when the C versions of the module-mangled symbols are picked up. If no C module-mangled symbol matches then we cannot let the C module init symbol appear because it will be duplicated by the Fortran copy that provides the module-mangled symbol. This was first handled for the PathScale compiler in commit 21faaa5d (FortranCInterface: Fix PathScale detection, 2010-01-22) and commit 46858720 (FortranCInterface: Fix PathScale detection again, 2010-02-16). Handle it now for the Cray compiler too.
* FortranCInterface: Recognize NAG Fortran module symbolsBrad King2010-12-091-0/+2
|
* FortranCInterface: Fix PathScale detectionBrad King2010-01-221-0/+1
| | | | | | | PathScale Fortran mangles module symbols as "MYSUB.in.MYMODULE" and also requires "mymodule_" when the module is imported. We cannot provide the symbol with ".in." mangling so we should not provide "mymodule_" because it would duplicate the one in the Fortran-provided object file.
* FortranCInterface: Mangling for Intel on WindowsBrad King2009-10-051-0/+4
| | | | | The Intel Fortran compiler for Windows uses upper-case symbol names with no trailing underscore.
* Convert CMake non-find modules to BSD LicenseBrad King2009-09-281-0/+11
| | | | | | | This adds copyright/license notification blocks CMake's non-find modules. Most of the modules had no notices at all. Some had notices referring to the BSD license already. This commit normalizes existing notices and adds missing notices.
* Teach FortranCInterface about g77 manglingBrad King2009-08-061-0/+1
| | | | | The old GNU g77 Fortran compiler uses the suffix '__' for symbols containing an underscore in their name.
* Sort FortranCInterface global mangling symbolsBrad King2009-08-061-2/+2
| | | | | This just cleans up the list ordering so more entries can be added while keeping everything organized.
* Cleanup FortranCInterface for PGI and GCC 4.2Brad King2009-08-051-6/+6
| | | | | This documents the purpose of the extra my_module_.c and mymodule.c source files, and sorts the symbols.
* Teach FortranC interface for Intel, PGI, and gcc 4.2Bill Hoffman2009-08-051-2/+6
|
* Rewrite FortranCInterface moduleBrad King2009-08-051-0/+74
This is a new FortranCInterface.cmake module to replace the previous prototype. All module support files lie in a FortranCInterface directory next to it. This module uses a new approach to detect Fortran symbol mangling. We build a single test project which defines symbols in a Fortran library (one per object-file) and calls them from a Fortran executable. The executable links to a C library which defines symbols encoding all known manglings (one per object-file). The C library falls back to the Fortran library for symbols it cannot provide. Therefore the executable will always link, but prefers the C-implemented symbols when they match. These symbols store string literals of the form INFO:symbol[<name>] so we can parse them out of the executable. This module also provides a simpler interface. It always detects the mangling as soon as it is included. A single macro is provided to generate mangling macros and optionally pre-mangled symbols.