summaryrefslogtreecommitdiffstats
path: root/Modules/CheckIPOSupported.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Drop redundant check logging to CMakeOutput.log and CMakeError.logBrad King2023-01-181-3/+0
| | | | | | | | | | `try_compile` and `try_run` now automatically log checks using them to `CMakeConfigureLog.yaml`. Add `LOG_DESCRIPTION` arguments to some `try_compile` calls to replace the description previously written to the old logs. Issue: #23200
* Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-161-3/+3
| | | | | | Modify modules that ship with CMake and use the project flavor of try_compile to use the new signature added by commit 56ae40cc59 (try_compile: Add PROJECT keyword-dispatched signature, 2022-09-14).
* CUDA: Add Device LTO support for nvccRobert Maynard2022-07-221-13/+24
| | | | Fixes #22200
* CheckIPO: Refactor logic selecting test source filesRobert Maynard2022-07-131-14/+11
|
* CheckIPOSupported: Compile check using flags of calling projectBrad King2022-06-101-0/+21
| | | | | | | | | | | | | | | | Forward `CMAKE_<LANG>_FLAGS` and `CMAKE_<LANG>_FLAGS_DEBUG` from the calling project into the test project. The set of flags may affect the availability of IPO support. Since this may change the result of the check for existing projects, add a policy for compatibility. This was discovered after commit 5fcadc481e (MSVC: Default to -ZI instead of /Zi for x86 and x64, 2022-05-24) introduced policy CMP0138 to switch our default for MSVC's debug info flag. The `-ZI` flag is incompatible with the `-GL` flag used for IPO, so CMP0138 was reverted pending future work on an alternative solution. Re-use the CMP0138 policy number for this change to CheckIPOSupported instead. Fixes: #23607
* Help: Add `.. versionadded` directives to module docsNikita Nemkin2020-12-021-0/+3
| | | | Issue: #19715
* Help: Add Sphinx 'versionadded' directives to each top-level documentKitware Robot2020-07-061-0/+2
| | | | | | | Run the `Utilities/Sphinx/update_versions.py` script to add initial markup to every top-level document and find module. Issue: #19715
* CheckIPOSupported: Avoid polluting cache with common name 'result'Brad King2020-03-261-2/+4
| | | | Fixes: #20508
* CMakeParseArguments: Remove superfluous includes of CMakeParseArgumentsKyle Edwards2018-12-141-2/+0
| | | | | | | | | | | | | | Because cmake_parse_arguments() has been implemented as a native command, there is no need to include(CMakeParseArguments) anymore. Its inclusion has been removed from several CMake modules. Tests/CMakeOnly/CMakeLists.txt has been changed to include the *building* CMake's copy of CMakeParseArguments rather than the *built* CMake's copy. This file included the *built* copy because when this file was introduced, CMake could still be built with versions that didn't supply cmake_parse_arguments(). Now, CMake requires 3.1 or greater, where cmake_parse_arguments() existed but was still in the form of a module, so we include it from the *building* CMake.
* IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual StudioNiels Dekker2018-09-171-1/+1
| | | | | | | | | Add IPO support for Visual Studio (which is referred to by VS as "Link Time Code Generation" and "Whole Program Optimization"), for VS version >= 10. This allows CMake/VS users to enable IPO by setting property `INTERPROCEDURAL_OPTIMIZATION`. Fixes: #16748
* CheckIPOSupported: Tolerate backslashes in output of failed checksBrad King2018-08-301-1/+7
| | | | | | | | | | | | | Avoid passing the output of our `try_compile` through a macro argument. Macro invocations re-parse their arguments and so should not be given arbitrary content that may contain backslashes and such. Instead pass a simple message. This is also more readable in the case that the macro generates a message itself. After the macro returns, report the real output directly to the variable named by our caller. Also record the output in a log file as other checks do on failure. Fixes: #18244
* CheckIPOSupported: Simplify result reporting logicBrad King2018-08-301-3/+4
| | | | | | Simplify the test for whether a `RESULT` argument was given to the `check_ipo_supported` call. Also do not set an empty variable name if `OUTPUT` was not given.
* CheckIPOSupported: Document existing Fortran supportBrad King2018-01-301-1/+1
| | | | | Support was added by commit v3.9.0-rc1~318^2 (CheckIPOSupported: Add Fortran support, 2017-04-02) but the documentation was not updated.
* IPO: Consider support for each language separatelyBrad King2017-06-141-8/+10
| | | | | | | | | We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944
* Xcode: Support IPO (LTO)Ruslan Baratov2017-05-021-1/+1
|
* CheckIPOSupported: Add Fortran supportRuslan Baratov2017-04-041-6/+3
|
* CheckIPOSupported: Move '_CMakeLTOTest-*' under 'CMakeFiles'Ruslan Baratov2017-04-041-1/+1
|
* Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATIONRuslan Baratov2017-03-301-1/+14
| | | | | | | | | Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was honored only for the Intel compiler on Linux and otherwise ignored. In order to add support for more compilers incrementally without changing behavior in the future, add a new policy whose NEW behavior enforces the `INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported compilers and otherwise produce an error.
* CheckIPOSupported: Visual Studio and Xcode generators do not support IPORuslan Baratov2017-03-301-1/+6
|
* CheckIPOSupported: New module to check for compiler/cmake IPO supportRuslan Baratov2017-03-111-0/+215