summaryrefslogtreecommitdiffstats
path: root/Source/cmSetCommand.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:42:58 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:18:39 (GMT)
commit7bbaa4283de26864b2e55e819db0884771585467 (patch)
treeecb748dbe41a13d8bdea77acd0049cde999d933e /Source/cmSetCommand.cxx
parentbe9db98946b7918f279812fd0616abb650eebed0 (diff)
downloadCMake-7bbaa4283de26864b2e55e819db0884771585467.zip
CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.gz
CMake-7bbaa4283de26864b2e55e819db0884771585467.tar.bz2
Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
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)
{