diff options
author | Brad King <brad.king@kitware.com> | 2021-06-14 20:14:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-15 13:09:28 (GMT) |
commit | 10b2e5346984d95c15d0cc38ddf5c5fad11a6a65 (patch) | |
tree | bdb2a289e10a45a4fa394b6c222a2ede2572584e /Source/cmScanDepFormat.cxx | |
parent | 2b9890e9b940db59b4d1633fa5b8067f615ed0f4 (diff) | |
download | CMake-10b2e5346984d95c15d0cc38ddf5c5fad11a6a65.zip CMake-10b2e5346984d95c15d0cc38ddf5c5fad11a6a65.tar.gz CMake-10b2e5346984d95c15d0cc38ddf5c5fad11a6a65.tar.bz2 |
cmScanDepFormat: Remove Fortran-specific compiled-module-path logic
Read and write the `compiled-module-path` field only when explicitly
known. Move the assumption that the `compiled-module-path` can be
derived from the logical module name from the scandep parser to the
`cmake_ninja_dyndep` helper.
Diffstat (limited to 'Source/cmScanDepFormat.cxx')
-rw-r--r-- | Source/cmScanDepFormat.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/cmScanDepFormat.cxx b/Source/cmScanDepFormat.cxx index ae0e649..6fcbce5 100644 --- a/Source/cmScanDepFormat.cxx +++ b/Source/cmScanDepFormat.cxx @@ -162,9 +162,6 @@ bool cmScanDepFormat_P1689_Parse(std::string const& arg_pp, provide["compiled-module-path"]; PARSE_FILENAME(compiled_module_path, provide_info.CompiledModulePath); - } else { - provide_info.CompiledModulePath = - cmStrCat(provide_info.LogicalName, ".mod"); } if (provide.isMember("unique-on-source-path")) { @@ -299,9 +296,7 @@ bool cmScanDepFormat_P1689_Write(std::string const& path, Json::Value provide_obj(Json::objectValue); auto const encoded = EncodeFilename(provide.LogicalName); provide_obj["logical-name"] = encoded; - if (provide.CompiledModulePath.empty()) { - provide_obj["compiled-module-path"] = encoded; - } else { + if (!provide.CompiledModulePath.empty()) { provide_obj["compiled-module-path"] = EncodeFilename(provide.CompiledModulePath); } @@ -321,9 +316,7 @@ bool cmScanDepFormat_P1689_Write(std::string const& path, Json::Value require_obj(Json::objectValue); auto const encoded = EncodeFilename(require.LogicalName); require_obj["logical-name"] = encoded; - if (require.CompiledModulePath.empty()) { - require_obj["compiled-module-path"] = encoded; - } else { + if (!require.CompiledModulePath.empty()) { require_obj["compiled-module-path"] = EncodeFilename(require.CompiledModulePath); } |