summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-18 00:58:01 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-18 00:58:01 (GMT)
commit8d1d5500c8cb7ebabce73777c79c33074e679ab5 (patch)
tree27c37321fe8aff93398c9309462eb4f05b735778 /Source/cmDependsFortran.cxx
parent7f589c9f23ee64ca0d36e81a02a70a87bc7fbbbe (diff)
downloadCMake-8d1d5500c8cb7ebabce73777c79c33074e679ab5.zip
CMake-8d1d5500c8cb7ebabce73777c79c33074e679ab5.tar.gz
CMake-8d1d5500c8cb7ebabce73777c79c33074e679ab5.tar.bz2
ENH: Enable use of COMPILE_DEFINITIONS property for Fortran sources.
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r--Source/cmDependsFortran.cxx21
1 files changed, 6 insertions, 15 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 7a2f07c..1725c58 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -142,27 +142,18 @@ cmDependsFortran
IncludePath(&includes),
Internal(new cmDependsFortranInternals)
{
- // translate i.e. -DFOO=BAR to FOO and add it to the list of defined
+ // translate i.e. FOO=BAR to FOO and add it to the list of defined
// preprocessor symbols
- std::string def;
for(std::vector<std::string>::const_iterator
it = definitions.begin(); it != definitions.end(); ++it)
{
- std::string::size_type match = it->find("-D");
- if(match != std::string::npos)
+ std::string def = *it;
+ std::string::size_type assignment = def.find("=");
+ if(assignment != std::string::npos)
{
- std::string::size_type assignment = it->find("=");
- if(assignment != std::string::npos)
- {
- std::string::size_type length = assignment - (match+2);
- def = it->substr(match+2, length);
- }
- else
- {
- def = it->substr(match+2);
- }
- this->PPDefinitions.push_back(def);
+ def = it->substr(0, assignment);
}
+ this->PPDefinitions.push_back(def);
}
}