CMake/Tests/StringFileTest/InputFile.h.in
Kitware Robot 7bbaa4283d 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/ \+$//'
2012-08-13 14:18:39 -04:00

39 lines
941 B
C

#include "includefile"
/* This should be configured to a define. */
#cmakedefine TEST_DEFINED @TEST_DEFINED@
/* This should be configured to a commented undef with the curlies in place */
#cmakedefine TEST_NOT_DEFINED ${TEST_NOT_DEFINED}
/* This complicated line should be configured unchanged: */
static const char* configvar =
"@$@$junk =~ s/#$xyz#/$foo_bar{$wibble}->{$xyz}/;@@";
int CheckMethod(const char* var, const char* val )
{
if ( !var )
{
printf("Var not specified\n");
return 1;
}
if ( !val )
{
printf("Val not specified\n");
return 1;
}
if ( strcmp(var, val) != 0)
{
printf("Var (%s) and Val (%s) are not the same...\n", var, val);
return 1;
}
#if !defined(TEST_DEFINED) || TEST_DEFINED != 123
printf("TEST_DEFINED is not defined to 123\n");
return 1;
#elif defined(TEST_NOT_DEFINED)
printf("TEST_NOT_DEFINED is defined\n");
return 1;
#else
return 0;
#endif
}