summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-09 18:55:18 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-08-09 18:55:18 (GMT)
commit330062c0cee22355d1cd324242a2dba49c2ab4d0 (patch)
tree2d33cf7866bba26c6bac7cb12223a5e5ded49f2d /Utilities
parent176fe63d151d60e90edd4bd01eaac7d1b74241cd (diff)
downloadCMake-330062c0cee22355d1cd324242a2dba49c2ab4d0.zip
CMake-330062c0cee22355d1cd324242a2dba49c2ab4d0.tar.gz
CMake-330062c0cee22355d1cd324242a2dba49c2ab4d0.tar.bz2
STYLE: HAVE_LONG_LONG_CONST was completely unused here (it was used in the
(unused) copy of curl under CMake/CTest/Curl/ ) Alex
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmcurl/CMake/CurlTests.c12
-rw-r--r--Utilities/cmcurl/CMake/OtherTests.cmake5
-rw-r--r--Utilities/cmcurl/CMakeLists.txt10
3 files changed, 13 insertions, 14 deletions
diff --git a/Utilities/cmcurl/CMake/CurlTests.c b/Utilities/cmcurl/CMake/CurlTests.c
index 61278ea..fed3894 100644
--- a/Utilities/cmcurl/CMake/CurlTests.c
+++ b/Utilities/cmcurl/CMake/CurlTests.c
@@ -521,15 +521,3 @@ main () {
return 0;
}
#endif
-#ifdef HAVE_LONG_LONG_CONSTANT
-int main()
-{
- long long c = 0x8000000000000000LL;
- long long k = 0x7FFFFFFFFFFFFFFFLL;
- if ( c == 0x8000000000000000LL && c != k )
- {
- return 0;
- }
- return 1;
-}
-#endif
diff --git a/Utilities/cmcurl/CMake/OtherTests.cmake b/Utilities/cmcurl/CMake/OtherTests.cmake
index ec3ed09..953337c 100644
--- a/Utilities/cmcurl/CMake/OtherTests.cmake
+++ b/Utilities/cmcurl/CMake/OtherTests.cmake
@@ -2,6 +2,7 @@ INCLUDE(CheckCSourceCompiles)
SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
SET(HEADER_INCLUDES)
SET(headers_hack)
+
MACRO(add_header_include check header)
IF(${check})
SET(headers_hack
@@ -11,6 +12,7 @@ MACRO(add_header_include check header)
# "${header}")
ENDIF(${check})
ENDMACRO(add_header_include)
+
SET(signature_call_conv)
IF(HAVE_WINDOWS_H)
add_header_include(HAVE_WINDOWS_H "windows.h")
@@ -164,6 +166,7 @@ CHECK_C_SOURCE_COMPILES("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL)
SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
SET(HEADER_INCLUDES)
SET(headers_hack)
+
MACRO(add_header_include check header)
IF(${check})
SET(headers_hack
@@ -173,6 +176,7 @@ MACRO(add_header_include check header)
# "${header}")
ENDIF(${check})
ENDMACRO(add_header_include header)
+
IF(HAVE_WINDOWS_H)
SET(EXTRA_DEFINES ${EXTRA_DEFINES}
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
@@ -238,6 +242,7 @@ ELSE(HAVE_WINDOWS_H)
"arpa/inet.h")
ENDIF(HAVE_ARPA_INET_H)
ENDIF(HAVE_WINDOWS_H)
+
CHECK_TYPE_SIZE("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
IF(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
SET(HAVE_STRUCT_SOCKADDR_STORAGE 1)
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 09a575f..573ac85 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -35,7 +35,13 @@ INCLUDE (CheckIncludeFile)
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists)
INCLUDE (CheckSymbolExists)
-INCLUDE (CheckTypeSize)
+# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
+# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
+IF(CMAKE_CROSSCOMPILING)
+ INCLUDE ("${CMAKE_ROOT}/Modules/CheckTypeSize.cmake")
+ELSE(CMAKE_CROSSCOMPILING)
+ INCLUDE (CheckTypeSize)
+ENDIF(CMAKE_CROSSCOMPILING)
SET(libCurl_SRCS
# amigaos.c - does not build on AmigaOS
@@ -491,6 +497,7 @@ MACRO(CURL_INTERNAL_TEST CURL_TEST)
ENDIF(${CURL_TEST})
ENDIF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
ENDMACRO(CURL_INTERNAL_TEST)
+
MACRO(CURL_INTERNAL_TEST_RUN CURL_TEST)
IF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
@@ -572,7 +579,6 @@ ENDIF(HAVE_FILE_OFFSET_BITS)
FOREACH(CURL_TEST
HAVE_GLIBC_STRERROR_R
HAVE_POSIX_STRERROR_R
- HAVE_LONG_LONG_CONSTANT
)
CURL_INTERNAL_TEST_RUN(${CURL_TEST})
ENDFOREACH(CURL_TEST)