summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorMario Emmenlauer <memmenlauer@biodataanalysis.de>2020-09-09 13:38:51 +0200
committerMario Emmenlauer <memmenlauer@biodataanalysis.de>2021-08-30 11:41:54 +0200
commit5a64c7101762535ecce0d43dce717b396748ddac (patch)
tree8499cdc2cf4a63088d890137f9356389bfc4a262 /build
parentee6521514305365b0f95d26dd6e3f46efe338021 (diff)
downloadthrift-5a64c7101762535ecce0d43dce717b396748ddac.tar.gz
Use the cmake-generated thrift config also on MSVC
Diffstat (limited to 'build')
-rw-r--r--build/cmake/ConfigureChecks.cmake17
-rw-r--r--build/cmake/config.h.in5
2 files changed, 19 insertions, 3 deletions
diff --git a/build/cmake/ConfigureChecks.cmake b/build/cmake/ConfigureChecks.cmake
index 276d8ef5e..29b8bbea8 100644
--- a/build/cmake/ConfigureChecks.cmake
+++ b/build/cmake/ConfigureChecks.cmake
@@ -21,6 +21,9 @@ include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckSymbolExists)
+include(CheckStructHasMember)
+include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
if (Inttypes_FOUND)
# This allows the inttypes.h and stdint.h checks to succeed on platforms that
@@ -52,14 +55,24 @@ check_include_file(sched.h HAVE_SCHED_H)
check_include_file(string.h HAVE_STRING_H)
check_include_file(strings.h HAVE_STRINGS_H)
+# Check for afunix.h on Windows (since Windows 10 Insider Build 17063):
+check_cxx_source_compiles(
+ "
+ #define WIN32_LEAN_AND_MEAN
+ #include <winsock2.h>
+ #include <windows.h>
+ #include <afunix.h>
+ int main(){(void)sizeof(((struct sockaddr_un *)0)->sun_path); return 0;}
+ "
+ HAVE_AF_UNIX_H)
+
+
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
check_function_exists(gethostbyname_r HAVE_GETHOSTBYNAME_R)
check_function_exists(strerror_r HAVE_STRERROR_R)
check_function_exists(sched_get_priority_max HAVE_SCHED_GET_PRIORITY_MAX)
check_function_exists(sched_get_priority_min HAVE_SCHED_GET_PRIORITY_MIN)
-include(CheckCSourceCompiles)
-include(CheckCXXSourceCompiles)
check_cxx_source_compiles(
"
diff --git a/build/cmake/config.h.in b/build/cmake/config.h.in
index a3d66428c..afcdc1e6a 100644
--- a/build/cmake/config.h.in
+++ b/build/cmake/config.h.in
@@ -131,7 +131,10 @@
#cmakedefine HAVE_SCHED_H 1
/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
+#cmakedefine HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <afunix.h> header file. */
+#cmakedefine HAVE_AF_UNIX_H 1
/*************************** FUNCTIONS ***************************/