cmake.eclass remains at 3.28 in ::gentoo for a while, so having to
define the BDEPEND as well here.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
ECM (extra-cmake-modules) mostly concerns KDE but also several third party
packages. ECM has been warning about that since ECM 5.100, which was released
in Nov 2022.
- New variable CMAKE_ECM_MODE (values: auto,true,false)
If "auto", tries to detect use of find_package(ECM) in CMakeLists.txt
Also use instead of _ECM_ECLASS check in cmake_src_configure to adjust
gentoo_common_config.cmake for ECM settings independently of ecm.eclass
- _cmake_minreqver-check():
Results are stored in new _CMAKE_MINREQVER_CMAKE316 array.
- _cmake_minreqver-info():
Only the latest relevant warning is shown as eqawarn - and only prefixed
as "QA Notice" if a preceding QA Notice didn't strike already.
This means for a build system using ECM with detected <3.5 versions:
- CMake < 3.5: QA notice with file listing
- CMake < 3.10: *No* warning but file listing if array is non-empty
- CMake < 3.16: Warning with file listing
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
- _cmake_minreqver-check():
New _CMAKE_MINREQVER_CMAKE310 array contains a list of <file>:<version>
tuples with cmake_minimum_required version below 3.10, on top of those
that weren't already saved in _CMAKE_MINREQVER_CMAKE305.
- _cmake_minreqver-info():
Future CMake <3.10 compat removal is prefixed as "QA Notice" *only* if the
preceding CMake <3.5 QA Notice didn't strike already. This is done to avoid
spamming the bug tracker twice per package about outdated minimum versions.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
If QA checks are skipped, then it is counterproductive to hide
resulting errors by passing -DCMAKE_POLICY_VERSION_MINIMUM=3.5.
Better warn about the CMake 4 workaround possibly only getting the build
system to another error.
Bug: https://bugs.gentoo.org/951350
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Instead of only eqawarning that there is *some* file with a too low
cmake_minimum_required version, print a list of all the CMakeLists.txt
found to be unsupported, and the detected version next to it.
- _CMAKE_MINREQVER_CMAKE305 is either empty (package "passed") or
contains a list of <file>:<version> tuples to print as eqawarn message
This replaces _CMAKE_MINREQVER_UNSUPPORTED
- Rename _cmake4_callout() -> _cmake_minreqver-info()
Provide upstream link with list of CMake policy changes per release
- Prepare for upcoming additional cmake_minimum_version checks
- Rename _cmake_minreqver-lt() -> _cmake_minreqver-check()
Function now optionally takes one or two args:
<file>: runs all version checks over <file>
<file> <version>: only check <version> against <file>
Closes: https://bugs.gentoo.org/951350
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Pass -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF to avoid automagically
enabling LTO if the compiler supports it.
Note that unlike what we do w/ meson.eclass, we can't do some magic
with `tc-is-lto` here because CMake doesn't allow refining the parallelism
used. But that's fine.
This change still allows using LTO via *FLAGS which is what we tell
people to do.
Closes: https://bugs.gentoo.org/927157
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This we added originally because several tool got confused when there
is no root= at all. This has since been resolved and I have been
running without any root= set for several months without problems.
Setting root=/dev/gpt-auto-generator actually breaks automatic
decryption of LUKS volumes, so lets get rid of it. Functionally
nothing else changes since the gpt-auto-generator will also run if
root is not set or empty.
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>