summaryrefslogtreecommitdiff
path: root/Modules/CMakeBackwardCompatibilityC.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-12-05 13:44:11 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2002-12-05 13:44:11 -0500
commit96189f79d582f90758ba1b4f691031b1d7fa02f3 (patch)
tree36bc488b7a77d01a9b9be3b1e4b0ab8963378fdc /Modules/CMakeBackwardCompatibilityC.cmake
parent8d20322160e6e8c7bf9c6d69de9319f57373de5d (diff)
downloadcmake-96189f79d582f90758ba1b4f691031b1d7fa02f3.tar.gz
ENH: unify EnableLanguage across all generators
Diffstat (limited to 'Modules/CMakeBackwardCompatibilityC.cmake')
-rw-r--r--Modules/CMakeBackwardCompatibilityC.cmake76
1 files changed, 43 insertions, 33 deletions
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake
index eccad863f9..04cab0b24f 100644
--- a/Modules/CMakeBackwardCompatibilityC.cmake
+++ b/Modules/CMakeBackwardCompatibilityC.cmake
@@ -1,46 +1,56 @@
# Nothing here yet
-
-INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake)
-CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
-CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
-CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
-CHECK_TYPE_SIZE(char CMAKE_SIZEOF_CHAR)
-CHECK_TYPE_SIZE(short CMAKE_SIZEOF_SHORT)
-CHECK_TYPE_SIZE(float CMAKE_SIZEOF_FLOAT)
-CHECK_TYPE_SIZE(double CMAKE_SIZEOF_DOUBLE)
-
-INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
-CHECK_FUNCTION_EXISTS(connect CMAKE_HAVE_CONNECT)
-CHECK_FUNCTION_EXISTS(remove CMAKE_HAVE_REMOVE)
-
-INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
-CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_HAVE_GETHOSTBYNAME)
-
-INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
-CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H)
-CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
-CHECK_INCLUDE_FILE("sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
-CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
-
-INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
-TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
-INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/FindThreads.cmake)
-
-SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING
+IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+ INCLUDE(${CMAKE_ROOT}/Modules/CMakeVS7BackwardCompatibility.cmake)
+ SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+ INCLUDE(${CMAKE_ROOT}/Modules/CMakeVS6BackwardCompatibility.cmake)
+ SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+
+IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
+ INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake)
+ CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
+ CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
+ CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
+ CHECK_TYPE_SIZE(char CMAKE_SIZEOF_CHAR)
+ CHECK_TYPE_SIZE(short CMAKE_SIZEOF_SHORT)
+ CHECK_TYPE_SIZE(float CMAKE_SIZEOF_FLOAT)
+ CHECK_TYPE_SIZE(double CMAKE_SIZEOF_DOUBLE)
+
+ INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
+ CHECK_FUNCTION_EXISTS(connect CMAKE_HAVE_CONNECT)
+ CHECK_FUNCTION_EXISTS(remove CMAKE_HAVE_REMOVE)
+
+ INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
+ CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_HAVE_GETHOSTBYNAME)
+
+ INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
+ CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H)
+ CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
+ CHECK_INCLUDE_FILE("sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
+ CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
+
+ INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
+ TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
+ INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
+ INCLUDE (${CMAKE_ROOT}/Modules/FindThreads.cmake)
+
+ SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING
"Thread library used.")
-SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL
+ SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL
"Use the pthreads library.")
-SET (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL
+ SET (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL
"Use the win32 thread library.")
-SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL
+ SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL
"Use HP pthreads.")
-SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
+ SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
"Use sproc libs.")
+ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
MARK_AS_ADVANCED(
CMAKE_THREAD_LIBS