1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-21 14:40:48 +08:00

cmGlobalNinjaGenerator: require that dependency info files work

Now that only targets expected to have information are listed, all
`<LANG>Modules.json` files should exist.
This commit is contained in:
Ben Boeckel
2023-02-01 09:11:30 -05:00
parent 837f7c113a
commit eed295fd8a

View File

@@ -2537,8 +2537,13 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
cmStrCat(linked_target_dir, '/', arg_lang, "Modules.json");
Json::Value ltm;
cmsys::ifstream ltmf(ltmn.c_str(), std::ios::in | std::ios::binary);
if (!ltmf) {
cmSystemTools::Error(cmStrCat("-E cmake_ninja_dyndep failed to open ",
ltmn, " for module information"));
return false;
}
Json::Reader reader;
if (ltmf && !reader.parse(ltmf, ltm, false)) {
if (!reader.parse(ltmf, ltm, false)) {
cmSystemTools::Error(cmStrCat("-E cmake_ninja_dyndep failed to parse ",
linked_target_dir,
reader.getFormattedErrorMessages()));