The warning for policy CMP0174 can be triggered if a project mistakenly
specifies CONFIGURE_COMMAND, BUILD_COMMAND, INSTALL_COMMAND,
or TEST_COMMAND as keywords to FetchContent_Declare() and it passes
an empty string after the keyword. It shouldn't be specifying any of those
keywords, but doing so has always worked because FetchContent_Declare()
explicitly discards them. However, when a project specifies them, they get
used internally in contexts where the policy settings are those of the
FetchContent module itself. Those settings haven't been updated past
CMake 3.29, and CMP0174 came in with CMake 3.31.
Update the policy settings for FetchContent to avoid triggering the CMP0174
warning when a project erroneously specifies the prohibited keywords.
Fixes: #27157
With Clang, `CMAKE_C_COMPILER_TARGET` adds a `--target=` flag as part of
the `<CMAKE_C_COMPILER>` placeholder, causing the flag to be passed to
our `ExportImportList` script. Tolerate it.
Fixes: #27167
- The check_include_files(LANGUAGE) option was added in CMake 3.11.
- Additionally, this syncs the documentation style for the other modules
that check headers as they are commonly browsed together.
- Fixed typo in CheckIncludeFile module example.
- This deprecates the OPENCL_VERSION_STRING result variable.
- Documentation adjusted.
- Support for OpenCL 3.0 was added in CMake 3.24.
- Added CL_TARGET_OPENCL_VERSION compile definition to test so that
program compiles without warnings.
- Additionally, on Apple systems compiler can't find <Headers/cl.h>
unless direct path would be passed as a header. Instead, <OpenCL/cl.h>
is used for version check conditionally.
Issue: #27088
This variable in current CMake versions doesn't seem to be needed in any
case. Either if the UsewxWidgets is created in the project's own
CMAKE_MODULE_PATH location, or if FindwxWidgets is "forked" into project
own modules, include(UsewxWidgets) always includes the wanted file.
This deprecates the QT_VERSION_STRING result variable.
The QT_VERSION_STRING was probably meant to be set also by FindQt4
module (for the deprecated FindQt) but at the time of writing isn't
implemented therefore replaced in the test.
Issue: #27088
As minimum CMake version required to build CMake itself is set to 3.13,
including this module from the source directory isn't needed anymore,
as it was added in CMake 3.8. This also enables changing module code
as done in other modules - not dependent on CMake build system itself.
- Synced module documentation with other similar find modules.
- Moved "compatibility" section into a refactored note at the top, when
the config mode was implemented in this module.
- Added examples section.
Since most of the find modules use the `<PackageName>_FOUND` result
variables, this now also syncs it for the FindPkgConfig module. The
`PkgConfig_FOUND` result variable is available since CMake 3.3 and
contains the same value. There is also `PKGCONFIG_FOUND` result variable
automatically set with the same value but for simplicity isn't
documented. The uppercased `<PACKAGENAME>_FOUND` result variables set by
find modules are also considered legacy variables.