diff options
author | Brad King <brad.king@kitware.com> | 2008-01-18 00:58:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-18 00:58:01 (GMT) |
commit | 8d1d5500c8cb7ebabce73777c79c33074e679ab5 (patch) | |
tree | 27c37321fe8aff93398c9309462eb4f05b735778 /Source/cmDependsFortran.cxx | |
parent | 7f589c9f23ee64ca0d36e81a02a70a87bc7fbbbe (diff) | |
download | CMake-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.cxx | 21 |
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); } } |