diff options
author | Brad King <brad.king@kitware.com> | 2021-05-11 12:24:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-13 12:33:00 (GMT) |
commit | bd12b97d05314500892426e827dc0ad57c4f4fdc (patch) | |
tree | 3f15f513cecd934c979e0d66169aa58c3874eab4 /Source/cmScanDepFormat.cxx | |
parent | 96011ab06d8839010c181d501c58c8e914f3ba91 (diff) | |
download | CMake-bd12b97d05314500892426e827dc0ad57c4f4fdc.zip CMake-bd12b97d05314500892426e827dc0ad57c4f4fdc.tar.gz CMake-bd12b97d05314500892426e827dc0ad57c4f4fdc.tar.bz2 |
cmScanDepFormat: Drop unused "outputs", "inputs", and "depends" fields
These fields are specified by our `P1689r3` paper, but are not actually
needed. The dependencies of the scanning results themselves can be
captured via normal depfile logic. Avoid saving this possibly-large
information in the scanning results. It is not needed by later steps.
Diffstat (limited to 'Source/cmScanDepFormat.cxx')
-rw-r--r-- | Source/cmScanDepFormat.cxx | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/Source/cmScanDepFormat.cxx b/Source/cmScanDepFormat.cxx index f988fe4..e66f96d 100644 --- a/Source/cmScanDepFormat.cxx +++ b/Source/cmScanDepFormat.cxx @@ -74,7 +74,8 @@ static Json::Value EncodeFilename(std::string const& path) } \ } while (0) -bool cmScanDepFormat_P1689_Parse(std::string const& arg_pp, cmSourceInfo* info) +bool cmScanDepFormat_P1689_Parse(std::string const& arg_pp, + cmScanDepInfo* info) { Json::Value ppio; Json::Value const& ppi = ppio; @@ -116,15 +117,6 @@ bool cmScanDepFormat_P1689_Parse(std::string const& arg_pp, cmSourceInfo* info) return false; } - Json::Value const& depends = rule["depends"]; - if (depends.isArray()) { - std::string depend_filename; - for (auto const& depend : depends) { - PARSE_FILENAME(depend, depend_filename); - info->Includes.push_back(depend_filename); - } - } - if (rule.isMember("future-compile")) { Json::Value const& future_compile = rule["future-compile"]; @@ -194,8 +186,7 @@ bool cmScanDepFormat_P1689_Parse(std::string const& arg_pp, cmSourceInfo* info) } bool cmScanDepFormat_P1689_Write(std::string const& path, - std::string const& input, - cmSourceInfo const& info) + cmScanDepInfo const& info) { Json::Value ddi(Json::objectValue); ddi["version"] = 0; @@ -204,16 +195,6 @@ bool cmScanDepFormat_P1689_Write(std::string const& path, Json::Value& rules = ddi["rules"] = Json::arrayValue; Json::Value rule(Json::objectValue); - Json::Value& inputs = rule["inputs"] = Json::arrayValue; - inputs.append(EncodeFilename(input)); - - Json::Value& rule_outputs = rule["outputs"] = Json::arrayValue; - rule_outputs.append(EncodeFilename(path)); - - Json::Value& depends = rule["depends"] = Json::arrayValue; - for (auto const& include : info.Includes) { - depends.append(EncodeFilename(include)); - } Json::Value& future_compile = rule["future-compile"] = Json::objectValue; |