diff options
Diffstat (limited to 'cmake/os')
-rw-r--r-- | cmake/os/AIX.cmake | 38 | ||||
-rw-r--r-- | cmake/os/Cygwin.cmake | 18 | ||||
-rw-r--r-- | cmake/os/Darwin.cmake | 16 | ||||
-rw-r--r-- | cmake/os/FreeBSD.cmake | 34 | ||||
-rw-r--r-- | cmake/os/GNU.cmake | 30 | ||||
-rw-r--r-- | cmake/os/HP-UX.cmake | 48 | ||||
-rw-r--r-- | cmake/os/Linux.cmake | 42 | ||||
-rw-r--r-- | cmake/os/OS400.cmake | 18 | ||||
-rw-r--r-- | cmake/os/OpenBSD.cmake | 22 | ||||
-rw-r--r-- | cmake/os/SunOS.cmake | 99 | ||||
-rw-r--r-- | cmake/os/Windows.cmake | 345 | ||||
-rw-r--r-- | cmake/os/WindowsCache.cmake | 342 |
12 files changed, 1052 insertions, 0 deletions
diff --git a/cmake/os/AIX.cmake b/cmake/os/AIX.cmake new file mode 100644 index 00000000..299b7919 --- /dev/null +++ b/cmake/os/AIX.cmake @@ -0,0 +1,38 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + + +#Enable 64 bit file offsets +SET(_LARGE_FILES 1) +SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -X32_64 qc <TARGET> <LINK_FLAGS> <OBJECTS>") +SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> -X32_64 q <TARGET> <LINK_FLAGS> <OBJECTS>") +SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> -X32_64 qc <TARGET> <LINK_FLAGS> <OBJECTS>") +SET(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> -X32_64 q <TARGET> <LINK_FLAGS> <OBJECTS>") + +IF(__AIX_COMPILER_XL) +# Fix xlC oddity - it complains about same inline function defined multiple times +# in different compilation units +INCLUDE(CheckCXXCompilerFlag) + CHECK_CXX_COMPILER_FLAG("-qstaticinline" HAVE_QSTATICINLINE) + IF(HAVE_QSTATICINLINE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qstaticinline") + ENDIF() +ELSE() + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large") +ENDIF() + +# make it WARN by default, not AUTO (that implies -Werror) +SET(MYSQL_MAINTAINER_MODE "WARN" CACHE STRING "Enable MariaDB maintainer-specific warnings. One of: NO (warnings are disabled) WARN (warnings are enabled) ERR (warnings are errors) AUTO (warnings are errors in Debug only)") diff --git a/cmake/os/Cygwin.cmake b/cmake/os/Cygwin.cmake new file mode 100644 index 00000000..a5424165 --- /dev/null +++ b/cmake/os/Cygwin.cmake @@ -0,0 +1,18 @@ +# Copyright (c) 2010 Sun Microsystems, Inc. +# Use is subject to license terms. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +# Cygwin is not Windows +SET(WIN32 0)
\ No newline at end of file diff --git a/cmake/os/Darwin.cmake b/cmake/os/Darwin.cmake new file mode 100644 index 00000000..21e18360 --- /dev/null +++ b/cmake/os/Darwin.cmake @@ -0,0 +1,16 @@ +# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +# This file includes OSX specific options and quirks, related to system checks diff --git a/cmake/os/FreeBSD.cmake b/cmake/os/FreeBSD.cmake new file mode 100644 index 00000000..9d3673aa --- /dev/null +++ b/cmake/os/FreeBSD.cmake @@ -0,0 +1,34 @@ + +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +# This file includes FreeBSD specific options and quirks, related to system checks + +# Should not be needed any more, but kept for easy resurrection if needed +# #Legacy option, maybe not needed anymore , taken as is from autotools build +# ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000) + +# The below was used for really old versions of FreeBSD, roughly: before 5.1.9 +# ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH) + +# Find libexecinfo (library that contains backtrace_symbols etc) +SET(EXECINFO_ROOT /usr/local CACHE INTERNAL "Where to find execinfo library and header") +INCLUDE_DIRECTORIES(${EXECINFO_ROOT}/include) +SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${EXECINFO_ROOT}/include) +SET(ENV{LIB} "$ENV{LIB}:${EXECINFO_ROOT}/lib") +FIND_LIBRARY(EXECINFO NAMES execinfo) +IF(EXECINFO) + SET(LIBEXECINFO ${EXECINFO}) +ENDIF() diff --git a/cmake/os/GNU.cmake b/cmake/os/GNU.cmake new file mode 100644 index 00000000..898241e6 --- /dev/null +++ b/cmake/os/GNU.cmake @@ -0,0 +1,30 @@ +# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# This file includes GNU/Hurd specific options and quirks, related to system checks + +# Something that needs to be set on legacy reasons +SET(_GNU_SOURCE 1) +SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE=1) + +# Ensure we have clean build for shared libraries +# without unresolved symbols +# Not supported with AddressSanitizer and ThreadSanitizer +IF(NOT WITH_ASAN AND NOT WITH_TSAN) + SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined") +ENDIF() + +# 64 bit file offset support flag +SET(_FILE_OFFSET_BITS 64) diff --git a/cmake/os/HP-UX.cmake b/cmake/os/HP-UX.cmake new file mode 100644 index 00000000..5bbc7994 --- /dev/null +++ b/cmake/os/HP-UX.cmake @@ -0,0 +1,48 @@ +# Copyright (c) 2010 Sun Microsystems, Inc. +# Use is subject to license terms. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +INCLUDE(CheckCXXSourceCompiles) +# Enable 64 bit file offsets +SET(_LARGEFILE64_SOURCE 1) +SET(_FILE_OFFSET_BITS 64) +# If Itanium make shared library suffix .so +# OS understands both .sl and .so. CMake would +# use .sl, however MySQL prefers .so +IF(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "9000") + SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so" CACHE INTERNAL "" FORCE) + SET(CMAKE_SHARED_MODULE_SUFFIX ".so" CACHE INTERNAL "" FORCE) +ENDIF() +IF(CMAKE_SYSTEM MATCHES "11") + ADD_DEFINITIONS(-DHPUX11) +ENDIF() + +IF(CMAKE_CXX_COMPILER_ID MATCHES "HP") + # Enable standard C++ flags if required + # HP seems a bit traditional and "new" features like ANSI for-scope + # still require special flag to be set + CHECK_CXX_SOURCE_COMPILES( + "int main() + { + for(int i=0; i<1; i++); + for(int i=0; i<1; i++); + return 0; + } + " HAVE_ANSI_FOR_SCOPE) + IF(NOT HAVE_ANSI_FOR_SCOPE) + # Enable conformant behavior + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Aa") + ENDIF() +ENDIF() diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake new file mode 100644 index 00000000..0ce48cc2 --- /dev/null +++ b/cmake/os/Linux.cmake @@ -0,0 +1,42 @@ + +# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +# This file includes Linux specific options and quirks, related to system checks + +INCLUDE(CheckSymbolExists) + +# Something that needs to be set on legacy reasons +SET(TARGET_OS_LINUX 1) +SET(_GNU_SOURCE 1) +SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE=1) + +# Fix CMake (< 2.8) flags. -rdynamic exports too many symbols. +FOREACH(LANG C CXX) + STRING(REPLACE "-rdynamic" "" + CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS + "${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}" + ) +ENDFOREACH() + +# Ensure we have clean build for shared libraries +# without unresolved symbols +# Not supported with the clang sanitizers +IF(NOT WITH_ASAN AND NOT WITH_TSAN AND NOT WITH_UBSAN) + SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined") +ENDIF() + +# 64 bit file offset support flag +SET(_FILE_OFFSET_BITS 64) diff --git a/cmake/os/OS400.cmake b/cmake/os/OS400.cmake new file mode 100644 index 00000000..5a9b2aba --- /dev/null +++ b/cmake/os/OS400.cmake @@ -0,0 +1,18 @@ +# Copyright (c) 2010 Sun Microsystems, Inc. +# Use is subject to license terms. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +GET_FILENAME_COMPONENT(_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) +INCLUDE(${_SCRIPT_DIR}/AIX.cmake)
\ No newline at end of file diff --git a/cmake/os/OpenBSD.cmake b/cmake/os/OpenBSD.cmake new file mode 100644 index 00000000..c8b91944 --- /dev/null +++ b/cmake/os/OpenBSD.cmake @@ -0,0 +1,22 @@ +# Copyright (C) 2012 Monty Program Ab, 2021 Brad Smith +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +# This file includes OpenBSD specific options and quirks, related to system checks + +# Find libexecinfo (library that contains backtrace_symbols etc) +FIND_LIBRARY(EXECINFO NAMES execinfo) +IF(EXECINFO) + SET(LIBEXECINFO ${EXECINFO}) +ENDIF() diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake new file mode 100644 index 00000000..3a9d2dcc --- /dev/null +++ b/cmake/os/SunOS.cmake @@ -0,0 +1,99 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +INCLUDE(CheckSymbolExists) +INCLUDE(CheckCSourceRuns) +INCLUDE(CheckCSourceCompiles) + +# Enable 64 bit file offsets +SET(_FILE_OFFSET_BITS 64) + +# Legacy option, without it my_pthread is having problems +ADD_DEFINITIONS(-DHAVE_RWLOCK_T) + +# On Solaris, use of intrinsics will screw the lib search logic +# Force using -lm, so rint etc are found. +SET(LIBM m) + +# CMake defined -lthread as thread flag. This crashes in dlopen +# when trying to load plugins workaround with -lpthread +SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "" FORCE) + +# Solaris specific large page support +CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h HAVE_DECL_MHA_MAPSIZE_VA) +IF(HAVE_DECL_MHA_MAPSIZE_VA) + SET(HAVE_SOLARIS_LARGE_PAGES 1) +ENDIF() + + +# Solaris atomics +CHECK_C_SOURCE_RUNS( + " + #include <atomic.h> + int main() + { + int foo = -10; int bar = 10; + int64_t foo64 = -10; int64_t bar64 = 10; + if (atomic_add_int_nv((uint_t *)&foo, bar) || foo) + return -1; + bar = atomic_swap_uint((uint_t *)&foo, (uint_t)bar); + if (bar || foo != 10) + return -1; + bar = atomic_cas_uint((uint_t *)&bar, (uint_t)foo, 15); + if (bar) + return -1; + if (atomic_add_64_nv((volatile uint64_t *)&foo64, bar64) || foo64) + return -1; + bar64 = atomic_swap_64((volatile uint64_t *)&foo64, (uint64_t)bar64); + if (bar64 || foo64 != 10) + return -1; + bar64 = atomic_cas_64((volatile uint64_t *)&bar64, (uint_t)foo64, 15); + if (bar64) + return -1; + atomic_or_64((volatile uint64_t *)&bar64, 0); + return 0; + } +" HAVE_SOLARIS_ATOMIC) + + +# Check is special processor flag needs to be set on older GCC +#that defaults to v8 sparc . Code here is taken from my_rdtsc.h +IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SIZEOF_VOID_P EQUAL 4 + AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") + SET(SOURCE + " + int main() + { + long high\; + long low\; + __asm __volatile__ (\"rd %%tick,%1\; srlx %1,32,%0\" : \"=r\" ( high), \"=r\" (low))\; + return 0\; + } ") + CHECK_C_SOURCE_COMPILES(${SOURCE} HAVE_SPARC32_TICK) + IF(NOT HAVE_SPARC32_TICK) + SET(CMAKE_REQUIRED_FLAGS "-mcpu=v9") + CHECK_C_SOURCE_COMPILES(${SOURCE} HAVE_SPARC32_TICK_WITH_V9) + SET(CMAKE_REQUIRED_FLAGS) + IF(HAVE_SPARC32_TICK_WITH_V9) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcpu=v9") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=v9") + ENDIF() + ENDIF() +ENDIF() + +IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") + # Unnamed structs and unions + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -features=extensions") +ENDIF() diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake new file mode 100644 index 00000000..71ad4ab0 --- /dev/null +++ b/cmake/os/Windows.cmake @@ -0,0 +1,345 @@ +# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +# This file includes Windows specific hacks, mostly around compiler flags + +INCLUDE (CheckCSourceCompiles) +INCLUDE (CheckCXXSourceCompiles) +INCLUDE (CheckStructHasMember) +INCLUDE (CheckLibraryExists) +INCLUDE (CheckFunctionExists) +INCLUDE (CheckCSourceRuns) +INCLUDE (CheckSymbolExists) +INCLUDE (CheckTypeSize) + + +# avoid running system checks by using pre-cached check results +# system checks are expensive on VS since every tiny program is to be compiled in +# a VC solution. +GET_FILENAME_COMPONENT(_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) +INCLUDE(${_SCRIPT_DIR}/WindowsCache.cmake) + + +# OS display name (version_compile_os etc). +# Used by the test suite to ignore bugs on some platforms, +IF(CMAKE_SIZEOF_VOID_P MATCHES 8) + SET(SYSTEM_TYPE "Win64") +ELSE() + SET(SYSTEM_TYPE "Win32") +ENDIF() + +# Intel compiler is almost Visual C++ +# (same compile flags etc). Set MSVC flag +IF(CMAKE_C_COMPILER MATCHES "icl") + SET(MSVC TRUE) +ENDIF() + +IF(MSVC AND CMAKE_CXX_COMPILER_ID MATCHES Clang) + SET(CLANG_CL TRUE) +ENDIF() + +ADD_DEFINITIONS(-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE) +ADD_DEFINITIONS(-D_WIN32_WINNT=0x0A00) +# We do not want the windows.h macros min/max +ADD_DEFINITIONS(-DNOMINMAX) +# Speed up build process excluding unused header files +ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) + +# Adjust compiler and linker flags +IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4) + # mininal architecture flags, i486 enables GCC atomics + ADD_DEFINITIONS(-march=i486) +ENDIF() + +MACRO(ENABLE_SANITIZERS) + IF(NOT MSVC) + MESSAGE(FATAL_ERROR "clang-cl or MSVC necessary to enable asan/ubsan") + ENDIF() + # currently, asan is broken with static CRT. + IF(CLANG_CL AND NOT(MSVC_CRT_TYPE STREQUAL "/MD")) + SET(MSVC_CRT_TYPE "/MD" CACHE INTERNAL "" FORCE) + ENDIF() + IF(CMAKE_SIZEOF_VOID_P EQUAL 4) + SET(ASAN_ARCH i386) + ELSE() + SET(ASAN_ARCH x86_64) + ENDIF() + + # After installation, clang lib directory should be added to PATH + # (e.g C:/Program Files/LLVM/lib/clang/5.0.1/lib/windows) + SET(SANITIZER_LIBS) + SET(SANITIZER_LINK_LIBRARIES) + SET(SANITIZER_COMPILE_FLAGS) + IF(WITH_ASAN) + IF(CLANG_CL) + LIST(APPEND SANITIZER_LIBS + clang_rt.asan_dynamic-${ASAN_ARCH}.lib clang_rt.asan_dynamic_runtime_thunk-${ASAN_ARCH}.lib) + ENDIF() + STRING(APPEND SANITIZER_COMPILE_FLAGS " -fsanitize=address") + ENDIF() + IF(WITH_UBSAN) + STRING(APPEND SANITIZER_COMPILE_FLAGS " -fsanitize=undefined -fno-sanitize=alignment") + ENDIF() + FOREACH(lib ${SANITIZER_LIBS}) + FIND_LIBRARY(${lib}_fullpath ${lib}) + IF(NOT ${lib}_fullpath) + MESSAGE(FATAL_ERROR "Can't enable sanitizer : missing ${lib}") + ENDIF() + LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${${lib}_fullpath}) + STRING(APPEND CMAKE_C_STANDARD_LIBRARIES " \"${${lib}_fullpath}\" ") + STRING(APPEND CMAKE_CXX_STANDARD_LIBRARIES " \"${${lib}_fullpath}\" ") + ENDFOREACH() + STRING(APPEND CMAKE_C_FLAGS ${SANITIZER_COMPILE_FLAGS}) + STRING(APPEND CMAKE_CXX_FLAGS ${SANITIZER_COMPILE_FLAGS}) +ENDMACRO() + + +IF(MSVC) + IF(MSVC_VERSION LESS 1920) + MESSAGE(FATAL_ERROR "Visual Studio q2019 or later is required") + ENDIF() + # Disable mingw based pkg-config found in Strawberry perl + SET(PKG_CONFIG_EXECUTABLE 0 CACHE INTERNAL "") + + SET(MSVC_CRT_TYPE /MT CACHE STRING + "Runtime library - specify runtime library for linking (/MT,/MTd,/MD,/MDd)" + ) + SET(VALID_CRT_TYPES /MTd /MDd /MD /MT) + IF (NOT ";${VALID_CRT_TYPES};" MATCHES ";${MSVC_CRT_TYPE};") + MESSAGE(FATAL_ERROR "Invalid value ${MSVC_CRT_TYPE} for MSVC_CRT_TYPE, choose one of /MT,/MTd,/MD,/MDd ") + ENDIF() + + IF(MSVC_CRT_TYPE MATCHES "/MD") + # Dynamic runtime (DLLs), need to install CRT libraries. + SET(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT VCCRT) + SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS TRUE) + IF(MSVC_CRT_TYPE STREQUAL "/MDd") + SET (CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + ENDIF() + INCLUDE(InstallRequiredSystemLibraries) + ENDIF() + + IF(WITH_ASAN AND (NOT CLANG_CL)) + SET(DYNAMIC_UCRT_LINK_DEFAULT OFF) + ELSE() + SET(DYNAMIC_UCRT_LINK_DEFAULT ON) + ENDIF() + + OPTION(DYNAMIC_UCRT_LINK "Link Universal CRT dynamically, if MSVC_CRT_TYPE=/MT" ${DYNAMIC_UCRT_LINK_DEFAULT}) + SET(DYNAMIC_UCRT_LINKER_OPTION " /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib") + + # Enable debug info also in Release build, + # and create PDB to be able to analyze crashes. + FOREACH(type EXE SHARED MODULE) + SET(CMAKE_${type}_LINKER_FLAGS_RELEASE + "${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug") + SET(CMAKE_${type}_LINKER_FLAGS_MINSIZEREL + "${CMAKE_${type}_LINKER_FLAGS_MINSIZEREL} /debug") + ENDFOREACH() + + # Force runtime libraries + # Compile with /Zi to get debugging information + + FOREACH(lang C CXX) + SET(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE} /Zi") + ENDFOREACH() + FOREACH(flag + CMAKE_C_FLAGS CMAKE_CXX_FLAGS + CMAKE_C_FLAGS_INIT CMAKE_CXX_FLAGS_INIT + CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO + CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT + CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO + CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT + CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL + ) + STRING(REGEX REPLACE "/M[TD][d]?" "${MSVC_CRT_TYPE}" "${flag}" "${${flag}}" ) + STRING(REPLACE "/ZI " "/Zi " "${flag}" "${${flag}}") + IF((NOT "${${flag}}" MATCHES "/Zi") AND (NOT "${${flag}}" MATCHES "/Z7")) + STRING(APPEND ${flag} " /Zi") + ENDIF() + ENDFOREACH() + + IF(WITH_ASAN OR WITH_UBSAN) + # Workaround something Linux specific + SET(SECURITY_HARDENED 0 CACHE INTERNAL "" FORCE) + ENABLE_SANITIZERS() + ENDIF() + + IF(CLANG_CL) + SET(CLANG_CL_FLAGS +"-Wno-unknown-warning-option -Wno-unused-private-field \ +-Wno-unused-parameter -Wno-inconsistent-missing-override \ +-Wno-unused-command-line-argument -Wno-pointer-sign \ +-Wno-deprecated-register -Wno-missing-braces \ +-Wno-unused-function -Wno-unused-local-typedef -msse4.2 " + ) + IF(CMAKE_SIZEOF_VOID_P MATCHES 8) + STRING(APPEND CLANG_CL_FLAGS "-mpclmul ") + ENDIF() + STRING(APPEND CMAKE_C_FLAGS " ${CLANG_CL_FLAGS} ${MSVC_CRT_TYPE}") + STRING(APPEND CMAKE_CXX_FLAGS " ${CLANG_CL_FLAGS} ${MSVC_CRT_TYPE}") + ENDIF() + + FOREACH(type EXE SHARED MODULE) + STRING(REGEX REPLACE "/STACK:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS "${CMAKE_${type}_LINKER_FLAGS}") + IF(WITH_ASAN) + SET(build_types RELWITHDEBINFO DEBUG) + ELSE() + SET(build_types RELWITHDEBINFO) + ENDIF() + FOREACH(btype ${build_types}) + STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_${btype} "${CMAKE_${type}_LINKER_FLAGS_${btype}}") + STRING(REGEX REPLACE "/INCREMENTAL$" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_${btype} "${CMAKE_${type}_LINKER_FLAGS_${btype}}") + ENDFOREACH() + IF(NOT CLANG_CL) + STRING(APPEND CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO " /release /OPT:REF,ICF") + ENDIF() + IF(DYNAMIC_UCRT_LINK AND (MSVC_CRT_TYPE STREQUAL "/MT")) + FOREACH(config RELEASE RELWITHDEBINFO DEBUG MINSIZEREL) + STRING(APPEND CMAKE_${type}_LINKER_FLAGS_${config} ${DYNAMIC_UCRT_LINKER_OPTION}) + ENDFOREACH() + ENDIF() + ENDFOREACH() + + + # Mark 32 bit executables large address aware so they can + # use > 2GB address space + IF(CMAKE_SIZEOF_VOID_P MATCHES 4) + STRING(APPEND CMAKE_EXE_LINKER_FLAGS " /LARGEADDRESSAWARE") + ENDIF() + + # Speed up multiprocessor build + IF (NOT CLANG_CL) + STRING(APPEND CMAKE_C_FLAGS " /MP") + STRING(APPEND CMAKE_CXX_FLAGS " /MP") + STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " /Gw") + STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /Gw") + ENDIF() + + #TODO: update the code and remove the disabled warnings + STRING(APPEND CMAKE_C_FLAGS " /we4700 /we4311 /we4477 /we4302 /we4090") + STRING(APPEND CMAKE_CXX_FLAGS " /we4099 /we4700 /we4311 /we4477 /we4302 /we4090") + IF(MSVC_VERSION GREATER 1910 AND NOT CLANG_CL) + STRING(APPEND CMAKE_CXX_FLAGS " /permissive-") + STRING(APPEND CMAKE_C_FLAGS " /diagnostics:caret") + STRING(APPEND CMAKE_CXX_FLAGS " /diagnostics:caret") + ENDIF() + ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNINGS) + IF(MYSQL_MAINTAINER_MODE MATCHES "ERR") + STRING(APPEND CMAKE_C_FLAGS " /WX") + STRING(APPEND CMAKE_CXX_FLAGS " /WX") + FOREACH(type EXE SHARED MODULE) + FOREACH(cfg RELEASE DEBUG RELWITHDEBINFO) + SET(CMAKE_${type}_LINKER_FLAGS_${cfg} "${CMAKE_${type}_LINKER_FLAGS_${cfg}} /WX") + ENDFOREACH() + ENDFOREACH() + ENDIF() + IF(MSVC_VERSION LESS 1910) + # Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning), + # removed in VS2017 + STRING(APPEND CMAKE_CXX_FLAGS " /wd4800") + ELSEIF (NOT CLANG_CL) + STRING(APPEND CMAKE_CXX_FLAGS " /d2OptimizeHugeFunctions") + ENDIF() +ENDIF() + +# Always link with socket/synchronization libraries +STRING(APPEND CMAKE_C_STANDARD_LIBRARIES " ws2_32.lib synchronization.lib") +STRING(APPEND CMAKE_CXX_STANDARD_LIBRARIES " ws2_32.lib synchronization.lib") + +# System checks +SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs + +# IPv6 constants appeared in Vista SDK first. We need to define them in any case if they are +# not in headers, to handle dual mode sockets correctly. +CHECK_SYMBOL_EXISTS(IPPROTO_IPV6 "winsock2.h" HAVE_IPPROTO_IPV6) +IF(NOT HAVE_IPPROTO_IPV6) + SET(HAVE_IPPROTO_IPV6 41) +ENDIF() +CHECK_SYMBOL_EXISTS(IPV6_V6ONLY "winsock2.h;ws2ipdef.h" HAVE_IPV6_V6ONLY) +IF(NOT HAVE_IPV6_V6ONLY) + SET(IPV6_V6ONLY 27) +ENDIF() + +# Some standard functions exist there under different +# names (e.g popen is _popen or strok_r is _strtok_s) +# If a replacement function exists, HAVE_FUNCTION is +# defined to 1. CMake variable <function_name> will also +# be defined to the replacement name. +# So for example, CHECK_FUNCTION_REPLACEMENT(popen _popen) +# will define HAVE_POPEN to 1 and set variable named popen +# to _popen. If the header template, one needs to have +# cmakedefine popen @popen@ which will expand to +# define popen _popen after CONFIGURE_FILE + +MACRO(CHECK_FUNCTION_REPLACEMENT function replacement) + STRING(TOUPPER ${function} function_upper) + CHECK_FUNCTION_EXISTS(${function} HAVE_${function_upper}) + IF(NOT HAVE_${function_upper}) + CHECK_FUNCTION_EXISTS(${replacement} HAVE_${replacement}) + IF(HAVE_${replacement}) + SET(HAVE_${function_upper} 1 ) + SET(${function} ${replacement}) + ENDIF() + ENDIF() +ENDMACRO() +MACRO(CHECK_SYMBOL_REPLACEMENT symbol replacement header) + STRING(TOUPPER ${symbol} symbol_upper) + CHECK_SYMBOL_EXISTS(${symbol} ${header} HAVE_${symbol_upper}) + IF(NOT HAVE_${symbol_upper}) + CHECK_SYMBOL_EXISTS(${replacement} ${header} HAVE_${replacement}) + IF(HAVE_${replacement}) + SET(HAVE_${symbol_upper} 1) + SET(${symbol} ${replacement}) + ENDIF() + ENDIF() +ENDMACRO() + +CHECK_SYMBOL_REPLACEMENT(S_IROTH _S_IREAD sys/stat.h) +CHECK_SYMBOL_REPLACEMENT(S_IFIFO _S_IFIFO sys/stat.h) +CHECK_SYMBOL_REPLACEMENT(SIGQUIT SIGTERM signal.h) +CHECK_SYMBOL_REPLACEMENT(SIGPIPE SIGINT signal.h) +CHECK_FUNCTION_REPLACEMENT(popen _popen) +CHECK_FUNCTION_REPLACEMENT(pclose _pclose) +CHECK_FUNCTION_REPLACEMENT(access _access) +CHECK_FUNCTION_REPLACEMENT(strcasecmp _stricmp) +CHECK_FUNCTION_REPLACEMENT(strncasecmp _strnicmp) +CHECK_SYMBOL_REPLACEMENT(snprintf _snprintf stdio.h) +CHECK_FUNCTION_REPLACEMENT(strtok_r strtok_s) +CHECK_FUNCTION_REPLACEMENT(strtoll _strtoi64) +CHECK_FUNCTION_REPLACEMENT(strtoull _strtoui64) +CHECK_FUNCTION_REPLACEMENT(vsnprintf _vsnprintf) +CHECK_TYPE_SIZE(ssize_t SIZE_OF_SSIZE_T) +IF(NOT HAVE_SIZE_OF_SSIZE_T) + SET(ssize_t SSIZE_T) +ENDIF() + +SET(FN_NO_CASE_SENSE 1) +SET(USE_SYMDIR 1) + +# Force static C runtime for targets in current directory +# (useful to get rid of MFC dll's dependency, or in installer) +MACRO(FORCE_STATIC_CRT) + FOREACH(flag + CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO + CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT + CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO + CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT + CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL + ) + STRING(REGEX REPLACE "/MD[d]?" "/MT" "${flag}" "${${flag}}" ) + STRING(REPLACE "${DYNAMIC_UCRT_LINKER_OPTION}" "" "${flag}" "${${flag}}") + ENDFOREACH() +ENDMACRO() diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake new file mode 100644 index 00000000..e2a4aa9e --- /dev/null +++ b/cmake/os/WindowsCache.cmake @@ -0,0 +1,342 @@ +# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA + +# Avoid system checks on Windows by pre-caching results. Most of the system checks +# are not relevant for Windows anyway and it takes lot more time to run them, +# since CMake to creates a Visual Studio project for each tiny test. +# Note that only we cache values on VC++ only, MinGW would give slightly +# different results. + +IF(MSVC) +SET(BFD_H_EXISTS 0 CACHE INTERNAL "") +SET(HAVE_ACCESS 1 CACHE INTERNAL "") +SET(HAVE_ALARM CACHE INTERNAL "") +SET(HAVE_ALLOCA_H CACHE INTERNAL "") +SET(HAVE_ARPA_INET_H CACHE INTERNAL "") +SET(HAVE_BACKTRACE CACHE INTERNAL "") +SET(HAVE_BACKTRACE_SYMBOLS CACHE INTERNAL "") +SET(HAVE_BACKTRACE_SYMBOLS_FD CACHE INTERNAL "") +SET(HAVE_BFILL CACHE INTERNAL "") +SET(HAVE_BSD_SIGNALS CACHE INTERNAL "") +SET(HAVE_CLOCK_GETTIME CACHE INTERNAL "") +SET(HAVE_COMPRESS CACHE INTERNAL "") +SET(HAVE_CRYPT CACHE INTERNAL "") +SET(HAVE_CRYPT_H CACHE INTERNAL "") +SET(HAVE_CUSERID CACHE INTERNAL "") +SET(HAVE_DECL_MADVISE CACHE INTERNAL "") +SET(HAVE_DIRENT_H CACHE INTERNAL "") +SET(HAVE_DLERROR CACHE INTERNAL "") +SET(HAVE_DLFCN_H CACHE INTERNAL "") +SET(HAVE_DLOPEN CACHE INTERNAL "") +SET(HAVE_EXECINFO_H CACHE INTERNAL "") +SET(HAVE_FCHMOD CACHE INTERNAL "") +SET(HAVE_FCNTL CACHE INTERNAL "") +SET(HAVE_FCNTL_H 1 CACHE INTERNAL "") +SET(HAVE_FCNTL_NONBLOCK CACHE INTERNAL "") +SET(HAVE_FDATASYNC CACHE INTERNAL "") +SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "") +SET(HAVE_FEDISABLEEXCEPT CACHE INTERNAL "") +SET(HAVE_FENV_H CACHE INTERNAL "") +SET(HAVE_FESETROUND CACHE INTERNAL "") +SET(HAVE_FLOAT_H 1 CACHE INTERNAL "") +SET(HAVE_FNMATCH_H CACHE INTERNAL "") +SET(HAVE_FPU_CONTROL_H CACHE INTERNAL "") +SET(HAVE_FSEEKO CACHE INTERNAL "") +SET(HAVE_FSYNC CACHE INTERNAL "") +SET(HAVE_FTIME 1 CACHE INTERNAL "") +SET(HAVE_FTRUNCATE CACHE INTERNAL "") +SET(HAVE_GETIFADDRS CACHE INTERNAL "") +SET(HAVE_GETCWD 1 CACHE INTERNAL "") +SET(HAVE_GETHOSTBYADDR_R CACHE INTERNAL "") +SET(HAVE_GETHRTIME CACHE INTERNAL "") +SET(HAVE_GETPAGESIZE CACHE INTERNAL "") +SET(HAVE_GETPASS CACHE INTERNAL "") +SET(HAVE_GETPASSPHRASE CACHE INTERNAL "") +SET(HAVE_GETPWNAM CACHE INTERNAL "") +SET(HAVE_GETPWUID CACHE INTERNAL "") +SET(HAVE_GETRLIMIT CACHE INTERNAL "") +SET(HAVE_GETRUSAGE CACHE INTERNAL "") +SET(HAVE_GETTIMEOFDAY CACHE INTERNAL "") +SET(HAVE_GETWD CACHE INTERNAL "") +SET(HAVE_GMTIME_R 1 CACHE INTERNAL "") +SET(HAVE_GRP_H CACHE INTERNAL "") +SET(HAVE_IA64INTRIN_H CACHE INTERNAL "") +SET(HAVE_IEEEFP_H CACHE INTERNAL "") +SET(HAVE_INDEX CACHE INTERNAL "") +SET(HAVE_INITGROUPS CACHE INTERNAL "") +SET(HAVE_INTTYPES_H CACHE INTERNAL "") +SET(HAVE_IPPROTO_IPV6 CACHE INTERNAL "") +SET(HAVE_IPV6 TRUE CACHE INTERNAL "") +SET(HAVE_IPV6_V6ONLY 1 CACHE INTERNAL "") +SET(HAVE_LANGINFO_H CACHE INTERNAL "") +SET(HAVE_LDIV 1 CACHE INTERNAL "") +SET(HAVE_LIMITS_H 1 CACHE INTERNAL "") +SET(HAVE_LINUX_MMAN_H CACHE INTERNAL "") +SET(HAVE_LOCALE_H 1 CACHE INTERNAL "") +SET(HAVE_LOCALTIME_R 1 CACHE INTERNAL "") +SET(HAVE_LRAND48 CACHE INTERNAL "") +SET(HAVE_LSTAT CACHE INTERNAL "") +SET(HAVE_MADVISE CACHE INTERNAL "") +SET(HAVE_MALLINFO CACHE INTERNAL "") +SET(HAVE_MALLINFO2 CACHE INTERNAL "") +SET(HAVE_MALLOC_H 1 CACHE INTERNAL "") +SET(HAVE_MALLOC_ZONE CACHE INTERNAL "") +SET(HAVE_MEMALIGN CACHE INTERNAL "") +SET(HAVE_MEMCPY 1 CACHE INTERNAL "") +SET(HAVE_MEMMOVE 1 CACHE INTERNAL "") +SET(HAVE_MEMORY_H 1 CACHE INTERNAL "") +SET(HAVE_MKSTEMP CACHE INTERNAL "") +SET(HAVE_MKOSTEMP CACHE INTERNAL "") +SET(HAVE_MLOCK CACHE INTERNAL "") +SET(HAVE_MLOCKALL CACHE INTERNAL "") +SET(HAVE_MMAP CACHE INTERNAL "") +SET(HAVE_MMAP64 CACHE INTERNAL "") +SET(HAVE_NETDB_H CACHE INTERNAL "") +SET(HAVE_NETINET_IN6_H CACHE INTERNAL "") +SET(HAVE_NETINET_IN_H CACHE INTERNAL "") +SET(HAVE_NL_LANGINFO CACHE INTERNAL "") +SET(HAVE_PASE_ENVIRONMENT CACHE INTERNAL "") +SET(HAVE_PATHS_H CACHE INTERNAL "") +SET(HAVE_PCLOSE CACHE INTERNAL "") +SET(HAVE_PERROR 1 CACHE INTERNAL "") +SET(HAVE_PEERCRED CACHE INTERNAL "") +SET(HAVE_PAM_APPL_H CACHE INTERNAL "") +SET(HAVE_POLL_H CACHE INTERNAL "") +SET(HAVE_POPEN CACHE INTERNAL "") +SET(HAVE_POLL CACHE INTERNAL "") +SET(HAVE_POSIX_FALLOCATE CACHE INTERNAL "") +SET(HAVE_POSIX_SIGNALS CACHE INTERNAL "") +SET(HAVE_PREAD CACHE INTERNAL "") +SET(HAVE_PRINTSTACK CACHE INTERNAL "") +SET(HAVE_PTHREAD_ATTR_CREATE CACHE INTERNAL "") +SET(HAVE_PTHREAD_ATTR_GETSTACKSIZE CACHE INTERNAL "") +SET(HAVE_PTHREAD_ATTR_SETSCOPE CACHE INTERNAL "") +SET(HAVE_PTHREAD_ATTR_SETSTACKSIZE CACHE INTERNAL "") +SET(HAVE_PTHREAD_CONDATTR_CREATE CACHE INTERNAL "") +SET(HAVE_PTHREAD_GETAFFINITY_NP CACHE INTERNAL "") +SET(HAVE_PTHREAD_INIT CACHE INTERNAL "") +SET(HAVE_PTHREAD_KEY_DELETE CACHE INTERNAL "") +SET(HAVE_PTHREAD_RWLOCK_RDLOCK CACHE INTERNAL "") +SET(HAVE_PTHREAD_SIGMASK CACHE INTERNAL "") +SET(HAVE_PTHREAD_YIELD_NP CACHE INTERNAL "") +SET(HAVE_PTHREAD_YIELD_ZERO_ARG CACHE INTERNAL "") +SET(HAVE_PUTENV 1 CACHE INTERNAL "") +SET(HAVE_PWD_H CACHE INTERNAL "") +SET(HAVE_READDIR_R CACHE INTERNAL "") +SET(HAVE_READLINK CACHE INTERNAL "") +SET(HAVE_READ_REAL_TIME CACHE INTERNAL "") +SET(HAVE_REALPATH CACHE INTERNAL "") +SET(HAVE_RENAME 1 CACHE INTERNAL "") +SET(HAVE_RWLOCK_INIT CACHE INTERNAL "") +SET(HAVE_SCHED_H CACHE INTERNAL "") +SET(HAVE_SCHED_YIELD CACHE INTERNAL "") +SET(HAVE_SELECT 1 CACHE INTERNAL "") +SET(HAVE_SELECT_H CACHE INTERNAL "") +SET(HAVE_SETENV CACHE INTERNAL "") +SET(HAVE_SETLOCALE 1 CACHE INTERNAL "") +SET(HAVE_SIGACTION CACHE INTERNAL "") +SET(HAVE_SIGINT 1 CACHE INTERNAL "") +SET(HAVE_SIGPIPE CACHE INTERNAL "") +SET(HAVE_SIGQUIT CACHE INTERNAL "") +SET(HAVE_SIGSET CACHE INTERNAL "") +SET(HAVE_SIGTERM 1 CACHE INTERNAL "") +SET(HAVE_SIGTHREADMASK CACHE INTERNAL "") +SET(HAVE_SIGWAIT CACHE INTERNAL "") +SET(HAVE_SIGWAITINFO CACHE INTERNAL "") +SET(HAVE_SIZEOF_CHARP TRUE CACHE INTERNAL "") +SET(SIZEOF_CHARP ${CMAKE_SIZEOF_VOID_P} CACHE INTERNAL "") +SET(HAVE_SIZEOF_IN6_ADDR TRUE CACHE INTERNAL "") +SET(HAVE_SIZEOF_INT TRUE CACHE INTERNAL "") +SET(SIZEOF_INT 4 CACHE INTERNAL "") +SET(HAVE_SIZEOF_INT16 FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_INT32 FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_INT64 FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_INT8 FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_LONG TRUE CACHE INTERNAL "") +SET(SIZEOF_LONG 4 CACHE INTERNAL "") +SET(HAVE_SIZEOF_LONG_LONG TRUE CACHE INTERNAL "") +SET(SIZEOF_LONG_LONG 8 CACHE INTERNAL "") +SET(HAVE_SIZEOF_MODE_T FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_OFF_T TRUE CACHE INTERNAL "") +SET(SIZEOF_OFF_T 4 CACHE INTERNAL "") +SET(HAVE_SIZEOF_SIGSET_T FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_SIZE_T TRUE CACHE INTERNAL "") +SET(SIZEOF_SIZE_T ${CMAKE_SIZEOF_VOID_P} CACHE INTERNAL "") +SET(HAVE_SIZEOF_SOCKADDR_IN6 TRUE CACHE INTERNAL "") +SET(HAVE_SIZEOF_UCHAR FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_UINT FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_UINT16 FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_UINT32 FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_UINT64 FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_UINT8 FALSE CACHE INTERNAL "") +SET(HAVE_SIZEOF_ULONG FALSE CACHE INTERNAL "") +SET(HAVE_SIZE_OF_SSIZE_T FALSE CACHE INTERNAL "") +SET(HAVE_SLEEP CACHE INTERNAL "") +SET(HAVE_SOCKADDR_STORAGE_SS_FAMILY 1 CACHE INTERNAL "") +SET(HAVE_SOLARIS_STYLE_GETHOST CACHE INTERNAL "") +SET(STACK_DIRECTION -1 CACHE INTERNAL "") +SET(HAVE_STDARG_H 1 CACHE INTERNAL "") +SET(HAVE_STDDEF_H 1 CACHE INTERNAL "") +SET(HAVE_STDINT_H CACHE INTERNAL "") +SET(HAVE_STDLIB_H 1 CACHE INTERNAL "") +SET(HAVE_STPCPY CACHE INTERNAL "") +SET(HAVE_STRCASECMP CACHE INTERNAL "") +SET(HAVE_STRCOLL 1 CACHE INTERNAL "") +SET(HAVE_STRERROR 1 CACHE INTERNAL "") +SET(HAVE_STRINGS_H CACHE INTERNAL "") +SET(HAVE_STRING_H 1 CACHE INTERNAL "") +SET(HAVE_STRNDUP CACHE INTERNAL "") +SET(HAVE_STRNLEN 1 CACHE INTERNAL "") +SET(HAVE_STRPBRK 1 CACHE INTERNAL "") +SET(HAVE_STRTOK_R CACHE INTERNAL "") +SET(HAVE_STRTOLL CACHE INTERNAL "") +SET(HAVE_STRTOUL 1 CACHE INTERNAL "") +SET(HAVE_STRTOULL CACHE INTERNAL "") +SET(HAVE_SYNCH_H CACHE INTERNAL "") +SET(HAVE_SYSENT_H CACHE INTERNAL "") +SET(HAVE_SYS_DIR_H CACHE INTERNAL "") +SET(HAVE_SYS_EVENT_H CACHE INTERNAL "") +SET(HAVE_SYS_ERRLIST CACHE INTERNAL "") +SET(HAVE_SYS_FILE_H CACHE INTERNAL "") +SET(HAVE_SYS_FPU_H CACHE INTERNAL "") +SET(HAVE_SYS_IOCTL_H CACHE INTERNAL "") +SET(HAVE_SYS_MALLOC_H CACHE INTERNAL "") +SET(HAVE_SYS_MMAN_H CACHE INTERNAL "") +SET(HAVE_SYS_PARAM_H CACHE INTERNAL "") +SET(HAVE_SYS_PRCTL_H CACHE INTERNAL "") +SET(HAVE_SYS_PTEM_H CACHE INTERNAL "") +SET(HAVE_SYS_PTE_H CACHE INTERNAL "") +SET(HAVE_SYS_RESOURCE_H CACHE INTERNAL "") +SET(HAVE_SYS_SELECT_H CACHE INTERNAL "") +SET(HAVE_SYS_SOCKIO_H CACHE INTERNAL "") +SET(HAVE_SYS_SOCKET_H CACHE INTERNAL "") +SET(HAVE_SYS_STAT_H 1 CACHE INTERNAL "") +SET(HAVE_SYS_STREAM_H CACHE INTERNAL "") +SET(HAVE_SYS_TIMEB_H 1 CACHE INTERNAL "") +SET(HAVE_SYS_TIMES_H CACHE INTERNAL "") +SET(HAVE_SYS_TIME_H CACHE INTERNAL "") +SET(HAVE_SYS_TYPES_H 1 CACHE INTERNAL "") +SET(HAVE_SYS_UN_H CACHE INTERNAL "") +SET(HAVE_SYS_UTIME_H 1 CACHE INTERNAL "") +SET(HAVE_SYS_VADVISE_H CACHE INTERNAL "") +SET(HAVE_SYS_WAIT_H CACHE INTERNAL "") +SET(HAVE_TCGETATTR CACHE INTERNAL "") +SET(HAVE_TELL 1 CACHE INTERNAL "") +SET(HAVE_TERMCAP_H CACHE INTERNAL "") +SET(HAVE_TERMIOS_H CACHE INTERNAL "") +SET(HAVE_TERMIO_H CACHE INTERNAL "") +SET(HAVE_TERM_H CACHE INTERNAL "") +SET(HAVE_THR_SETCONCURRENCY CACHE INTERNAL "") +SET(HAVE_THR_YIELD CACHE INTERNAL "") +SET(HAVE_TIME 1 CACHE INTERNAL "") +SET(HAVE_TIMES CACHE INTERNAL "") +SET(HAVE_TIMESPEC_TS_SEC CACHE INTERNAL "") +SET(HAVE_TIME_H 1 CACHE INTERNAL "") +SET(HAVE_TZNAME 1 CACHE INTERNAL "") +SET(HAVE_UNISTD_H CACHE INTERNAL "") +SET(HAVE_UTIME_H CACHE INTERNAL "") +SET(HAVE_VARARGS_H 1 CACHE INTERNAL "") +SET(HAVE_VASPRINTF CACHE INTERNAL "") +SET(HAVE_VSNPRINTF 1 CACHE INTERNAL "") +SET(HAVE_WEAK_SYMBOL CACHE INTERNAL "") +SET(HAVE_ATTRIBUTE_CLEANUP CACHE INTERNAL "") +SET(HAVE_WORDS_BIGENDIAN TRUE CACHE INTERNAL "") +SET(WORDS_BIGENDIAN CACHE INTERNAL "") +SET(HAVE__S_IFIFO 1 CACHE INTERNAL "") +SET(HAVE__S_IREAD 1 CACHE INTERNAL "") +SET(HAVE__finite 1 CACHE INTERNAL "") +SET(HAVE__pclose 1 CACHE INTERNAL "") +SET(HAVE__popen 1 CACHE INTERNAL "") +SET(HAVE__stricmp 1 CACHE INTERNAL "") +SET(HAVE__strnicmp 1 CACHE INTERNAL "") +SET(HAVE__strtoi64 1 CACHE INTERNAL "") +SET(HAVE__strtoui64 1 CACHE INTERNAL "") +SET(HAVE_strtok_s 1 CACHE INTERNAL "") +SET(STDC_HEADERS CACHE 1 INTERNAL "") +SET(TIME_WITH_SYS_TIME CACHE INTERNAL "") +SET(TIME_T_UNSIGNED 1 CACHE INTERNAL "") +SET(TIOCSTAT_IN_SYS_IOCTL CACHE INTERNAL "") +SET(HAVE_S_IROTH CACHE INTERNAL "") +SET(HAVE_S_IFIFO CACHE INTERNAL "") +SET(QSORT_TYPE_IS_VOID 1 CACHE INTERNAL "") +SET(SIGNAL_RETURN_TYPE_IS_VOID 1 CACHE INTERNAL "") +SET(C_HAS_inline CACHE INTERNAL "") +SET(C_HAS___inline 1 CACHE INTERNAL "") +SET(FIONREAD_IN_SYS_IOCTL CACHE INTERNAL "") +SET(FIONREAD_IN_SYS_FILIO CACHE INTERNAL "") +SET(GWINSZ_IN_SYS_IOCTL CACHE INTERNAL "") +SET(HAVE_NDIR_H CACHE INTERNAL "") +SET(HAVE_SYS_NDIR_H CACHE INTERNAL "") +SET(HAVE_SYS_NDIR_H CACHE INTERNAL "") +SET(HAVE_ASM_TERMBITS_H CACHE INTERNAL "") +SET(HAVE_TERMBITS_H CACHE INTERNAL "") +SET(HAVE_WCHAR_H 1 CACHE INTERNAL "") +SET(HAVE_WCTYPE_H 1 CACHE INTERNAL "") +SET(HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP CACHE INTERNAL "") +SET(HAVE_SOCKADDR_IN_SIN_LEN CACHE INTERNAL "") +SET(HAVE_SOCKADDR_IN6_SIN6_LEN CACHE INTERNAL "") +SET(HAVE_VALGRIND_MEMCHECK_H CACHE INTERNAL "") +SET(HAVE_EVENT_H CACHE INTERNAL "") +SET(HAVE_LINUX_UNISTD_H CACHE INTERNAL "") +SET(HAVE_SYS_UTSNAME_H CACHE INTERNAL "") +SET(HAVE_PTHREAD_ATTR_GETGUARDSIZE CACHE INTERNAL "") +SET(HAVE_SOCKPEERCRED CACHE INTERNAL "") +SET(HAVE_ABI_CXA_DEMANGLE CACHE INTERNAL "") +SET(HAVE_GCC_C11_ATOMICS CACHE INTERNAL "") +SET(HAVE_VISIBILITY_HIDDEN CACHE INTERNAL "") +SET(HAVE_ACCEPT4 CACHE INTERNAL "") +SET(HAVE_LINK_H CACHE INTERNAL "") +SET(HAVE_DLADDR CACHE INTERNAL "") +SET(HAVE_CXX_NEW 1 CACHE INTERNAL "") +SET(STRUCT_DIRENT_HAS_D_INO CACHE INTERNAL "") +SET(STRUCT_DIRENT_HAS_D_NAMLEN CACHE INTERNAL "") +SET(HAVE_UCONTEXT_H CACHE INTERNAL "") +SET(STRUCT_TIMESPEC_HAS_TV_SEC 1 CACHE INTERNAL "") +SET(STRUCT_TIMESPEC_HAS_TV_NSEC 1 CACHE INTERNAL "") +SET(HAVE_UNISTD CACHE INTERNAL "") +SET(HAVE_SIGNAL_H CACHE INTERNAL "") +SET(HAVE_LZ4_H CACHE INTERNAL "") +SET(HAVE_LZ4_COMPRESS_DEFAULT CACHE INTERNAL "") +SET(HAVE_LZO_H CACHE INTERNAL "") +SET(HAVE_LZO_SHARED_LIB CACHE INTERNAL "") +SET(HAVE_LZMA_H CACHE INTERNAL "") +SET(HAVE_LZMA_DECODE CACHE INTERNAL "") +SET(HAVE_LZMA_ENCODE CACHE INTERNAL "") +SET(HAVE_BZLIB2_COMPRESS CACHE INTERNAL "") +SET(HAVE_BZLIB2_DECOMPRESS CACHE INTERNAL "") +SET(HAVE_BZLIB2_H CACHE INTERNAL "") +SET(HAVE_SNAPPY_H CACHE INTERNAL "") +SET(HAVE_SCHED_GETCPU CACHE INTERNAL "") +SET(HAVE_NANOSLEEP CACHE INTERNAL "") +SET(HAVE_PTHREAD_THREADID_NP CACHE INTERNAL "") +SET(HAVE_SYS_GETTID CACHE INTERNAL "") +SET(HAVE_GETTID CACHE INTERNAL "") +SET(HAVE_INTEGER_PTHREAD_SELF CACHE INTERNAL "") +SET(HAVE_PTHREAD_GETTHREADID_NP CACHE INTERNAL "") +SET(HAVE_TIMER_DELETE CACHE INTERNAL "") +SET(HAVE_MALLOC_USABLE_SIZE CACHE INTERNAL "") +SET(HAVE_PAM_EXT_H CACHE INTERNAL "") +SET(HAVE_PAM_SYSLOG CACHE INTERNAL "") +SET(HAVE_XUCRED CACHE INTERNAL "") +SET(HAVE_GETPEERUCRED CACHE INTERNAL "") +SET(HAVE_GETPWUID_POSIX_FINAL CACHE INTERNAL "") +SET(HAVE_CRACK_H CACHE INTERNAL "") +SET(HAVE_LIBCRACK CACHE INTERNAL "") +SET(HAVE_SNAPPY_SHARED_LIB INTERNAL "") +SET(HAVE_LZ4_SHARED_LIB INTERNAL "") +SET(HAVE_SYS_POLL_H CACHE INTERNAL "") +SET(HAVE_SYS_SYSCALL_H CACHE INTERNAL "") +SET(HAVE_SYS_STATVFS_H CACHE INTERNAL "") +ENDIF(MSVC) |