summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-05-30 12:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-05-30 12:59:20 (GMT)
commit7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf (patch)
treeb17167b762c3257baf362b515fbf1a8fece7b356 /Source/cmDependsFortran.cxx
parent6bb20b51c9af40372b6a818826613e965cde5f19 (diff)
downloadCMake-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/cmDependsFortran.cxx')
-rw-r--r--Source/cmDependsFortran.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 95dfc4e..8f02d95 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";