summaryrefslogtreecommitdiffstats
path: root/Source/cmCxxModuleUsageEffects.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-01-30 15:24:41 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-08-17 18:42:53 (GMT)
commitcb356b540c0ed500383c7681ec7594ed58d517a5 (patch)
tree16a91f3ee57db921bcd52e0f5bf8b7da95e463aa /Source/cmCxxModuleUsageEffects.cxx
parentc1defd9dd3e9cacd4a40fcbc9f52e36493dd1d0b (diff)
downloadCMake-cb356b540c0ed500383c7681ec7594ed58d517a5.zip
CMake-cb356b540c0ed500383c7681ec7594ed58d517a5.tar.gz
CMake-cb356b540c0ed500383c7681ec7594ed58d517a5.tar.bz2
cmCxxModuleUsageEffects: add a class to capture module usage effects
When importing a C++ module, there may be requirements imposed by the importer so that the compiler can reliably read the BMI. For example, the standard used in the importer may need to also apply to the imported BMI. Right now, there are no tracked requirements. As we learn more, this class can start tracking more information. See: https://wg21.link/p2581r2
Diffstat (limited to 'Source/cmCxxModuleUsageEffects.cxx')
-rw-r--r--Source/cmCxxModuleUsageEffects.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmCxxModuleUsageEffects.cxx b/Source/cmCxxModuleUsageEffects.cxx
new file mode 100644
index 0000000..eea5245
--- /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;
+}