diff options
author | Daniele E. Domenichelli <daniele.domenichelli@iit.it> | 2013-11-13 08:02:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-13 15:15:56 (GMT) |
commit | bc280f1c8108809abed700c2fe039340bb9ae1c0 (patch) | |
tree | c2ee36457200ed92ed63f444369498c2dd8f8243 /Source/cmSetCommand.cxx | |
parent | 20afbd5e037a0ccfa55af8564ed8cd3ec2430540 (diff) | |
download | CMake-bc280f1c8108809abed700c2fe039340bb9ae1c0.zip CMake-bc280f1c8108809abed700c2fe039340bb9ae1c0.tar.gz CMake-bc280f1c8108809abed700c2fe039340bb9ae1c0.tar.bz2 |
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.
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r-- | Source/cmSetCommand.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 22b4383..bb193bf 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; } |