diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-08-01 13:59:15 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-08-02 14:53:38 (GMT) |
commit | a84c186a7d1116226827bb6722f628db98c3a278 (patch) | |
tree | 90517f21528f2d31edd0ba0de69f62bab66bcbe2 /Source/cmScanDepFormat.cxx | |
parent | d7f5064ff79380d03e11c7fed01b6e225ea78337 (diff) | |
download | CMake-a84c186a7d1116226827bb6722f628db98c3a278.zip CMake-a84c186a7d1116226827bb6722f628db98c3a278.tar.gz CMake-a84c186a7d1116226827bb6722f628db98c3a278.tar.bz2 |
cmScanDepFormat: support the MSVC 17.3 toolchain temporarily
At least until 17.4 is out.
Diffstat (limited to 'Source/cmScanDepFormat.cxx')
-rw-r--r-- | Source/cmScanDepFormat.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmScanDepFormat.cxx b/Source/cmScanDepFormat.cxx index 81ef3da..ec53af5 100644 --- a/Source/cmScanDepFormat.cxx +++ b/Source/cmScanDepFormat.cxx @@ -5,6 +5,7 @@ #include <cctype> #include <cstdio> +#include <iostream> #include <utility> #include <cm/optional> @@ -280,6 +281,27 @@ bool cmScanDepFormat_P1689_Parse(std::string const& arg_pp, info->Requires.push_back(require_info); } } + + // MSVC 17.3 toolchain bug. Remove when 17.4 is available. + if (rule.isMember("is-interface")) { + std::cerr + << "warning: acknowledging an VS 17.3 toolchain bug; accepting " + "until a new release which fixes it is available" + << std::endl; + + Json::Value const& is_interface_json = rule["is-interface"]; + if (!is_interface_json.isBool()) { + cmSystemTools::Error( + cmStrCat("-E cmake_ninja_dyndep failed to parse ", arg_pp, + ": is-interface is not a boolean")); + return false; + } + bool is_interface = is_interface_json.asBool(); + + for (auto& provide : info->Provides) { + provide.IsInterface = is_interface; + } + } } } |