mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-09 17:18:18 +00:00
Introduced in commit 5c00749c5d (cmCxxModuleUsageEffects: Collect and
apply BMI compatibility requirements, 2025-12-29, v4.3.0-rc1~43^2), this
has exploded the set of BMIs generated in existing builds. Revert this
partial implementation and comment out its corresponding test for the
4.3 release. Work towards a full implementation will proceed in
post-4.3 development.
Issue: #27597
33 lines
940 B
C++
33 lines
940 B
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file LICENSE.rst or https://cmake.org/licensing for details. */
|
|
#include "cmCxxModuleUsageEffects.h"
|
|
|
|
#include <cm/optional>
|
|
|
|
#include "cmCryptoHash.h"
|
|
#include "cmGeneratorTarget.h"
|
|
#include "cmTarget.h"
|
|
|
|
cmCxxModuleUsageEffects::cmCxxModuleUsageEffects(cmGeneratorTarget const* gt)
|
|
{
|
|
cmCryptoHash hasher(cmCryptoHash::AlgoSHA3_512);
|
|
this->Hash = hasher.HashString(gt->GetName());
|
|
|
|
// Collect compile features from the consuming target.
|
|
for (auto const& feature : gt->Target->GetCompileFeaturesEntries()) {
|
|
this->CompileFeatures.emplace_back(feature);
|
|
}
|
|
}
|
|
|
|
void cmCxxModuleUsageEffects::ApplyToTarget(cmTarget* tgt)
|
|
{
|
|
for (auto const& feature : this->CompileFeatures) {
|
|
tgt->AppendProperty("COMPILE_FEATURES", feature.Value, feature.Backtrace);
|
|
}
|
|
}
|
|
|
|
std::string const& cmCxxModuleUsageEffects::GetHash() const
|
|
{
|
|
return this->Hash;
|
|
}
|