clean up test for html output

This commit is contained in:
Bill Hoffman 2002-11-12 14:18:36 -05:00
parent 359ca21903
commit 8b689f9a62
4 changed files with 26 additions and 8 deletions

View File

@ -1,8 +1,8 @@
PROJECT(DumpInformation) PROJECT(DumpInformation)
INCLUDE_DIRECTORIES(${SystemInformation_BINARY_DIR}) INCLUDE_DIRECTORIES(${DumpInformation_BINARY_DIR})
CONFIGURE_FILE(${SystemInformation_SOURCE_DIR}/SystemInformation.in CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/SystemInformation.in
${SystemInformation_BINARY_DIR}/SystemInformation.out) ${DumpInformation_BINARY_DIR}/SystemInformation.out)
CONFIGURE_FILE(${SystemInformation_SOURCE_DIR}/DumpInformation.h.in CONFIGURE_FILE(${DumpInformation_SOURCE_DIR}/DumpInformation.h.in
${SystemInformation_BINARY_DIR}/DumpInformation.h) ${DumpInformation_BINARY_DIR}/DumpInformation.h)
ADD_EXECUTABLE(DumpInformation DumpInformation.cxx) ADD_EXECUTABLE(DumpInformation DumpInformation.cxx)

View File

@ -6,17 +6,34 @@ int main(int, char*[])
FILE* file = fopen(CMAKE_DUMP_FILE, "r"); FILE* file = fopen(CMAKE_DUMP_FILE, "r");
if(!file) if(!file)
{ {
printf("Error, could not open file %s", CMAKE_DUMP_FILE); printf("Error, could not open file %s\n", CMAKE_DUMP_FILE);
return -1; return -1;
} }
printf("#Note less than will show up as { and greater than will be }\n");
while(!feof(file)) while(!feof(file))
{ {
int ch = fgetc(file); int ch = fgetc(file);
if(ch != EOF) if(ch != EOF)
{
if(ch == '<')
{
printf("&lt;");
}
else if(ch == '>')
{
printf("&gt;");
}
else if(ch == '&')
{
printf("&amp;");
}
else
{ {
putc(ch, stdout); putc(ch, stdout);
} }
} }
}
printf("\n");
fclose(file); fclose(file);
return 0; return 0;
} }

View File

@ -1 +1 @@
#define CMAKE_DUMP_FILE "${SystemInformation_BINARY_DIR}/SystemInformation.out" #define CMAKE_DUMP_FILE "${DumpInformation_BINARY_DIR}/SystemInformation.out"

View File

@ -11,6 +11,7 @@ CMAKE_LINK_LIBRARY_FLAG == "${CMAKE_LINK_LIBRARY_FLAG}"
CMAKE_SKIP_RPATH == "${CMAKE_SKIP_RPATH}" CMAKE_SKIP_RPATH == "${CMAKE_SKIP_RPATH}"
CMAKE_SYSTEM_INFO_FILE == "${CMAKE_SYSTEM_INFO_FILE}" CMAKE_SYSTEM_INFO_FILE == "${CMAKE_SYSTEM_INFO_FILE}"
CMAKE_SYSTEM_NAME == "${CMAKE_SYSTEM_NAME}" CMAKE_SYSTEM_NAME == "${CMAKE_SYSTEM_NAME}"
CMAKE_SYSTEM == "${CMAKE_SYSTEM}"
CMAKE_CXX_COMPILER == "${CMAKE_CXX_COMPILER}" CMAKE_CXX_COMPILER == "${CMAKE_CXX_COMPILER}"
CMAKE_C_COMPILER == "${CMAKE_C_COMPILER}" CMAKE_C_COMPILER == "${CMAKE_C_COMPILER}"