From 02ff910044503d677da477b0a554493e4f9e2fc1 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 25 Jun 2008 09:44:56 -0400 Subject: [PATCH] BUG: fix for bug 7239, DEFINITIONS property not backwards compatible to 2.4 --- Source/cmMakefile.cxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 26ecab912..b822aff26 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 defs; + cmSystemTools::ExpandListArgument(cdefs, defs); + for(std::vector::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) )