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:
@@ -2537,8 +2537,13 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
|
|||||||
cmStrCat(linked_target_dir, '/', arg_lang, "Modules.json");
|
cmStrCat(linked_target_dir, '/', arg_lang, "Modules.json");
|
||||||
Json::Value ltm;
|
Json::Value ltm;
|
||||||
cmsys::ifstream ltmf(ltmn.c_str(), std::ios::in | std::ios::binary);
|
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;
|
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 ",
|
cmSystemTools::Error(cmStrCat("-E cmake_ninja_dyndep failed to parse ",
|
||||||
linked_target_dir,
|
linked_target_dir,
|
||||||
reader.getFormattedErrorMessages()));
|
reader.getFormattedErrorMessages()));
|
||||||
|
Reference in New Issue
Block a user