summaryrefslogtreecommitdiff
path: root/Source/cmSetCommand.cxx
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
commitef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (patch)
tree6501b44707b5c6a88fa5f817adee1a3ffcb0012d /Source/cmSetCommand.cxx
parent035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (diff)
downloadcmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.gz
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.bz2
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.zip
Imported Upstream version 2.8.10.2upstream/2.8.10.2
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r--Source/cmSetCommand.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index d00fc86cf..20f38be10 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -20,7 +20,7 @@ bool cmSetCommand
this->SetError("called with incorrect number of arguments");
return false;
}
-
+
// watch for ENV signatures
const char* variable = args[0].c_str(); // VAR is always first
if (!strncmp(variable,"ENV{",4) && strlen(variable) > 5)
@@ -31,7 +31,7 @@ bool cmSetCommand
varName[strlen(variable)-5] = '\0';
std::string putEnvArg = varName;
putEnvArg += "=";
-
+
// what is the current value if any
const char *currValue = getenv(varName);
delete [] varName;
@@ -47,7 +47,7 @@ bool cmSetCommand
}
return true;
}
-
+
// if it will be cleared, then clear it if it isn;t already clear
if (currValue)
{
@@ -55,7 +55,7 @@ bool cmSetCommand
}
return true;
}
-
+
// SET (VAR) // Removes the definition of VAR.
if (args.size() == 1)
{
@@ -63,7 +63,7 @@ bool cmSetCommand
return true;
}
- // here are the remaining options
+ // here are the remaining options
// SET (VAR value )
// SET (VAR CACHE TYPE "doc String" [FORCE])
// SET (VAR value CACHE TYPE "doc string" [FORCE])
@@ -71,10 +71,10 @@ bool cmSetCommand
bool cache = false; // optional
bool force = false; // optional
bool parentScope = false;
- cmCacheManager::CacheEntryType type
+ cmCacheManager::CacheEntryType type
= cmCacheManager::STRING; // required if cache
const char* docstring = 0; // required if cache
-
+
unsigned int ignoreLastArgs = 0;
// look for PARENT_SCOPE argument
if (args.size() > 1 && args[args.size()-1] == "PARENT_SCOPE")
@@ -136,7 +136,7 @@ bool cmSetCommand
this->SetError("given invalid arguments for CACHE mode.");
return false;
}
-
+
if(cache)
{
std::string::size_type cacheStart = args.size() - 3 - (force ? 1 : 0);
@@ -145,7 +145,7 @@ bool cmSetCommand
}
// see if this is already in the cache
- cmCacheManager::CacheIterator it =
+ cmCacheManager::CacheIterator it =
this->Makefile->GetCacheManager()->GetCacheIterator(variable);
if(!it.IsAtEnd() && (it.GetType() != cmCacheManager::UNINITIALIZED))
{
@@ -158,7 +158,7 @@ bool cmSetCommand
return true;
}
}
-
+
// if it is meant to be in the cache then define it in the cache
if(cache)
{