diff options
author | Tyler <tylerbrawl@gmail.com> | 2023-05-13 00:58:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-23 19:01:52 (GMT) |
commit | 28ece63fee1d5b4cd37f79ea5c7f078509f44bcd (patch) | |
tree | b2eb44da3871af6a61ece1da96c9369bade50b65 /Source/cmDyndepCollation.cxx | |
parent | f2a699261b9d3d494bc791caad2d8f1fb21d6b4b (diff) | |
download | CMake-28ece63fee1d5b4cd37f79ea5c7f078509f44bcd.zip CMake-28ece63fee1d5b4cd37f79ea5c7f078509f44bcd.tar.gz CMake-28ece63fee1d5b4cd37f79ea5c7f078509f44bcd.tar.bz2 |
cxxmodules: Fix exported path to installed module sources in subdirs
When generating the `IMPORTED_CXX_MODULES_[CONFIG]` target property,
there was a missing path separator after a non-empty relative directory
part of the path to a module source file.
Co-authored-by: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Source/cmDyndepCollation.cxx')
-rw-r--r-- | Source/cmDyndepCollation.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmDyndepCollation.cxx b/Source/cmDyndepCollation.cxx index f45d81b..80e1357 100644 --- a/Source/cmDyndepCollation.cxx +++ b/Source/cmDyndepCollation.cxx @@ -358,6 +358,10 @@ cmDyndepCollation::ParseExportInfo(Json::Value const& tdi) fsi.Name = tdi_cxx_module_info["name"].asString(); fsi.RelativeDirectory = tdi_cxx_module_info["relative-directory"].asString(); + if (!fsi.RelativeDirectory.empty() && + fsi.RelativeDirectory.back() != '/') { + fsi.RelativeDirectory = cmStrCat(fsi.RelativeDirectory, '/'); + } fsi.SourcePath = tdi_cxx_module_info["source"].asString(); fsi.Type = tdi_cxx_module_info["type"].asString(); fsi.Visibility = cmFileSetVisibilityFromName( |