summaryrefslogtreecommitdiff
path: root/Tests/LoadCommand
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-12-05 11:55:53 -0500
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-12-05 11:55:53 -0500
commit8d20322160e6e8c7bf9c6d69de9319f57373de5d (patch)
tree79d5389ecb72b083f53bc7e0f8da3b8f473c5f1a /Tests/LoadCommand
parentd6e6dcc3c0f2b432da1701bb7e162bbbbc7a7974 (diff)
downloadcmake-8d20322160e6e8c7bf9c6d69de9319f57373de5d.tar.gz
Speedup the test
Diffstat (limited to 'Tests/LoadCommand')
-rw-r--r--Tests/LoadCommand/CMakeLists.txt13
-rw-r--r--Tests/LoadCommand/LoadedCommand.cxx11
-rw-r--r--Tests/LoadCommand/LoadedCommand.h.in13
3 files changed, 13 insertions, 24 deletions
diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt
index 64955cb64d..b20b4148af 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 65483c87f9..8f073d491c 100644
--- a/Tests/LoadCommand/LoadedCommand.cxx
+++ b/Tests/LoadCommand/LoadedCommand.cxx
@@ -1,7 +1,18 @@
#include "LoadedCommand.h"
+#include <stdio.h>
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 5b7a307e44..b910e49556 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