summaryrefslogtreecommitdiffstats
path: root/Source/cmCxxModuleMapper.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-06-02 21:18:37 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-06-16 14:28:34 (GMT)
commit02d0f0e752ec9d9ab099c7005a9eedd7bf4b94a1 (patch)
treeeaae9f6fc6da7f3ec4c9f6d29577383ef7685559 /Source/cmCxxModuleMapper.cxx
parenta046a45aada109861741f45bc6b097e15084ddd4 (diff)
downloadCMake-02d0f0e752ec9d9ab099c7005a9eedd7bf4b94a1.zip
CMake-02d0f0e752ec9d9ab099c7005a9eedd7bf4b94a1.tar.gz
CMake-02d0f0e752ec9d9ab099c7005a9eedd7bf4b94a1.tar.bz2
cmCxxModuleMapper: add source to handle module mapper contents
This will allow all generators to share an implementation for actually writing out the module map formats.
Diffstat (limited to 'Source/cmCxxModuleMapper.cxx')
-rw-r--r--Source/cmCxxModuleMapper.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/cmCxxModuleMapper.cxx b/Source/cmCxxModuleMapper.cxx
new file mode 100644
index 0000000..ddb95e3
--- /dev/null
+++ b/Source/cmCxxModuleMapper.cxx
@@ -0,0 +1,30 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#include "cmCxxModuleMapper.h"
+
+#include <cassert>
+
+#include "cmScanDepFormat.h"
+
+cm::optional<std::string> CxxModuleLocations::BmiGeneratorPathForModule(
+ std::string const& logical_name) const
+{
+ if (auto l = this->BmiLocationForModule(logical_name)) {
+ return this->PathForGenerator(*l);
+ }
+ return {};
+}
+
+cm::static_string_view CxxModuleMapExtension(
+ cm::optional<CxxModuleMapFormat> format)
+{
+ return ".bmi"_s;
+}
+
+std::string CxxModuleMapContent(CxxModuleMapFormat format,
+ CxxModuleLocations const& loc,
+ cmScanDepInfo const& obj)
+{
+ assert(false);
+ return {};
+}