This updates the module documentation to be more synced with other
modules. Also, this module on the first glance doesn't do what most
people might think. Because when condition evaluates to false, internal
cache remains with the same value, and a local variable is created with
the value provided in the last argument.
- Command arguments described separately and their placeholders renamed
to more intuitive names.
- More examples added, starting with a very basic syntax usage to more
complex ones, each described in more details.
- Each example has include() added to be more clear that this is a
module command.
Variables such as CMAKE_COMPILER_IS_GNUCC are documented as
obsolete/deprecated and ideally shouldn't be used in the code anymore
to have clearer compiler identifications.
In the past QCC compiler was identified as GNU and also had this
variable set to 1 (see policy CMP0047). Same still applies for LCC
compiler (see policy CMP0129).
- Usage example added to highlight the imported target usage.
- This updates and syncs the module documentation as done in other
similar find modules.
- The legacy variable ZLIB_VERSION_STRING mentioned only in the legacy
variables section.
- Added example.
- Docs synced with other similar find modules.
- Perl_FOUND and PERL_FOUND variables are always set as of CMake 3.3 to
the same value.
The `CMAKE_COMPILER_IS_*` variables have been documented as deprecated
since CMake 3.24, without emitting warnings. This commit updates their
documentation to help users safely migrate to `CMAKE_<LANG>_COMPILER_ID`
variables. Also a RST deprecation directive is added to clarify their
status.
- Synced formatting with other similar find modules
- Added imported target to the example instead of defining compilation
properties for the entire directory.
- The Armadillo_FOUND variable used - both are always set by
find_package_handle_standard_args() for BC.
- This moves the CMakeFindPackageMode internal module documentation to
the --find-package option as this module itself cannot be used by the
project.
- Additionally, some links added.
- The `QUIET` variable renamed in documentation to `SILENT` to be
effective according to the current code.
Previously we relied on the cross-compiling toolchain file to set
`CMAKE_SYSTEM_PROCESSOR` to a value consistent with the CUDA compiler's
target architecture. When a compiled language is enabled, we now have
its target architecture in `CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID`.
Use that to select the CUDA toolkit's corresponding target directory.
If no language is enabled, or the compiler's target architecture is not
known, fall back to `CMAKE_SYSTEM_PROCESSOR`. If that is not set, fail
with an explicit error make clear what is wrong.
7f0f382c55 Provide CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID on more compilers
019f0f8b32 ARCHITECTURE_ID: Save persistently even if empty
8e46672b29 Fortran: Detect pointer size on sparc architectures
eddf66eaef CMakeDetermineASMCompiler: De-duplicate list of compiler info variables
c0224f5aa1 CMakeDetermineCompilerABI: Make ABI info string more robust
67ab580804 Windows/Clang: Fix indentation in platform information module
1c9f8eeb4f Help: Document CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10516