From 52a8004b9844cf88d4448d1c718dda00bf23a70b Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 23 May 2006 15:01:15 -0400 Subject: [PATCH] BUG: Fix parsing of definitions to support REMOVE_DEFINITIONS. --- Source/cmLocalVisualStudio7Generator.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 8117a26b3..7c2d72033 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -958,6 +958,12 @@ void cmLocalVisualStudio7Generator::OutputDefineFlags(const char* flags, done = true; } + // Remove trailing whitespace from the definition. + while(!define.empty() && isspace(define[define.size()-1])) + { + define = define.substr(0, define.size()-1); + } + // Double-quotes in the value of the definition must be escaped // with a backslash. The entire definition should be quoted in // the generated xml attribute to avoid confusing the VS parser.