Add the following variables:
* Python_EXECUTABLE_DEBUG
* Python_INTERPRETER
* Python_DEBUG_POSTFIX
and target Python::InterpreterDebug.
python_add_library() command Manage DEBUG_POSTFIX target property based
on the value of Python_DEBUG_POSTFIX variable.
Fixes: #25874
The C++ sources we use to test the compiler do not use modules.
Avoid requiring a compiler that can scan just to enable the language,
even when CMP0155 is NEW. The project may explicitly turn off
`CMAKE_CXX_SCAN_FOR_MODULES` before adding any targets.
Fixes: #25956
d7e2fede03 CPack: Add tests for component containing problematic characters
a1af593291 CPack: Support arbitrary component name when packaging
9e67ad47a9 cmLocalGenerator: Support arbitrary component name when installing
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9436
Upstream Boost 1.70 and above provide a proper `BoostConfig.cmake`
package configuration file. Packages for all major distros now
provide it in at least one LTS release. Add a policy to pretend
that the `FindBoost` module does not exist so that projects calling
`find_package(Boost)` use the upstream package directly.
Closes: #19402
CPack no longer blindly tries to create temporary packaging
(sub)directories that contain the verbatim name of a component, which
might contain characters that are not supported on the platform /
filesystem.
Instead, if the component's name contains a (possibly) problematic
character its MD5 hash will be used for that temporary packaging
(sub)directory.
Likewise, if the component's name resembles a reserved device name (e.g.
"COM1" on Windows) then the temporary packaging (sub)directory will get
this name prefixed with an underscore.
Similar, if it ends in a dot (on Windows) then the temporary packaging
(sub)directory will get this name suffixed with an underscore.
Fixes: #23612
208b3f63ac CPackDeb.cmake: Fix debug message
48fc711064 cmLocalGenerator: Fix comments in generated cmake_install.cmake file
af1d166387 cmCPackGenerator: Fix debug message in function `PrepareGroupingKind`
a522abe5c0 cmCPackGenerator: Fix comment in function `InstallCMakeProject`
87cfe9dd91 cmCPackGenerator: Slightly simplify function `InstallProject`
1350ed96ff cmCPackGenerator: Clean up and simplify function `DoPackage`
d26eed4c75 cmCPackGenerator: Clean up and simplify function `PrepareNames`
12123b5b6b cmCPackGenerator: Refactor copying of package files into own function
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9457
Add a variable to indicate the latest standard known to be supported for
each language:
* `CMAKE_C_STANDARD_LATEST`
* `CMAKE_CXX_STANDARD_LATEST`
* `CMAKE_CUDA_STANDARD_LATEST`
* `CMAKE_HIP_STANDARD_LATEST`
* `CMAKE_OBJC_STANDARD_LATEST`
* `CMAKE_OBJCXX_STANDARD_LATEST`
These variables, more generally referred to as
`CMAKE_<LANG>_STANDARD_LATEST`, are assigned an integer value which
represents the minimum between the latest version of the associated
language standard supported by the current compiler and the latest
version supported by CMake.
Add documentation for these variables in a new page called
`CMAKE_<LANG>_STANDARD_LATEST` was added under the "Variables for
Languages" section of the `cmake-variables(7)` page.
Update each compiler-specific CMake script under
`${CMAKE_ROOT}\Modules\Compiler` to manually define the relevant
`CMAKE_<LANG>_STANDARD_LATEST` variable as necessary. This will
require updating and maintaining as newer compiler versions become
recognized by CMake.
Closes: #25717
Set the requirement for Objective C 23 support for AppleClang to
`11.0.3` in `${CMAKE_ROOT}\Modules\Compiler\AppleClang-OBJC.cmake`.
This is consistent with the requirement for C 23 support as
indicated in `${CMAKE_ROOT}\Modules\Compiler\AppleClang-C.cmake`.
Unset irrelevant compile option variables in the following scripts:
* `${CMAKE_ROOT}\Modules\Compiler\ARMClang-C.cmake`
* `${CMAKE_ROOT}\Modules\Compiler\TIClang-C.cmake`
* `${CMAKE_ROOT}\Modules\Compiler\TIClang-CXX.cmake`
These scripts all include either
`${CMAKE_ROOT}\Modules\Compiler\Clang-C.cmake` or
`${CMAKE_ROOT}\Modules\Compiler\Clang-CXX.cmake`, and those scripts
will set various compile option variables based on what the
standard version of Clang supports. However, these do not
necessarily apply to ARMClang and TIClang. This commit thus
explicitly unsets all of the compile option variables which are not
manually defined for these compilers.
Fat LTO objects contain both traditional object code and the LTO bitcode
IR, but the GNU compiler does not support them on Apple platforms.
A compile error is raised when `-f[no-]fat-lto-objects` flags are used,
so avoid them.
This also implies that static Fortran libraries cannot be built with IPO.
Fixes: #25931
If the project builds with `-Wmissing-prototypes` to catch unnecessarily
exported symbols, `CheckForPthreads.c` will fail to build. Fix this by
marking `start_routine` as static.
Fixes: #25886
41f4e1c457 CMakePackageConfigHelpers: Document PACKAGE_PREFIX_DIR for public use
c5231ba29e find_package: Save/restore PACKAGE_PREFIX_DIR
8ac7958e3a generate_apple_*_selection_file: Save/restore PACKAGE_PREFIX_DIR
bf88879f1f generate_apple_architecture_selection_file: Avoid early returns
a4ac2c92f4 Help: Add missing section heading for apple architecture selection
b7fcc44be9 Help: Fix CMakePackageConfigHelpers typos, grammar and formatting
f1cacaa830 Tests/RunCMake/CMakePackage: Define variable closer to where it is used
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9430
8ac7958e3a generate_apple_*_selection_file: Save/restore PACKAGE_PREFIX_DIR
bf88879f1f generate_apple_architecture_selection_file: Avoid early returns
a4ac2c92f4 Help: Add missing section heading for apple architecture selection
b7fcc44be9 Help: Fix CMakePackageConfigHelpers typos, grammar and formatting
f1cacaa830 Tests/RunCMake/CMakePackage: Define variable closer to where it is used
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9430
fb0990ef04 Tests/CompileFeatures: Cover cuda_std_## meta-features
011f3d1dd3 Tests/CompileFeatures: Fix c_std_23 case with Clang < 14
1f40604421 Tests/CompileFeatures: Cover CUDA default standard level
138436609f CUDA: Fix detection of default C++ standard level with MSVC host compiler
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9444
Unquote pkg-config output if they are printed within quotes. pkgconf
<1.5.1 and classic pkg-config <0.29.1 prints quoted variables without
unquoting them, this breaks returning variables with multiple values
as a list behavior of CMake.
Add a new test case for pkg_get_variable with multiple values to test
list behavior and backslash escaped spaces within variable values.
Fixes: #25904
This variable has long been provided by `configure_package_config_file`
in the `@PACKAGE_INIT@` part of the package configuration file it
generates. Although not publicly documented, projects have come to
use it. Now that we preserve the value across nested `find_package`
calls, it has a stable meaning.
Issue: #25827
This refactoring makes the generated file follow the same structure as
generate_apple_platform_selection_file(). It uses a single if-elseif-else-endif
block rather than a sequence of if-endif blocks. This avoids any early
return() calls, allowing cleanup code to be added at the end later.
Use named constants. Regularize comparison patterns. Follow the
approach from commit b9d4db7098 (CompilerId: Clarify C and C++ standard
level detection, 2024-04-02).