summaryrefslogtreecommitdiffstats
path: root/Tests/LoadCommand/CMakeCommands
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 /Tests/LoadCommand/CMakeCommands
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 'Tests/LoadCommand/CMakeCommands')
-rw-r--r--Tests/LoadCommand/CMakeCommands/cmTestCommand.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
index 6b4f48f..fc04934 100644
--- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
+++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdio.h>
-typedef struct
+typedef struct
{
char *LibraryName;
int Argc;
@@ -24,8 +24,8 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[])
char *ccDep[1];
char *ccOut[1];
cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf;
-
- cmVTKWrapTclData *cdata =
+
+ cmVTKWrapTclData *cdata =
(cmVTKWrapTclData *)malloc(sizeof(cmVTKWrapTclData));
cdata->LibraryName = "BOO";
cdata->Argc = argc;
@@ -36,33 +36,33 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[])
/* already, if so use that value and don't look for the program */
if(!info->CAPI->IsOn(mf,"TEST_COMMAND_TEST1"))
{
- info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO");
+ info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO");
return 1;
}
-
- info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO");
+
+ info->CAPI->AddDefinition(mf, "TEST_DEF", "HOO");
cdata->LibraryName = "HOO";
- info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE", "ON",
+ info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE", "ON",
"Test cache variable",
CM_CACHE_BOOL);
- info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE1", "",
+ info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE1", "",
"Test cache variable 1",
CM_CACHE_PATH);
- info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE2", "",
+ info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE2", "",
"Test cache variable 2",
CM_CACHE_FILEPATH);
- info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE3", "",
+ info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE3", "",
"Test cache variable 3",
CM_CACHE_STRING);
- info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE4", "",
+ info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE4", "",
"Test cache variable 4",
CM_CACHE_INTERNAL);
- info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE5", "",
+ info->CAPI->AddCacheDefinition(mf, "SOME_CACHE_VARIABLE5", "",
"Test cache variable 5",
CM_CACHE_STATIC);
-
+
file = info->CAPI->ExpandVariablesInString(mf, "${CMAKE_COMMAND}", 0, 0);
str = info->CAPI->GetFilenameWithoutExtension(file);
@@ -140,7 +140,7 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[])
1, ccDep,
1, ccOut,
"LoadedCommand");
-
+
ccArgs[2] = argv[1];
ccArgs[3] = argv[2];
@@ -171,22 +171,22 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[])
return 0;
}
info->CAPI->ExecuteCommand(mf,"SET",2,args);
-
+
/* make sure we can find the source file */
if (!info->CAPI->GetSource(mf,argv[1]))
{
info->CAPI->SetError(mf, "Source file could not be found!");
- return 0;
+ return 0;
}
return 1;
}
-static void CCONV FinalPass(void *inf, void *mf)
+static void CCONV FinalPass(void *inf, void *mf)
{
cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf;
/* get our client data from initial pass */
- cmVTKWrapTclData *cdata =
+ cmVTKWrapTclData *cdata =
(cmVTKWrapTclData *)info->CAPI->GetClientData(info);
if (strcmp(info->CAPI->GetDefinition(mf, "TEST_DEF"),"HOO") ||
strcmp(cdata->LibraryName,"HOO"))
@@ -194,11 +194,11 @@ static void CCONV FinalPass(void *inf, void *mf)
fprintf(stderr,"*** Failed LOADED COMMAND Final Pass\n");
}
}
-static void CCONV Destructor(void *inf)
+static void CCONV Destructor(void *inf)
{
cmLoadedCommandInfo *info = (cmLoadedCommandInfo *)inf;
/* get our client data from initial pass */
- cmVTKWrapTclData *cdata =
+ cmVTKWrapTclData *cdata =
(cmVTKWrapTclData *)info->CAPI->GetClientData(info);
free(cdata);
}