diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-06-25 13:44:56 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-06-25 13:44:56 (GMT) |
commit | 02ff910044503d677da477b0a554493e4f9e2fc1 (patch) | |
tree | 52a66dd44d31446db3db0e419ca9714902759e3b | |
parent | 4aa35cee98547e2ae6b59381d3ddf3e2fb29a942 (diff) | |
download | CMake-02ff910044503d677da477b0a554493e4f9e2fc1.zip CMake-02ff910044503d677da477b0a554493e4f9e2fc1.tar.gz CMake-02ff910044503d677da477b0a554493e4f9e2fc1.tar.bz2 |
BUG: fix for bug 7239, DEFINITIONS property not backwards compatible to 2.4
-rw-r--r-- | Source/cmMakefile.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 26ecab9..b822aff 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2954,8 +2954,21 @@ const char *cmMakefile::GetProperty(const char* prop, return output.c_str(); } else if (!strcmp("DEFINITIONS",prop)) - { - output = this->GetDefineFlags(); + { + if(const char* cdefs = this->GetProperty("COMPILE_DEFINITIONS")) + { + // Expand the list. + std::vector<std::string> defs; + cmSystemTools::ExpandListArgument(cdefs, defs); + for(std::vector<std::string>::iterator i = defs.begin(); + i != defs.end(); ++i) + { + output += "-D"; + output += *i; + output += " "; + } + } + output += this->GetDefineFlags(); return output.c_str(); } else if (!strcmp("INCLUDE_DIRECTORIES",prop) ) |