Commit Graph

14 Commits

Author SHA1 Message Date
Kitware Robot
496ec6036f Help: Add Sphinx 'versionadded' directives to each top-level document
Run the `Utilities/Sphinx/update_versions.py` script to add initial
markup to every top-level document and find module.

Issue: #19715
2020-07-06 10:23:20 -04:00
Brad King
4b8297721f CheckIPOSupported: Avoid polluting cache with common name 'result'
Fixes: #20508
2020-03-26 12:57:07 -04:00
Kyle Edwards
88b40744b5 CMakeParseArguments: Remove superfluous includes of CMakeParseArguments
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.
2018-12-13 19:51:01 -05:00
Niels Dekker
567fabe88e IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual Studio
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
2018-09-17 10:53:10 -04:00
Brad King
4e1ea02bb8 CheckIPOSupported: Tolerate backslashes in output of failed checks
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
2018-08-30 11:46:19 -04:00
Brad King
b7dbb25a0a CheckIPOSupported: Simplify result reporting logic
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.
2018-08-30 11:45:13 -04:00
Brad King
9e341f05b0 CheckIPOSupported: Document existing Fortran support
Support was added by commit v3.9.0-rc1~318^2 (CheckIPOSupported: Add
Fortran support, 2017-04-02) but the documentation was not updated.
2018-01-30 12:58:41 -05:00
Brad King
ba247ccaba IPO: Consider support for each language separately
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
2017-06-14 10:36:57 -04:00
Ruslan Baratov
7e75568b00 Xcode: Support IPO (LTO) 2017-05-02 18:33:25 +03:00
Ruslan Baratov
87199ea66b CheckIPOSupported: Add Fortran support 2017-04-04 09:35:39 -04:00
Ruslan Baratov
c92fd25661 CheckIPOSupported: Move '_CMakeLTOTest-*' under 'CMakeFiles' 2017-04-04 09:35:31 -04:00
Ruslan Baratov
1588a577d1 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION
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.
2017-03-30 14:56:46 -04:00
Ruslan Baratov
e05835c35b CheckIPOSupported: Visual Studio and Xcode generators do not support IPO 2017-03-30 10:16:10 -04:00
Ruslan Baratov
fdb2ba2521 CheckIPOSupported: New module to check for compiler/cmake IPO support 2017-03-11 19:46:25 +08:00