From de1ffdfecd1a80c8e8c4b484361ab3ce3103ff6c Mon Sep 17 00:00:00 2001 From: Martin Oberhuber Date: Fri, 21 Oct 2016 15:13:43 +0200 Subject: [PATCH 1/4] Fix issue #159: Failure when cross-compiling for VxWorks --- cmake/extensions/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/extensions/CMakeLists.txt b/cmake/extensions/CMakeLists.txt index 9aea823e9..d51fe7df1 100644 --- a/cmake/extensions/CMakeLists.txt +++ b/cmake/extensions/CMakeLists.txt @@ -1,3 +1,4 @@ +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) @@ -21,6 +22,7 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12) set(ENABLE_CTYPES_TEST OFF CACHE BOOL "${warn}" FORCE) endif() endif() +endif() set(WIN32_BUILTIN ) if(WIN32) From fdd2c5688b4646543959ca7b6bdc06dffd0793e2 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber Date: Fri, 21 Oct 2016 17:06:10 +0200 Subject: [PATCH 2/4] Fix issue #159: Failure when cross-compiling - cosmetic cleanup --- cmake/extensions/CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cmake/extensions/CMakeLists.txt b/cmake/extensions/CMakeLists.txt index d51fe7df1..5899f6deb 100644 --- a/cmake/extensions/CMakeLists.txt +++ b/cmake/extensions/CMakeLists.txt @@ -1,18 +1,18 @@ -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) +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) @@ -21,7 +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() endif() set(WIN32_BUILTIN ) From ad3274399589c418303f304be1de926d9ac1ecdf Mon Sep 17 00:00:00 2001 From: Martin Oberhuber Date: Fri, 28 Oct 2016 23:15:23 +0200 Subject: [PATCH 3/4] Fix issue #163 - Configure fails when libutil is missing --- cmake/ConfigureChecks.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 863213f81..874224f9e 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) From ef2ddf671f93d8088c05189f4bc141fe45c9e3f5 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber Date: Fri, 28 Oct 2016 23:38:23 +0200 Subject: [PATCH 4/4] Disable _XOPEN_SOURCE for VxWorks due to #include failing --- cmake/ConfigureChecks.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 874224f9e..1ba570f5e 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -542,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)