If using both FindLua and FindLua51 modules, the FindLua51 and Lua 5.2
or newer is found, FindLua51 module can set the Lua_VERSION variable to
empty value. Instead, the Lua51_VERSION can be used to bypass this
issue.
Issue: #27088
* This module previously didn't define the OpenMP_VERSION result
variable.
* Added CMake versions to variables when they were provided by the
module.
* Synced docs.
* FindKDE4: Added note about KDE4_FOUND result variable (it is set by
the upstream FindKDE4Internal module, and now also synced in the docs
and code for consistency).
For the sake of completeness with other find modules, also the following
deprecated find modules are synced as they already provided these
variables:
* FindDart: Documented the Dart_FOUND result variable.
* FindUnixCommands: Updated documentation (documented UnixCommands_FOUND
result variable, and listed cache variables used by this module).
Issue: #27242
- Moved all documentation to the top header comment to make it easier to
manage and adjust.
- Synced module documentation with other similar find modules.
- Restructured the module docs and titles.
- Added missing "versionadded" RST directives.
- Used "command" instead of "function".
- Added examples section.
- Removed redundant variable references.
Fix two bugs from commit e301cbffcc (ExternalProject: Set environment
variables, 2025-04-09):
* Do not flatten lists in command arguments when adding env mods.
* Remove empty `COMMAND`s without injecting corresponding env mods.
Fixes: #27125Fixes: #27126
Co-authored-by: Brad King <brad.king@kitware.com>
- This module previously didn't define the CxxTest_FOUND result variable
consistently if neither Python nor Perl were found.
- Documentation is also updated a bit further to note that Perl-based
test generator script has been removed in CxxTest version 4.0.
- Internal comments synced.
- Python_FOUND result variable used.
Issue: #27242
Visual Studio defines this automatically for `.dll` targets.
For consistency, define it when compiling for the MSVC ABI
with other generators. Add policy CMP0203 for compatibility.
Fixes: #27253
For single config generators, don't write a file at configure time
as it will be rewritten at generation time.
For multi config generators, use `$<CONFIG>` in the output instead
of looping over `CMAKE_CONFIGURATION_TYPES`.
Changes:
- Added new `RESULT_VARIABLE` keyword to enable customizing the name of
the internal cache variable, which contains the boolean result of the
check.
- The macro check_type_size() changed to function for easier arguments
handling.
- Documentation synced and extended to better understand the
check_type_size() command. Some typos fixed in the initial example.
- CheckTypeSize tests adjusted so also C++ is tested.
- Error messages slightly adjusted when checking the LANGUAGE argument.
Closes: #27202
This marks all `<PACKAGENAME>_FOUND` result variables as deprecated
where possible (for `<PackageName>` find modules) to make it clearer
which variable to use.
In CMake 3.3, the FindPackageHandleStandardArgs module was refactored to
set both `<PackageName>_FOUND` and uppercase `<PACKAGENAME>_FOUND`
result variables to the same values. Before that, the FOUND_VAR argument
could be used to set the result variable.
* FindMatlab: Uppercased MATLAB_FOUND is not mentioned as it was never
documented.
* Documentation for FindPythonInterp and FindPythonLibs modules synced
accordingly to their deprecation (3.12 instead of 4.2).
* OPENGL_FOUND: deprecation version synced with other find modules.
* DevIL_FOUND was introduced in CMake 3.8. The uppercased variant not
mentioned as it was previously never documented.
Fixes: #27242
f757721ecd CUDAToolkit: Refactor find failure error messages to a single macro
0ae76a89b1 CUDAToolkit: Refactor guessing toolkit logic into a function
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11207
These flags are only needed for builds involving shared libraries,
and can cause undesirable behavior when they are not needed.
They also have variants with values like `=2`. For now, just require
projects to add the flags when needed so they have full control.
In the future we may be able to add an abstraction to control them,
and automatically enable them when linking to shared libraries
or creating them.
Fixes: #27232
Issue: #27240
Extend commit 644ad91e6a (Emscripten: Restore support for emsdk
toolchain file and platform module, 2025-09-17) to support using a
third-party `CMAKE_TOOLCHAIN_FILE` that includes the emsdk-provided
toolchain file.
Issue: #27232