diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 12af5d03f4..67d3d8d7a7 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -170,6 +170,8 @@ add_library( cmCustomCommandTypes.h cmCxxModuleMapper.cxx cmCxxModuleMapper.h + cmCxxModuleUsageEffects.cxx + cmCxxModuleUsageEffects.h cmDefinitions.cxx cmDefinitions.h cmDependencyProvider.h diff --git a/Source/cmCxxModuleUsageEffects.cxx b/Source/cmCxxModuleUsageEffects.cxx new file mode 100644 index 0000000000..eea52455ac --- /dev/null +++ b/Source/cmCxxModuleUsageEffects.cxx @@ -0,0 +1,21 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmCxxModuleUsageEffects.h" + +cmCxxModuleUsageEffects::cmCxxModuleUsageEffects( + cmGeneratorTarget const* /*gt*/) + : Hash("0000000000000000000000000000000000000000") +{ + // TODO: collect information from the generator target as to what might + // affect module consumption. +} + +void cmCxxModuleUsageEffects::ApplyToTarget(cmTarget* /*tgt*/) +{ + // TODO: apply the information collected in the constructor +} + +std::string const& cmCxxModuleUsageEffects::GetHash() const +{ + return this->Hash; +} diff --git a/Source/cmCxxModuleUsageEffects.h b/Source/cmCxxModuleUsageEffects.h new file mode 100644 index 0000000000..a63919c01e --- /dev/null +++ b/Source/cmCxxModuleUsageEffects.h @@ -0,0 +1,22 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#pragma once + +#include "cmConfigure.h" // IWYU pragma: keep + +#include + +class cmGeneratorTarget; +class cmTarget; + +class cmCxxModuleUsageEffects +{ +public: + cmCxxModuleUsageEffects(cmGeneratorTarget const* gt); + + void ApplyToTarget(cmTarget* tgt); + std::string const& GetHash() const; + +private: + std::string Hash; +}; diff --git a/bootstrap b/bootstrap index 2c54dbf8b8..68885b39d3 100755 --- a/bootstrap +++ b/bootstrap @@ -333,6 +333,7 @@ CMAKE_CXX_SOURCES="\ cmCustomCommandGenerator \ cmCustomCommandLines \ cmCxxModuleMapper \ + cmCxxModuleUsageEffects \ cmDefinePropertyCommand \ cmDefinitions \ cmDocumentationFormatter \