CMake/Tests/LoadCommand/LoadedCommand.cxx

42 lines
769 B
C++
Raw Normal View History

#include "LoadedCommand.h"
2002-12-05 19:55:53 +03:00
#include <stdio.h>
int testSizeOf(int s1, int s2)
{
return s1 - s2;
}
2002-09-17 00:27:00 +04:00
int main ()
{
int ret = 0;
2002-12-05 19:55:53 +03:00
#ifdef HAVE_VSBLABLA
printf("Should not be able to find vsblabla\n");
ret = 1;
2002-12-05 19:55:53 +03:00
#endif
#if !defined( HAVE_PRINTF )
printf("Should be able to find printf\n");
ret= 1;
2002-12-05 19:55:53 +03:00
#endif
2003-07-22 20:21:15 +04:00
#if !defined( ADDED_DEFINITION )
printf("Should have ADDED_DEFINITION defined\n");
ret= 1;
#endif
#if !defined(CMAKE_IS_FUN)
printf("Loaded Command was not built with CMAKE_IS_FUN: failed.\n");
ret = 1;
2003-07-22 20:21:15 +04:00
#endif
if(testSizeOf(SIZEOF_CHAR, sizeof(char)))
{
printf("Size of char is broken.\n");
ret = 1;
}
if(testSizeOf(SIZEOF_SHORT, sizeof(short)))
{
printf("Size of short is broken.\n");
ret = 1;
}
return ret;
2002-09-17 00:27:00 +04:00
}