summaryrefslogtreecommitdiffstats
path: root/Modules/FortranCInterface/Detect.cmake
Commit message (Collapse)AuthorAgeFilesLines
* FortranCInt: Pass CONFIG flags to try_compileChristian Pfeiffer2017-05-061-1/+4
| | | | | | 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: Fix support for VS with Intel toolsetBrad King2017-02-011-1/+2
| | | | | | | | | | | | | | | When using a Visual Studio generator with an Intel toolset, such as -T "Intel C++ Compiler XE 14.0" the generated FortranCInterface mangling detection project may fail to build due to `devenv` not working with the `/project ALL_BUILD` option. This seems to be a bug in `devenv` or the Intel VS integration. Work around the problem by building with `/project FortranCInterface` instead. We only need to build this executable and its dependencies within the detection test project anyway. Fixes: #16519
* 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.
* Use a more reliable regex for extracting binary INFO stringsChuck Atkins2014-09-031-1/+1
| | | | | | | A few different regular expressions were being used in various places to extract info strings from binaries. This uses a consistent regex amongst all of them now. This also fixes the broken ABI detection for Cray compilers.
* Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)Rolf Eike Beer2014-04-141-3/+2
| | | | | | The matches have already been calculated and can simply be taken from CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very similar regular expressions.
* FortranCInterface: Fix cross-compiling Linux to MinGW (#14358)Michel Zou2013-08-141-1/+1
| | | | | | | | | After building the test binary tell find_program to search for it with the ${CMAKE_EXECUTABLE_SUFFIX} so that the .exe can be found. Since find_program is normally used to locate host tools while cross-compiling it needs this hint to find the target binary. Suggested-by: Denis Barbier <bouzim@gmail.com>
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* FortranCInterface: Support '=' in language flagsBrad King2009-12-151-2/+2
| | | | | | | | The commit "FortranCInterface: Honor language flags in checks" taught the FortranCInterface module to pass C and Fortran flags into its detection and verification checks. We improve on the change to allow the '=' character in the language flags. This requires passing the cache entry type with the -D options.
* FortranCInterface: Honor language flags in checksBrad King2009-11-191-0/+3
| | | | | | | We pass CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, and CMAKE_Fortran_FLAGS through try_compile() for the FortranCInterface Detect and Verify projects. This honors user-specified compiler flags for each language, thus supporting flags that affect the Fortran mangling.
* 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.
* Create FortranCInterface_VERIFY functionBrad King2009-08-241-0/+4
| | | | | | | This function builds a simple test project using a combination of Fortran and C (and optionally C++) to verify that the compilers are compatible. The idea is to help projects report very early to users that the compilers specified cannot mix languages.
* Teach FortranCInterface to load outside resultsBrad King2009-08-241-0/+165
We split the main detection logic into a Detect.cmake support module and load it only when detection results are not already available. This allows results computed by the main project to be used in try-compile projects without recomputing them. The call to try_compile() need only to pass FortranCInterface_BINARY_DIR through the CMAKE_FLAGS option.