diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 12:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 12:59:20 (GMT) |
commit | 7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf (patch) | |
tree | b17167b762c3257baf362b515fbf1a8fece7b356 /Source/cmake.cxx | |
parent | 6bb20b51c9af40372b6a818826613e965cde5f19 (diff) | |
download | CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.zip CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.gz CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.bz2 |
cmMakefile: add GetDefExpandList() that splits value into std::vector
Combines cmMakefile:GetDefinition() and cmExpandList()
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 65d5f10..162e807 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2286,9 +2286,7 @@ int cmake::CheckBuildSystem() // If any byproduct of makefile generation is missing we must re-run. std::vector<std::string> products; - if (const char* productStr = mf.GetDefinition("CMAKE_MAKEFILE_PRODUCTS")) { - cmExpandList(productStr, products); - } + mf.GetDefExpandList("CMAKE_MAKEFILE_PRODUCTS", products); for (std::string const& p : products) { if (!(cmSystemTools::FileExists(p) || cmSystemTools::FileIsSymlink(p))) { if (verbose) { @@ -2303,11 +2301,8 @@ int cmake::CheckBuildSystem() // Get the set of dependencies and outputs. std::vector<std::string> depends; std::vector<std::string> outputs; - const char* dependsStr = mf.GetDefinition("CMAKE_MAKEFILE_DEPENDS"); - const char* outputsStr = mf.GetDefinition("CMAKE_MAKEFILE_OUTPUTS"); - if (dependsStr && outputsStr) { - cmExpandList(dependsStr, depends); - cmExpandList(outputsStr, outputs); + if (mf.GetDefExpandList("CMAKE_MAKEFILE_DEPENDS", depends)) { + mf.GetDefExpandList("CMAKE_MAKEFILE_OUTPUTS", outputs); } if (depends.empty() || outputs.empty()) { // Not enough information was provided to do the test. Just rerun. |