Speedup the test

This commit is contained in:
Andy Cedilnik 2002-12-05 11:55:53 -05:00
parent d6e6dcc3c0
commit 8d20322160
6 changed files with 26 additions and 48 deletions

View File

@ -5,24 +5,13 @@ SET (TEST_COMMAND_TEST1 1)
INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake)
CHECK_TYPE_SIZE(char SIZEOF_CHAR) CHECK_TYPE_SIZE(char SIZEOF_CHAR)
CHECK_TYPE_SIZE(short SIZEOF_SHORT)
CHECK_TYPE_SIZE(int SIZEOF_INT)
CHECK_TYPE_SIZE(long SIZEOF_LONG)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
CHECK_TYPE_SIZE(__int64 SIZEOF___INT64)
INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
CHECK_FUNCTION_EXISTS(vsprintf HAVE_VSPRINTF) CHECK_FUNCTION_EXISTS(printf HAVE_PRINTF)
CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
CHECK_FUNCTION_EXISTS(vsblabla HAVE_VSBLABLA) CHECK_FUNCTION_EXISTS(vsblabla HAVE_VSBLABLA)
CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME)
CHECK_FUNCTION_EXISTS(connect HAVE_CONNECT)
CHECK_FUNCTION_EXISTS(remove HAVE_REMOVE)
CHECK_FUNCTION_EXISTS(shmat HAVE_SHMAT)
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
CHECK_INCLUDE_FILE("sys/prctl.h" HAVE_SYS_PRCTL_H) CHECK_INCLUDE_FILE("sys/prctl.h" HAVE_SYS_PRCTL_H)
CHECK_INCLUDE_FILE("sys/prafasdfctl.h" HAVE_SYS_PRAFASDFCTL_H)
INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
CHECK_LIBRARY_EXISTS(m ceil "" HAVE_LIBM) CHECK_LIBRARY_EXISTS(m ceil "" HAVE_LIBM)

View File

@ -1,7 +1,18 @@
#include "LoadedCommand.h" #include "LoadedCommand.h"
#include <stdio.h>
int main () int main ()
{ {
#ifdef HAVE_VSBLABLA
printf("Should not be able to find vsblabla\n");
return 1;
#endif
#if !defined( HAVE_PRINTF )
printf("Should be able to find printf\n");
return 1;
#endif
#ifdef CMAKE_IS_FUN #ifdef CMAKE_IS_FUN
return SIZEOF_CHAR-1; return SIZEOF_CHAR-1;
#else #else

View File

@ -1,23 +1,12 @@
/* Check for size of types */ /* Check for size of types */
#cmakedefine SIZEOF_CHAR ${SIZEOF_CHAR} #cmakedefine SIZEOF_CHAR ${SIZEOF_CHAR}
#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT}
#cmakedefine SIZEOF_INT ${SIZEOF_INT}
#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
#cmakedefine SIZEOF_LONG_LONG ${SIZEOF_LONG_LONG}
#cmakedefine SIZEOF___INT64 ${SIZEOF___INT64}
/* Check for functions */ /* Check for functions */
#cmakedefine HAVE_VSPRINTF #cmakedefine HAVE_PRINTF
#cmakedefine HAVE_VSNPRINTF
#cmakedefine HAVE_VSBLABLA #cmakedefine HAVE_VSBLABLA
#cmakedefine HAVE_GETHOSTBYNAME
#cmakedefine HAVE_CONNECT
#cmakedefine HAVE_REMOVE
#cmakedefine HAVE_SHMAT
/* Check for headers */ /* Check for headers */
#cmakedefine HAVE_SYS_PRCTL_H #cmakedefine HAVE_SYS_PRCTL_H
#cmakedefine HAVE_SYS_PRAFASDFCTL_H
/* Check for libraries */ /* Check for libraries */
#cmakedefine HAVE_LIBM #cmakedefine HAVE_LIBM

View File

@ -5,24 +5,13 @@ SET (TEST_COMMAND_TEST1 1)
INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake)
CHECK_TYPE_SIZE(char SIZEOF_CHAR) CHECK_TYPE_SIZE(char SIZEOF_CHAR)
CHECK_TYPE_SIZE(short SIZEOF_SHORT)
CHECK_TYPE_SIZE(int SIZEOF_INT)
CHECK_TYPE_SIZE(long SIZEOF_LONG)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
CHECK_TYPE_SIZE(__int64 SIZEOF___INT64)
INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
CHECK_FUNCTION_EXISTS(vsprintf HAVE_VSPRINTF) CHECK_FUNCTION_EXISTS(printf HAVE_PRINTF)
CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
CHECK_FUNCTION_EXISTS(vsblabla HAVE_VSBLABLA) CHECK_FUNCTION_EXISTS(vsblabla HAVE_VSBLABLA)
CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME)
CHECK_FUNCTION_EXISTS(connect HAVE_CONNECT)
CHECK_FUNCTION_EXISTS(remove HAVE_REMOVE)
CHECK_FUNCTION_EXISTS(shmat HAVE_SHMAT)
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
CHECK_INCLUDE_FILE("sys/prctl.h" HAVE_SYS_PRCTL_H) CHECK_INCLUDE_FILE("sys/prctl.h" HAVE_SYS_PRCTL_H)
CHECK_INCLUDE_FILE("sys/prafasdfctl.h" HAVE_SYS_PRAFASDFCTL_H)
INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
CHECK_LIBRARY_EXISTS(m ceil "" HAVE_LIBM) CHECK_LIBRARY_EXISTS(m ceil "" HAVE_LIBM)

View File

@ -1,7 +1,18 @@
#include "LoadedCommand.h" #include "LoadedCommand.h"
#include <stdio.h>
int main () int main ()
{ {
#ifdef HAVE_VSBLABLA
printf("Should not be able to find vsblabla\n");
return 1;
#endif
#if !defined( HAVE_PRINTF )
printf("Should be able to find printf\n");
return 1;
#endif
#ifdef CMAKE_IS_FUN #ifdef CMAKE_IS_FUN
return SIZEOF_CHAR-1; return SIZEOF_CHAR-1;
#else #else

View File

@ -1,23 +1,12 @@
/* Check for size of types */ /* Check for size of types */
#cmakedefine SIZEOF_CHAR ${SIZEOF_CHAR} #cmakedefine SIZEOF_CHAR ${SIZEOF_CHAR}
#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT}
#cmakedefine SIZEOF_INT ${SIZEOF_INT}
#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
#cmakedefine SIZEOF_LONG_LONG ${SIZEOF_LONG_LONG}
#cmakedefine SIZEOF___INT64 ${SIZEOF___INT64}
/* Check for functions */ /* Check for functions */
#cmakedefine HAVE_VSPRINTF #cmakedefine HAVE_PRINTF
#cmakedefine HAVE_VSNPRINTF
#cmakedefine HAVE_VSBLABLA #cmakedefine HAVE_VSBLABLA
#cmakedefine HAVE_GETHOSTBYNAME
#cmakedefine HAVE_CONNECT
#cmakedefine HAVE_REMOVE
#cmakedefine HAVE_SHMAT
/* Check for headers */ /* Check for headers */
#cmakedefine HAVE_SYS_PRCTL_H #cmakedefine HAVE_SYS_PRCTL_H
#cmakedefine HAVE_SYS_PRAFASDFCTL_H
/* Check for libraries */ /* Check for libraries */
#cmakedefine HAVE_LIBM #cmakedefine HAVE_LIBM