From 8d20322160e6e8c7bf9c6d69de9319f57373de5d Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 5 Dec 2002 11:55:53 -0500 Subject: Speedup the test --- Tests/LoadCommand/CMakeLists.txt | 13 +------------ Tests/LoadCommand/LoadedCommand.cxx | 11 +++++++++++ Tests/LoadCommand/LoadedCommand.h.in | 13 +------------ Tests/LoadCommandOneConfig/CMakeLists.txt | 13 +------------ Tests/LoadCommandOneConfig/LoadedCommand.cxx | 11 +++++++++++ Tests/LoadCommandOneConfig/LoadedCommand.h.in | 13 +------------ 6 files changed, 26 insertions(+), 48 deletions(-) diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt index 64955cb..b20b414 100644 --- a/Tests/LoadCommand/CMakeLists.txt +++ b/Tests/LoadCommand/CMakeLists.txt @@ -5,24 +5,13 @@ SET (TEST_COMMAND_TEST1 1) INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake) 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) -CHECK_FUNCTION_EXISTS(vsprintf HAVE_VSPRINTF) -CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF) +CHECK_FUNCTION_EXISTS(printf HAVE_PRINTF) 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) 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) CHECK_LIBRARY_EXISTS(m ceil "" HAVE_LIBM) diff --git a/Tests/LoadCommand/LoadedCommand.cxx b/Tests/LoadCommand/LoadedCommand.cxx index 65483c8..8f073d4 100644 --- a/Tests/LoadCommand/LoadedCommand.cxx +++ b/Tests/LoadCommand/LoadedCommand.cxx @@ -1,7 +1,18 @@ #include "LoadedCommand.h" +#include 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 return SIZEOF_CHAR-1; #else diff --git a/Tests/LoadCommand/LoadedCommand.h.in b/Tests/LoadCommand/LoadedCommand.h.in index 5b7a307..b910e49 100644 --- a/Tests/LoadCommand/LoadedCommand.h.in +++ b/Tests/LoadCommand/LoadedCommand.h.in @@ -1,23 +1,12 @@ /* Check for size of types */ #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 */ -#cmakedefine HAVE_VSPRINTF -#cmakedefine HAVE_VSNPRINTF +#cmakedefine HAVE_PRINTF #cmakedefine HAVE_VSBLABLA -#cmakedefine HAVE_GETHOSTBYNAME -#cmakedefine HAVE_CONNECT -#cmakedefine HAVE_REMOVE -#cmakedefine HAVE_SHMAT /* Check for headers */ #cmakedefine HAVE_SYS_PRCTL_H -#cmakedefine HAVE_SYS_PRAFASDFCTL_H /* Check for libraries */ #cmakedefine HAVE_LIBM \ No newline at end of file diff --git a/Tests/LoadCommandOneConfig/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeLists.txt index 64955cb..b20b414 100644 --- a/Tests/LoadCommandOneConfig/CMakeLists.txt +++ b/Tests/LoadCommandOneConfig/CMakeLists.txt @@ -5,24 +5,13 @@ SET (TEST_COMMAND_TEST1 1) INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake) 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) -CHECK_FUNCTION_EXISTS(vsprintf HAVE_VSPRINTF) -CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF) +CHECK_FUNCTION_EXISTS(printf HAVE_PRINTF) 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) 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) CHECK_LIBRARY_EXISTS(m ceil "" HAVE_LIBM) diff --git a/Tests/LoadCommandOneConfig/LoadedCommand.cxx b/Tests/LoadCommandOneConfig/LoadedCommand.cxx index 65483c8..8f073d4 100644 --- a/Tests/LoadCommandOneConfig/LoadedCommand.cxx +++ b/Tests/LoadCommandOneConfig/LoadedCommand.cxx @@ -1,7 +1,18 @@ #include "LoadedCommand.h" +#include 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 return SIZEOF_CHAR-1; #else diff --git a/Tests/LoadCommandOneConfig/LoadedCommand.h.in b/Tests/LoadCommandOneConfig/LoadedCommand.h.in index 5b7a307..b910e49 100644 --- a/Tests/LoadCommandOneConfig/LoadedCommand.h.in +++ b/Tests/LoadCommandOneConfig/LoadedCommand.h.in @@ -1,23 +1,12 @@ /* Check for size of types */ #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 */ -#cmakedefine HAVE_VSPRINTF -#cmakedefine HAVE_VSNPRINTF +#cmakedefine HAVE_PRINTF #cmakedefine HAVE_VSBLABLA -#cmakedefine HAVE_GETHOSTBYNAME -#cmakedefine HAVE_CONNECT -#cmakedefine HAVE_REMOVE -#cmakedefine HAVE_SHMAT /* Check for headers */ #cmakedefine HAVE_SYS_PRCTL_H -#cmakedefine HAVE_SYS_PRAFASDFCTL_H /* Check for libraries */ #cmakedefine HAVE_LIBM \ No newline at end of file -- cgit v0.12