From 20afbd5e037a0ccfa55af8564ed8cd3ec2430540 Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Wed, 13 Nov 2013 08:59:26 +0100 Subject: [PATCH] set: Handle value-less PARENT_SCOPE explicitly The code "set(VAR PARENT_SCOPE)" unsets VAR in the parent scope. Implement this case explicitly next to where "set(VAR)" is explicitly handled to unset VAR in the current scope. --- Source/cmSetCommand.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 20f38be105..22b43832bb 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -62,9 +62,17 @@ bool cmSetCommand this->Makefile->RemoveDefinition(args[0].c_str()); return true; } + // SET (VAR PARENT_SCOPE) // Removes the definition of VAR + // in the parent scope. + else if (args.size() == 2 && args[args.size()-1] == "PARENT_SCOPE") + { + this->Makefile->RaiseScope(variable, 0); + return true; + } // here are the remaining options // SET (VAR value ) + // SET (VAR value PARENT_SCOPE) // SET (VAR CACHE TYPE "doc String" [FORCE]) // SET (VAR value CACHE TYPE "doc string" [FORCE]) std::string value; // optional