diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 08:00:00 -0400 |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 08:59:20 -0400 |
commit | 7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf (patch) | |
tree | b17167b762c3257baf362b515fbf1a8fece7b356 /Source/cmDependsFortran.cxx | |
parent | 6bb20b51c9af40372b6a818826613e965cde5f19 (diff) | |
download | cmake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.gz |
cmMakefile: add GetDefExpandList() that splits value into std::vector
Combines cmMakefile:GetDefinition() and cmExpandList()
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r-- | Source/cmDependsFortran.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 95dfc4e5cc..8f02d95515 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -80,10 +80,7 @@ cmDependsFortran::cmDependsFortran(cmLocalUnixMakefileGenerator3* lg) // Get the list of definitions. std::vector<std::string> definitions; cmMakefile* mf = this->LocalGenerator->GetMakefile(); - if (const char* c_defines = - mf->GetDefinition("CMAKE_TARGET_DEFINITIONS_Fortran")) { - cmExpandList(c_defines, definitions); - } + mf->GetDefExpandList("CMAKE_TARGET_DEFINITIONS_Fortran", definitions); // translate i.e. FOO=BAR to FOO and add it to the list of defined // preprocessor symbols @@ -243,10 +240,7 @@ void cmDependsFortran::LocateModules() // Load information about other targets. cmMakefile* mf = this->LocalGenerator->GetMakefile(); std::vector<std::string> infoFiles; - if (const char* infoFilesValue = - mf->GetDefinition("CMAKE_TARGET_LINKED_INFO_FILES")) { - cmExpandList(infoFilesValue, infoFiles); - } + mf->GetDefExpandList("CMAKE_TARGET_LINKED_INFO_FILES", infoFiles); for (std::string const& i : infoFiles) { std::string targetDir = cmSystemTools::GetFilenamePath(i); std::string fname = targetDir + "/fortran.internal"; |