diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-07-18 16:05:58 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-07-26 16:25:42 (GMT) |
commit | d7f5064ff79380d03e11c7fed01b6e225ea78337 (patch) | |
tree | 4e4ed40a60a7dbd340052042bd231c8c970b2a6b /Source/cmScanDepFormat.cxx | |
parent | b5a6648c4b4973c4747aa6a325938ca1e7d977d0 (diff) | |
download | CMake-d7f5064ff79380d03e11c7fed01b6e225ea78337.zip CMake-d7f5064ff79380d03e11c7fed01b6e225ea78337.tar.gz CMake-d7f5064ff79380d03e11c7fed01b6e225ea78337.tar.bz2 |
cmScanDepFormat: support P1689R5
This adds the `is-interface` key on provides fields.
Diffstat (limited to 'Source/cmScanDepFormat.cxx')
-rw-r--r-- | Source/cmScanDepFormat.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmScanDepFormat.cxx b/Source/cmScanDepFormat.cxx index 82a374a..81ef3da 100644 --- a/Source/cmScanDepFormat.cxx +++ b/Source/cmScanDepFormat.cxx @@ -188,6 +188,19 @@ bool cmScanDepFormat_P1689_Parse(std::string const& arg_pp, return false; } + if (provide.isMember("is-interface")) { + Json::Value const& is_interface = provide["is-interface"]; + if (!is_interface.isBool()) { + cmSystemTools::Error( + cmStrCat("-E cmake_ninja_dyndep failed to parse ", arg_pp, + ": is-interface is not a boolean")); + return false; + } + provide_info.IsInterface = is_interface.asBool(); + } else { + provide_info.IsInterface = true; + } + info->Provides.push_back(provide_info); } } @@ -308,6 +321,8 @@ bool cmScanDepFormat_P1689_Write(std::string const& path, provide_obj["source-path"] = EncodeFilename(provide.SourcePath); } + provide_obj["is-interface"] = provide.IsInterface; + provides.append(provide_obj); } |