From bc280f1c8108809abed700c2fe039340bb9ae1c0 Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Wed, 13 Nov 2013 09:02:56 +0100 Subject: [PATCH] set: Fix handling of empty value with PARENT_SCOPE Just as set(VAR "") sets VAR to an empty string in the current scope, the code set(VAR "" PARENT_SCOPE) is documented to set the variable to an empty string in the parent scope. Fix the implementation to make it so. --- Source/cmSetCommand.cxx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 22b43832b..bb193bf9f 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -122,15 +122,8 @@ bool cmSetCommand if (parentScope) { - if (value.empty()) - { - this->Makefile->RaiseScope(variable, 0); - } - else - { - this->Makefile->RaiseScope(variable, value.c_str()); - } - return true; + this->Makefile->RaiseScope(variable, value.c_str()); + return true; }