summaryrefslogtreecommitdiffstats
path: root/Source/cmSetCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-14 12:31:45 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-08-14 12:31:45 (GMT)
commitcd3bd23266a4a6c00595134a17a8bdaea9e28af5 (patch)
tree515fcf4fdee211067497339acb52de321640c4fc /Source/cmSetCommand.cxx
parent9acb4f118cd9a52aaa66897b1c0cd11dace3851c (diff)
parent68bc863d5bd64f3e893722e403d4fd56bd2e175a (diff)
downloadCMake-cd3bd23266a4a6c00595134a17a8bdaea9e28af5.zip
CMake-cd3bd23266a4a6c00595134a17a8bdaea9e28af5.tar.gz
CMake-cd3bd23266a4a6c00595134a17a8bdaea9e28af5.tar.bz2
Merge topic 'cleanup-style'
68bc863 Merge branch 'master' into cleanup-style a05eba5 CMakeVersion.bash: Update sed expression for lower-case 'set' 3c0488d Fix WarnUnusedUnusedViaUnset test pass/fail regex 6c2c483 Remove trailing TAB from NSIS.template.in 9db3116 Remove CMake-language block-end command arguments 77543bd Convert CMake-language commands to lower case 7bbaa42 Remove trailing whitespace from most CMake and C/C++ code be9db98 Merge topic 'watcom-compiler-version' af42ae4 Watcom: Simplify compiler version detection (#11866)
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 d00fc86..20f38be 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)
{