diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 863213f81..1ba570f5e 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -358,7 +358,9 @@ if(HAVE_BUILTIN_OPENPTY) set(HAVE_LIBUTIL 1) else() find_library(HAVE_LIBUTIL util) - set(LIBUTIL_LIBRARIES ${HAVE_LIBUTIL}) + if(HAVE_LIBUTIL) + set(LIBUTIL_LIBRARIES ${HAVE_LIBUTIL}) + endif() endif() if(APPLE) @@ -540,6 +542,18 @@ elseif(CMAKE_SYSTEM MATCHES "QNX\\-6\\.3\\.2$") # defining NI_NUMERICHOST. set(define_xopen_source 0) + +elseif(CMAKE_SYSTEM MATCHES "VxWorks\\-7$") + + # VxWorks-7 + + # On VxWorks-7, defining _XOPEN_SOURCE or _POSIX_C_SOURCE + # leads to a failure in select.h because sys/types.h fails + # to define FD_SETSIZE. + # Reported by Martin Oberhuber as V7COR-4651. + + set(define_xopen_source 0) + endif() if(define_xopen_source) diff --git a/cmake/extensions/CMakeLists.txt b/cmake/extensions/CMakeLists.txt index 9aea823e9..5899f6deb 100644 --- a/cmake/extensions/CMakeLists.txt +++ b/cmake/extensions/CMakeLists.txt @@ -1,17 +1,18 @@ -# XXX Because of CMake issue #8170 disable ctypes support when using -# "Visual Studio 2008 Win64" generator. -if("${MSVC_VERSION}" VERSION_EQUAL 1500 AND ${CMAKE_SIZEOF_VOID_P} EQUAL 8) +if(MSVC_VERSION) + # XXX Because of CMake issue #8170 disable ctypes support when using + # "Visual Studio 2008 Win64" generator. + if("${MSVC_VERSION}" VERSION_EQUAL 1500 AND ${CMAKE_SIZEOF_VOID_P} EQUAL 8) set(warn "Disable 'ctypes' and 'ctypes_test' extensions when using 'Visual Studio 2008 Win64' generator. See http://public.kitware.com/Bug/view.php?id=8170 for more details.") if(NOT DEFINED ENABLE_CTYPES OR ENABLE_CTYPES OR NOT DEFINED ENABLE_CTYPES_TEST OR ENABLE_CTYPES_TEST) message(WARNING ${warn}) endif() set(ENABLE_CTYPES OFF CACHE BOOL "${warn}" FORCE) set(ENABLE_CTYPES_TEST OFF CACHE BOOL "${warn}" FORCE) -endif() -# XXX Because of CMake issue #11536, disable ctypes support when using -# CMake < 2.8.12 with "Visual Studio 2010" and "Visual Studio 2010 Win64" -# generator. -if(CMAKE_VERSION VERSION_LESS 2.8.12) + endif() + # XXX Because of CMake issue #11536, disable ctypes support when using + # CMake < 2.8.12 with "Visual Studio 2010" and "Visual Studio 2010 Win64" + # generator. + if(CMAKE_VERSION VERSION_LESS 2.8.12) if("${MSVC_VERSION}" VERSION_EQUAL 1600) set(warn "Disable 'ctypes' and 'ctypes_test' extensions when using CMake < 2.8.12 with any 'Visual Studio 2010' generators. See http://public.kitware.com/Bug/view.php?id=11536 for more details.") if(NOT DEFINED ENABLE_CTYPES OR ENABLE_CTYPES OR NOT DEFINED ENABLE_CTYPES_TEST OR ENABLE_CTYPES_TEST) @@ -20,6 +21,7 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12) set(ENABLE_CTYPES OFF CACHE BOOL "${warn}" FORCE) set(ENABLE_CTYPES_TEST OFF CACHE BOOL "${warn}" FORCE) endif() + endif() endif() set(WIN32_BUILTIN )