diff --git a/.github/workflows/gcc_build.yml b/.github/workflows/gcc_build.yml
new file mode 100644
index 00000000000..6a24ae5c8be
--- /dev/null
+++ b/.github/workflows/gcc_build.yml
@@ -0,0 +1,35 @@
+name: GCC
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ build:
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v5
+ - name: Set reusable strings
+ id: strings
+ shell: bash
+ run: |
+ echo "build-output-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT"
+ - name: Dependencies
+ run: |
+ sudo apt-get update && sudo apt-get install -yq libboost-all-dev libreadline-dev libbz2-dev libncurses-dev p7zip
+ - name: Setup
+ env:
+ CMAKE_BUILD_TYPE: Debug
+ run: >
+ cmake -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }}
+ -DWITH_WARNINGS=0 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1
+ -DCMAKE_INSTALL_PREFIX=check_install
+ - name: Build
+ run: |
+ cd bin
+ make -j 4 -k && make install
+ - name: Check executables
+ run: |
+ cd ${{ github.workspace }}/check_install/bin
+ ./bnetserver --version
+ ./worldserver --version
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6661d651d9c..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-sudo: false
-dist: trusty
-
-language: cpp
-compiler:
- - clang
-
-git:
- depth: 1
-
-addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- - sourceline: 'ppa:kzemek/boost'
- packages:
- - g++-6
- - libboost1.58-dev
- - libboost-filesystem1.58-dev
- - libboost-iostreams1.58-dev
- - libboost-program-options1.58-dev
- - libboost-regex1.58-dev
- - libboost-system1.58-dev
- - libboost-thread1.58-dev
- - libssl-dev
- - libmysqlclient-dev
- - libreadline6-dev
- - zlib1g-dev
- - libbz2-dev
-
-services:
- - mysql
-
-before_install:
- - git config user.email "travis@build.bot" && git config user.name "Travis CI"
- - git tag -a -m "Travis build" init
-
-install:
- - mysql -uroot -e 'create database test_mysql;'
- - mkdir bin
- - cd bin
- - cmake ../ -DWITH_WARNINGS=0 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DWITH_CPR=1
- - cd ..
- - chmod +x contrib/check_updates.sh
-
-script:
- - $CXX --version
- - mysql -uroot < sql/create/create_mysql.sql
- - mysql -utrinity -ptrinity auth < sql/base/auth_database.sql
- - mysql -utrinity -ptrinity characters < sql/base/characters_database.sql
- - mysql -utrinity -ptrinity world < sql/base/dev/world_database.sql
- - mysql -utrinity -ptrinity hotfixes < sql/base/dev/hotfixes_database.sql
- - cat sql/updates/world/master/*.sql | mysql -utrinity -ptrinity world
- - cat sql/updates/hotfixes/master/*.sql | mysql -utrinity -ptrinity hotfixes
- - mysql -uroot < sql/create/drop_mysql.sql
- - cd bin
- - make -j 4 -k && make install
- - cd check_install/bin
- - ./bnetserver --version
- - ./worldserver --version
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34a2317ecc9..0f14a105580 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2018 TrinityCore
+# This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -8,8 +8,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# We require CMake >= 3.2
-cmake_minimum_required(VERSION 3.2)
+cmake_minimum_required(VERSION 3.24)
# add this options before PROJECT keyword
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
@@ -18,18 +17,12 @@ set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
# Set projectname (must be done AFTER setting configurationtypes)
project(AshamaneCore)
-# CMake policies (can not be handled elsewhere)
-cmake_policy(SET CMP0005 NEW)
-if(POLICY CMP0043)
- cmake_policy(SET CMP0043 NEW) # Disable 'Ignore COMPILE_DEFINITIONS_ properties'
+if(POLICY CMP0144)
+ cmake_policy(SET CMP0144 NEW) # find_package() uses upper-case _ROOT variables
endif()
-if(POLICY CMP0054)
- cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted - prevents intepreting if (SOME_STRING_VARIABLE MATCHES "MSVC") as if (SOME_STRING_VARIABLE MATCHES "1")
-endif()
-
-if(POLICY CMP0074)
- cmake_policy(SET CMP0074 NEW) # find_package() uses _ROOT variables
+if(POLICY CMP0153)
+ cmake_policy(SET CMP0153 NEW) # The exec_program() command should not be called
endif()
# Set RPATH-handing (CMake parameters)
@@ -44,6 +37,9 @@ list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/dep/cotire/CMake")
# build in Release-mode by default if not explicitly set
+if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
+ set(CMAKE_DEFAULT_BUILD_TYPE "RelWithDebInfo" CACHE INTERNAL "")
+endif()
if( NOT CMAKE_BUILD_TYPE )
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
@@ -71,9 +67,12 @@ find_package(PCHSupport)
find_package(MySQL)
if(NOT WITHOUT_GIT)
- find_package(Git)
+ find_package(Git 1.7)
endif()
+# find mysql client binary (needed by genrev)
+find_package(MySQL OPTIONAL_COMPONENTS binary)
+
# Find revision ID and hash of the sourcetree
include(cmake/genrev.cmake)
@@ -85,3 +84,9 @@ add_subdirectory(dep)
# add core sources
add_subdirectory(src)
+
+# Catch cmakefile messes with our settings we explicitly leave up to the user
+# restore user preference
+ if (NOT WITH_SOURCE_TREE STREQUAL "hierarchical-folders")
+ set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
+ endif()
diff --git a/README.md b/README.md
index 507fb77c47d..82118099f08 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@
## Build Status
-[](https://travis-ci.org/AshamaneProject/AshamaneCore)
+[](https://travis-ci.org/TheGhostGroup/AshamaneCoreLegacy)
[](https://ci.appveyor.com/project/Traesh/ashamanecore/branch/master)
## Introduction
diff --git a/cmake/macros/ConfigureBaseTargets.cmake b/cmake/macros/ConfigureBaseTargets.cmake
index 603149f9c72..40fb6b46690 100644
--- a/cmake/macros/ConfigureBaseTargets.cmake
+++ b/cmake/macros/ConfigureBaseTargets.cmake
@@ -19,19 +19,7 @@ add_library(trinity-feature-interface INTERFACE)
target_compile_features(trinity-feature-interface
INTERFACE
- cxx_alias_templates
- cxx_auto_type
- cxx_constexpr
- cxx_decltype
- cxx_decltype_auto
- cxx_final
- cxx_lambdas
- cxx_generic_lambdas
- cxx_variadic_templates
- cxx_defaulted_functions
- cxx_nullptr
- cxx_trailing_return_types
- cxx_return_type_deduction)
+ cxx_std_20)
# An interface library to make the warnings level available to other targets
# This interface taget is set-up through the platform specific script
diff --git a/cmake/macros/FindBoost.cmake b/cmake/macros/FindBoost.cmake
deleted file mode 100644
index 8cd06f81ea5..00000000000
--- a/cmake/macros/FindBoost.cmake
+++ /dev/null
@@ -1,1285 +0,0 @@
-#.rst:
-# FindBoost
-# ---------
-#
-# Find Boost include dirs and libraries
-#
-# Use this module by invoking find_package with the form::
-#
-# find_package(Boost
-# [version] [EXACT] # Minimum or EXACT version e.g. 1.36.0
-# [REQUIRED] # Fail with error if Boost is not found
-# [COMPONENTS ...] # Boost libraries by their canonical name
-# ) # e.g. "date_time" for "libboost_date_time"
-#
-# This module finds headers and requested component libraries OR a CMake
-# package configuration file provided by a "Boost CMake" build. For the
-# latter case skip to the "Boost CMake" section below. For the former
-# case results are reported in variables::
-#
-# Boost_FOUND - True if headers and requested libraries were found
-# Boost_INCLUDE_DIRS - Boost include directories
-# Boost_LIBRARY_DIRS - Link directories for Boost libraries
-# Boost_LIBRARIES - Boost component libraries to be linked
-# Boost__FOUND - True if component was found ( is upper-case)
-# Boost__LIBRARY - Libraries to link for component (may include
-# target_link_libraries debug/optimized keywords)
-# Boost_VERSION - BOOST_VERSION value from boost/version.hpp
-# Boost_LIB_VERSION - Version string appended to library filenames
-# Boost_MAJOR_VERSION - Boost major version number (X in X.y.z)
-# Boost_MINOR_VERSION - Boost minor version number (Y in x.Y.z)
-# Boost_SUBMINOR_VERSION - Boost subminor version number (Z in x.y.Z)
-# Boost_LIB_DIAGNOSTIC_DEFINITIONS (Windows)
-# - Pass to add_definitions() to have diagnostic
-# information about Boost's automatic linking
-# displayed during compilation
-#
-# This module reads hints about search locations from variables::
-#
-# BOOST_ROOT - Preferred installation prefix
-# (or BOOSTROOT)
-# BOOST_INCLUDEDIR - Preferred include directory e.g. /include
-# BOOST_LIBRARYDIR - Preferred library directory e.g. /lib
-# Boost_NO_SYSTEM_PATHS - Set to ON to disable searching in locations not
-# specified by these hint variables. Default is OFF.
-# Boost_ADDITIONAL_VERSIONS
-# - List of Boost versions not known to this module
-# (Boost install locations may contain the version)
-#
-# and saves search results persistently in CMake cache entries::
-#
-# Boost_INCLUDE_DIR - Directory containing Boost headers
-# Boost_LIBRARY_DIR - Directory containing Boost libraries
-# Boost__LIBRARY_DEBUG - Component library debug variant
-# Boost__LIBRARY_RELEASE - Component library release variant
-#
-# Users may set these hints or results as cache entries. Projects
-# should not read these entries directly but instead use the above
-# result variables. Note that some hint names start in upper-case
-# "BOOST". One may specify these as environment variables if they are
-# not specified as CMake variables or cache entries.
-#
-# This module first searches for the Boost header files using the above
-# hint variables (excluding BOOST_LIBRARYDIR) and saves the result in
-# Boost_INCLUDE_DIR. Then it searches for requested component libraries
-# using the above hints (excluding BOOST_INCLUDEDIR and
-# Boost_ADDITIONAL_VERSIONS), "lib" directories near Boost_INCLUDE_DIR,
-# and the library name configuration settings below. It saves the
-# library directory in Boost_LIBRARY_DIR and individual library
-# locations in Boost__LIBRARY_DEBUG and Boost__LIBRARY_RELEASE.
-# When one changes settings used by previous searches in the same build
-# tree (excluding environment variables) this module discards previous
-# search results affected by the changes and searches again.
-#
-# Boost libraries come in many variants encoded in their file name.
-# Users or projects may tell this module which variant to find by
-# setting variables::
-#
-# Boost_USE_MULTITHREADED - Set to OFF to use the non-multithreaded
-# libraries ('mt' tag). Default is ON.
-# Boost_USE_STATIC_LIBS - Set to ON to force the use of the static
-# libraries. Default is OFF.
-# Boost_USE_STATIC_RUNTIME - Set to ON or OFF to specify whether to use
-# libraries linked statically to the C++ runtime
-# ('s' tag). Default is platform dependent.
-# Boost_USE_DEBUG_RUNTIME - Set to ON or OFF to specify whether to use
-# libraries linked to the MS debug C++ runtime
-# ('g' tag). Default is ON.
-# Boost_USE_DEBUG_PYTHON - Set to ON to use libraries compiled with a
-# debug Python build ('y' tag). Default is OFF.
-# Boost_USE_STLPORT - Set to ON to use libraries compiled with
-# STLPort ('p' tag). Default is OFF.
-# Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
-# - Set to ON to use libraries compiled with
-# STLPort deprecated "native iostreams"
-# ('n' tag). Default is OFF.
-# Boost_COMPILER - Set to the compiler-specific library suffix
-# (e.g. "-gcc43"). Default is auto-computed
-# for the C++ compiler in use.
-# Boost_THREADAPI - Suffix for "thread" component library name,
-# such as "pthread" or "win32". Names with
-# and without this suffix will both be tried.
-# Boost_NAMESPACE - Alternate namespace used to build boost with
-# e.g. if set to "myboost", will search for
-# myboost_thread instead of boost_thread.
-#
-# Other variables one may set to control this module are::
-#
-# Boost_DEBUG - Set to ON to enable debug output from FindBoost.
-# Please enable this before filing any bug report.
-# Boost_DETAILED_FAILURE_MSG
-# - Set to ON to add detailed information to the
-# failure message even when the REQUIRED option
-# is not given to the find_package call.
-# Boost_REALPATH - Set to ON to resolve symlinks for discovered
-# libraries to assist with packaging. For example,
-# the "system" component library may be resolved to
-# "/usr/lib/libboost_system.so.1.42.0" instead of
-# "/usr/lib/libboost_system.so". This does not
-# affect linking and should not be enabled unless
-# the user needs this information.
-#
-# On Visual Studio and Borland compilers Boost headers request automatic
-# linking to corresponding libraries. This requires matching libraries
-# to be linked explicitly or available in the link library search path.
-# In this case setting Boost_USE_STATIC_LIBS to OFF may not achieve
-# dynamic linking. Boost automatic linking typically requests static
-# libraries with a few exceptions (such as Boost.Python). Use::
-#
-# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-#
-# to ask Boost to report information about automatic linking requests.
-#
-# Example to find Boost headers only::
-#
-# find_package(Boost 1.36.0)
-# if(Boost_FOUND)
-# include_directories(${Boost_INCLUDE_DIRS})
-# add_executable(foo foo.cc)
-# endif()
-#
-# Example to find Boost headers and some *static* libraries::
-#
-# set(Boost_USE_STATIC_LIBS ON) # only find static libs
-# set(Boost_USE_MULTITHREADED ON)
-# set(Boost_USE_STATIC_RUNTIME OFF)
-# find_package(Boost 1.36.0 COMPONENTS date_time filesystem system ...)
-# if(Boost_FOUND)
-# include_directories(${Boost_INCLUDE_DIRS})
-# add_executable(foo foo.cc)
-# target_link_libraries(foo ${Boost_LIBRARIES})
-# endif()
-#
-# Boost CMake
-# ^^^^^^^^^^^
-#
-# If Boost was built using the boost-cmake project it provides a package
-# configuration file for use with find_package's Config mode. This
-# module looks for the package configuration file called
-# BoostConfig.cmake or boost-config.cmake and stores the result in cache
-# entry "Boost_DIR". If found, the package configuration file is loaded
-# and this module returns with no further action. See documentation of
-# the Boost CMake package configuration for details on what it provides.
-#
-# Set Boost_NO_BOOST_CMAKE to ON to disable the search for boost-cmake.
-
-#=============================================================================
-# Copyright 2006-2012 Kitware, Inc.
-# Copyright 2006-2008 Andreas Schneider
-# Copyright 2007 Wengo
-# Copyright 2007 Mike Jackson
-# Copyright 2008 Andreas Pakulat
-# Copyright 2008-2012 Philip Lowman
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-
-#-------------------------------------------------------------------------------
-# Before we go searching, check whether boost-cmake is available, unless the
-# user specifically asked NOT to search for boost-cmake.
-#
-# If Boost_DIR is set, this behaves as any find_package call would. If not,
-# it looks at BOOST_ROOT and BOOSTROOT to find Boost.
-#
-if (NOT Boost_NO_BOOST_CMAKE)
- # If Boost_DIR is not set, look for BOOSTROOT and BOOST_ROOT as alternatives,
- # since these are more conventional for Boost.
- if ("$ENV{Boost_DIR}" STREQUAL "")
- if (NOT "$ENV{BOOST_ROOT}" STREQUAL "")
- set(ENV{Boost_DIR} $ENV{BOOST_ROOT})
- elseif (NOT "$ENV{BOOSTROOT}" STREQUAL "")
- set(ENV{Boost_DIR} $ENV{BOOSTROOT})
- endif()
- endif()
-
- # Do the same find_package call but look specifically for the CMake version.
- # Note that args are passed in the Boost_FIND_xxxxx variables, so there is no
- # need to delegate them to this find_package call.
- find_package(Boost QUIET NO_MODULE)
- mark_as_advanced(Boost_DIR)
-
- # If we found boost-cmake, then we're done. Print out what we found.
- # Otherwise let the rest of the module try to find it.
- if (Boost_FOUND)
- message("Boost ${Boost_FIND_VERSION} found.")
- if (Boost_FIND_COMPONENTS)
- message("Found Boost components:")
- message(" ${Boost_FIND_COMPONENTS}")
- endif()
- return()
- endif()
-endif()
-
-
-#-------------------------------------------------------------------------------
-# FindBoost functions & macros
-#
-
-############################################
-#
-# Check the existence of the libraries.
-#
-############################################
-# This macro was taken directly from the FindQt4.cmake file that is included
-# with the CMake distribution. This is NOT my work. All work was done by the
-# original authors of the FindQt4.cmake file. Only minor modifications were
-# made to remove references to Qt and make this file more generally applicable
-# And ELSE/ENDIF pairs were removed for readability.
-#########################################################################
-
-macro(_Boost_ADJUST_LIB_VARS basename)
- if(Boost_INCLUDE_DIR )
- if(Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
- # if the generator supports configuration types then set
- # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
- else()
- # if there are no configuration types and CMAKE_BUILD_TYPE has no value
- # then just use the release libraries
- set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
- endif()
- # FIXME: This probably should be set for both cases
- set(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
- endif()
-
- # if only the release version was found, set the debug variable also to the release version
- if(Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
- set(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE})
- set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE})
- set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE})
- endif()
-
- # if only the debug version was found, set the release variable also to the debug version
- if(Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
- set(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG})
- set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG})
- set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG})
- endif()
-
- # If the debug & release library ends up being the same, omit the keywords
- if(${Boost_${basename}_LIBRARY_RELEASE} STREQUAL ${Boost_${basename}_LIBRARY_DEBUG})
- set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
- set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE} )
- endif()
-
- if(Boost_${basename}_LIBRARY)
- set(Boost_${basename}_FOUND ON)
- endif()
-
- endif()
- # Make variables changeable to the advanced user
- mark_as_advanced(
- Boost_${basename}_LIBRARY_RELEASE
- Boost_${basename}_LIBRARY_DEBUG
- )
-endmacro()
-
-macro(_Boost_CHANGE_DETECT changed_var)
- set(${changed_var} 0)
- foreach(v ${ARGN})
- if(DEFINED _Boost_COMPONENTS_SEARCHED)
- if(${v})
- if(_${v}_LAST)
- string(COMPARE NOTEQUAL "${${v}}" "${_${v}_LAST}" _${v}_CHANGED)
- else()
- set(_${v}_CHANGED 1)
- endif()
- elseif(_${v}_LAST)
- set(_${v}_CHANGED 1)
- endif()
- if(_${v}_CHANGED)
- set(${changed_var} 1)
- endif()
- else()
- set(_${v}_CHANGED 0)
- endif()
- endforeach()
-endmacro()
-
-macro(_Boost_FIND_LIBRARY var)
- find_library(${var} ${ARGN})
-
- if(${var})
- # If this is the first library found then save Boost_LIBRARY_DIR.
- if(NOT Boost_LIBRARY_DIR)
- get_filename_component(_dir "${${var}}" PATH)
- set(Boost_LIBRARY_DIR "${_dir}" CACHE PATH "Boost library directory" FORCE)
- endif()
- elseif(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
- # Try component-specific hints but do not save Boost_LIBRARY_DIR.
- find_library(${var} HINTS ${_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT} ${ARGN})
- endif()
-
- # If Boost_LIBRARY_DIR is known then search only there.
- if(Boost_LIBRARY_DIR)
- set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- endif()
-endmacro()
-
-#-------------------------------------------------------------------------------
-
-#
-# Runs compiler with "-dumpversion" and parses major/minor
-# version with a regex.
-#
-function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
-
- exec_program(${CMAKE_CXX_COMPILER}
- ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
- OUTPUT_VARIABLE _boost_COMPILER_VERSION
- )
- string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
- _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
-
- set(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE)
-endfunction()
-
-#
-# Take a list of libraries with "thread" in it
-# and prepend duplicates with "thread_${Boost_THREADAPI}"
-# at the front of the list
-#
-function(_Boost_PREPEND_LIST_WITH_THREADAPI _output)
- set(_orig_libnames ${ARGN})
- string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames "${_orig_libnames}")
- set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE)
-endfunction()
-
-#
-# If a library is found, replace its cache entry with its REALPATH
-#
-function(_Boost_SWAP_WITH_REALPATH _library _docstring)
- if(${_library})
- get_filename_component(_boost_filepathreal ${${_library}} REALPATH)
- unset(${_library} CACHE)
- set(${_library} ${_boost_filepathreal} CACHE FILEPATH "${_docstring}")
- endif()
-endfunction()
-
-function(_Boost_CHECK_SPELLING _var)
- if(${_var})
- string(TOUPPER ${_var} _var_UC)
- message(FATAL_ERROR "ERROR: ${_var} is not the correct spelling. The proper spelling is ${_var_UC}.")
- endif()
-endfunction()
-
-# Guesses Boost's compiler prefix used in built library names
-# Returns the guess by setting the variable pointed to by _ret
-function(_Boost_GUESS_COMPILER_PREFIX _ret)
- if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel"
- OR CMAKE_CXX_COMPILER MATCHES "icl"
- OR CMAKE_CXX_COMPILER MATCHES "icpc")
- if(WIN32)
- set (_boost_COMPILER "-iw")
- else()
- set (_boost_COMPILER "-il")
- endif()
- elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
- set(_boost_COMPILER "-vc142;-vc141")
- elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
- set(_boost_COMPILER "-vc141;-vc140")
- elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
- set(_boost_COMPILER "-vc140")
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
- set(_boost_COMPILER "-vc120")
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
- set(_boost_COMPILER "-vc110")
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
- set(_boost_COMPILER "-vc100")
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
- set(_boost_COMPILER "-vc90")
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
- set(_boost_COMPILER "-vc80")
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.10)
- set(_boost_COMPILER "-vc71")
- elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # Good luck!
- set(_boost_COMPILER "-vc7") # yes, this is correct
- else() # VS 6.0 Good luck!
- set(_boost_COMPILER "-vc6") # yes, this is correct
- endif()
- elseif (BORLAND)
- set(_boost_COMPILER "-bcb")
- elseif(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
- set(_boost_COMPILER "-sw")
- elseif (MINGW)
- if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
- set(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
- else()
- _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
- set(_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
- endif()
- elseif (UNIX)
- if (CMAKE_COMPILER_IS_GNUCXX)
- if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
- set(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
- else()
- _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
- # Determine which version of GCC we have.
- if(APPLE)
- if(Boost_MINOR_VERSION)
- if(${Boost_MINOR_VERSION} GREATER 35)
- # In Boost 1.36.0 and newer, the mangled compiler name used
- # on Mac OS X/Darwin is "xgcc".
- set(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
- else()
- # In Boost <= 1.35.0, there is no mangled compiler name for
- # the Mac OS X/Darwin version of GCC.
- set(_boost_COMPILER "")
- endif()
- else()
- # We don't know the Boost version, so assume it's
- # pre-1.36.0.
- set(_boost_COMPILER "")
- endif()
- else()
- set(_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
- endif()
- endif()
- endif ()
- else()
- # TODO at least Boost_DEBUG here?
- set(_boost_COMPILER "")
- endif()
- set(${_ret} ${_boost_COMPILER} PARENT_SCOPE)
-endfunction()
-
-#
-# End functions/macros
-#
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-# main.
-#-------------------------------------------------------------------------------
-
-if(NOT DEFINED Boost_USE_MULTITHREADED)
- set(Boost_USE_MULTITHREADED TRUE)
-endif()
-if(NOT DEFINED Boost_USE_DEBUG_RUNTIME)
- set(Boost_USE_DEBUG_RUNTIME TRUE)
-endif()
-
-# Check the version of Boost against the requested version.
-if(Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR)
- message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34")
-endif()
-
-if(Boost_FIND_VERSION_EXACT)
- # The version may appear in a directory with or without the patch
- # level, even when the patch level is non-zero.
- set(_boost_TEST_VERSIONS
- "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}"
- "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
-else()
- # The user has not requested an exact version. Among known
- # versions, find those that are acceptable to the user request.
- set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
- "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69"
- "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
- "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
- "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
- "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
- "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"
- "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42"
- "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
- "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
- "1.34" "1.33.1" "1.33.0" "1.33")
- set(_boost_TEST_VERSIONS)
- if(Boost_FIND_VERSION)
- set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
- # Select acceptable versions.
- foreach(version ${_Boost_KNOWN_VERSIONS})
- if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}")
- # This version is high enough.
- list(APPEND _boost_TEST_VERSIONS "${version}")
- elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99")
- # This version is a short-form for the requested version with
- # the patch level dropped.
- list(APPEND _boost_TEST_VERSIONS "${version}")
- endif()
- endforeach()
- else()
- # Any version is acceptable.
- set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}")
- endif()
-endif()
-
-# The reason that we failed to find Boost. This will be set to a
-# user-friendly message when we fail to find some necessary piece of
-# Boost.
-set(Boost_ERROR_REASON)
-
-if(Boost_DEBUG)
- # Output some of their choices
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}")
-endif()
-
-if(WIN32)
- # In windows, automatic linking is performed, so you do not have
- # to specify the libraries. If you are linking to a dynamic
- # runtime, then you can choose to link to either a static or a
- # dynamic Boost library, the default is to do a static link. You
- # can alter this for a specific library "whatever" by defining
- # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be
- # linked dynamically. Alternatively you can force all Boost
- # libraries to dynamic link by defining BOOST_ALL_DYN_LINK.
-
- # This feature can be disabled for Boost library "whatever" by
- # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining
- # BOOST_ALL_NO_LIB.
-
- # If you want to observe which libraries are being linked against
- # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking
- # code to emit a #pragma message each time a library is selected
- # for linking.
- set(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC")
-endif()
-
-_Boost_CHECK_SPELLING(Boost_ROOT)
-_Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
-_Boost_CHECK_SPELLING(Boost_INCLUDEDIR)
-
-# Collect environment variable inputs as hints. Do not consider changes.
-foreach(v BOOSTROOT BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR)
- set(_env $ENV{${v}})
- if(_env)
- file(TO_CMAKE_PATH "${_env}" _ENV_${v})
- else()
- set(_ENV_${v} "")
- endif()
-endforeach()
-if(NOT _ENV_BOOST_ROOT AND _ENV_BOOSTROOT)
- set(_ENV_BOOST_ROOT "${_ENV_BOOSTROOT}")
-endif()
-
-# Collect inputs and cached results. Detect changes since the last run.
-if(NOT BOOST_ROOT AND BOOSTROOT)
- set(BOOST_ROOT "${BOOSTROOT}")
-endif()
-set(_Boost_VARS_DIR
- BOOST_ROOT
- Boost_NO_SYSTEM_PATHS
- )
-
-if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Declared as CMake or Environmental Variables:")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " BOOST_ROOT = ${BOOST_ROOT}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
-endif()
-
-# ------------------------------------------------------------------------
-# Search for Boost include DIR
-# ------------------------------------------------------------------------
-
-set(_Boost_VARS_INC BOOST_INCLUDEDIR Boost_INCLUDE_DIR Boost_ADDITIONAL_VERSIONS)
-_Boost_CHANGE_DETECT(_Boost_CHANGE_INCDIR ${_Boost_VARS_DIR} ${_Boost_VARS_INC})
-# Clear Boost_INCLUDE_DIR if it did not change but other input affecting the
-# location did. We will find a new one based on the new inputs.
-if(_Boost_CHANGE_INCDIR AND NOT _Boost_INCLUDE_DIR_CHANGED)
- unset(Boost_INCLUDE_DIR CACHE)
-endif()
-
-if(NOT Boost_INCLUDE_DIR)
- set(_boost_INCLUDE_SEARCH_DIRS "")
- if(BOOST_INCLUDEDIR)
- list(APPEND _boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR})
- elseif(_ENV_BOOST_INCLUDEDIR)
- list(APPEND _boost_INCLUDE_SEARCH_DIRS ${_ENV_BOOST_INCLUDEDIR})
- endif()
-
- if( BOOST_ROOT )
- list(APPEND _boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${BOOST_ROOT})
- elseif( _ENV_BOOST_ROOT )
- list(APPEND _boost_INCLUDE_SEARCH_DIRS ${_ENV_BOOST_ROOT}/include ${_ENV_BOOST_ROOT})
- endif()
-
- if( Boost_NO_SYSTEM_PATHS)
- list(APPEND _boost_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH)
- else()
- list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS
- C:/boost/include
- C:/boost
- /sw/local/include
- /usr/local/include/boost
- /usr/include/boost
- )
- endif()
-
- # Try to find Boost by stepping backwards through the Boost versions
- # we know about.
- # Build a list of path suffixes for each version.
- set(_boost_PATH_SUFFIXES)
- foreach(_boost_VER ${_boost_TEST_VERSIONS})
- # Add in a path suffix, based on the required version, ideally
- # we could read this from version.hpp, but for that to work we'd
- # need to know the include dir already
- set(_boost_BOOSTIFIED_VERSION)
-
- # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0
- if(_boost_VER MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
- set(_boost_BOOSTIFIED_VERSION
- "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}")
- elseif(_boost_VER MATCHES "([0-9]+)\\.([0-9]+)")
- set(_boost_BOOSTIFIED_VERSION
- "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
- endif()
-
- list(APPEND _boost_PATH_SUFFIXES
- "boost-${_boost_BOOSTIFIED_VERSION}"
- "boost_${_boost_BOOSTIFIED_VERSION}"
- "boost/boost-${_boost_BOOSTIFIED_VERSION}"
- "boost/boost_${_boost_BOOSTIFIED_VERSION}"
- )
-
- endforeach()
-
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Include debugging info:")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}")
- endif()
-
- # Look for a standard boost header file.
- find_path(Boost_INCLUDE_DIR
- NAMES boost/config.hpp
- HINTS ${_boost_INCLUDE_SEARCH_DIRS}
- PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
- )
-endif()
-
-# ------------------------------------------------------------------------
-# Extract version information from version.hpp
-# ------------------------------------------------------------------------
-
-# Set Boost_FOUND based only on header location and version.
-# It will be updated below for component libraries.
-if(Boost_INCLUDE_DIR)
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp")
- endif()
-
- # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
- set(Boost_VERSION 0)
- set(Boost_LIB_VERSION "")
- file(STRINGS "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS REGEX "#define BOOST_(LIB_)?VERSION ")
- set(_Boost_VERSION_REGEX "([0-9]+)")
- set(_Boost_LIB_VERSION_REGEX "\"([0-9_]+)\"")
- foreach(v VERSION LIB_VERSION)
- if("${_boost_VERSION_HPP_CONTENTS}" MATCHES "#define BOOST_${v} ${_Boost_${v}_REGEX}")
- set(Boost_${v} "${CMAKE_MATCH_1}")
- endif()
- endforeach()
- unset(_boost_VERSION_HPP_CONTENTS)
-
- math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
- math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
- math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
-
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "version.hpp reveals boost "
- "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
- endif()
-
- if(Boost_FIND_VERSION)
- # Set Boost_FOUND based on requested version.
- set(_Boost_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
- if("${_Boost_VERSION}" VERSION_LESS "${Boost_FIND_VERSION}")
- set(Boost_FOUND 0)
- set(_Boost_VERSION_AGE "old")
- elseif(Boost_FIND_VERSION_EXACT AND
- NOT "${_Boost_VERSION}" VERSION_EQUAL "${Boost_FIND_VERSION}")
- set(Boost_FOUND 0)
- set(_Boost_VERSION_AGE "new")
- else()
- set(Boost_FOUND 1)
- endif()
- if(NOT Boost_FOUND)
- # State that we found a version of Boost that is too new or too old.
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
- if (Boost_FIND_VERSION_PATCH)
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}")
- endif ()
- if (NOT Boost_FIND_VERSION_EXACT)
- set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)")
- endif ()
- set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.")
- endif ()
- else()
- # Caller will accept any Boost version.
- set(Boost_FOUND 1)
- endif()
-else()
- set(Boost_FOUND 0)
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
-endif()
-
-# ------------------------------------------------------------------------
-# Prefix initialization
-# ------------------------------------------------------------------------
-
-set(Boost_LIB_PREFIX "")
-if ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN)
- set(Boost_LIB_PREFIX "lib")
-endif()
-
-if ( NOT Boost_NAMESPACE )
- set(Boost_NAMESPACE "boost")
-endif()
-
-# ------------------------------------------------------------------------
-# Suffix initialization and compiler suffix detection.
-# ------------------------------------------------------------------------
-
-set(_Boost_VARS_NAME
- Boost_NAMESPACE
- Boost_COMPILER
- Boost_THREADAPI
- Boost_USE_DEBUG_PYTHON
- Boost_USE_MULTITHREADED
- Boost_USE_STATIC_LIBS
- Boost_USE_STATIC_RUNTIME
- Boost_USE_STLPORT
- Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
- )
-_Boost_CHANGE_DETECT(_Boost_CHANGE_LIBNAME ${_Boost_VARS_NAME})
-
-# Setting some more suffixes for the library
-if (Boost_COMPILER)
- set(_boost_COMPILER ${Boost_COMPILER})
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "using user-specified Boost_COMPILER = ${_boost_COMPILER}")
- endif()
-else()
- # Attempt to guess the compiler suffix
- # NOTE: this is not perfect yet, if you experience any issues
- # please report them and use the Boost_COMPILER variable
- # to work around the problems.
- _Boost_GUESS_COMPILER_PREFIX(_boost_COMPILER)
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "guessed _boost_COMPILER = ${_boost_COMPILER}")
- endif()
-endif()
-
-set (_boost_MULTITHREADED "-mt")
-if( NOT Boost_USE_MULTITHREADED )
- set (_boost_MULTITHREADED "")
-endif()
-if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
-endif()
-
-#======================
-# Systematically build up the Boost ABI tag
-# http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
-set( _boost_RELEASE_ABI_TAG "-")
-set( _boost_DEBUG_ABI_TAG "-")
-# Key Use this library when:
-# s linking statically to the C++ standard library and
-# compiler runtime support libraries.
-if(Boost_USE_STATIC_RUNTIME)
- set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s")
- set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}s")
-endif()
-# g using debug versions of the standard and runtime
-# support libraries
-if(WIN32 AND Boost_USE_DEBUG_RUNTIME)
- if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
- set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
- endif()
-endif()
-# y using special debug build of python
-if(Boost_USE_DEBUG_PYTHON)
- set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y")
-endif()
-# d using a debug version of your code
-set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d")
-# p using the STLport standard library rather than the
-# default one supplied with your compiler
-if(Boost_USE_STLPORT)
- set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
- set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p")
-endif()
-# n using the STLport deprecated "native iostreams" feature
-if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
- set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
- set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n")
-endif()
-
-if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}")
-endif()
-
-#TODO: fix this when CMake is updated
-#======================
-# Systematically build up the Boost architecture and address model tag
-# http://www.boost.org/doc/libs/1_66_0/more/getting_started/windows.html#library-naming
-set( _boost_AAM_TAG "-x")
-# Key Use this library when:
-# 32 32-bit address model
-# 64 64-bit address model
-if(PLATFORM EQUAL 64)
- set( _boost_AAM_TAG "${_boost_AAM_TAG}64")
-else()
- set( _boost_AAM_TAG "${_boost_AAM_TAG}32")
-endif()
-
-if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_AAM_TAG = ${_boost_AAM_TAG}")
-endif()
-
-# ------------------------------------------------------------------------
-# Begin finding boost libraries
-# ------------------------------------------------------------------------
-set(_Boost_VARS_LIB BOOST_LIBRARYDIR Boost_LIBRARY_DIR)
-_Boost_CHANGE_DETECT(_Boost_CHANGE_LIBDIR ${_Boost_VARS_DIR} ${_Boost_VARS_LIB} Boost_INCLUDE_DIR)
-# Clear Boost_LIBRARY_DIR if it did not change but other input affecting the
-# location did. We will find a new one based on the new inputs.
-if(_Boost_CHANGE_LIBDIR AND NOT _Boost_LIBRARY_DIR_CHANGED)
- unset(Boost_LIBRARY_DIR CACHE)
-endif()
-
-if(Boost_LIBRARY_DIR)
- set(_boost_LIBRARY_SEARCH_DIRS ${Boost_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-else()
- set(_boost_LIBRARY_SEARCH_DIRS "")
- if(BOOST_LIBRARYDIR)
- list(APPEND _boost_LIBRARY_SEARCH_DIRS ${BOOST_LIBRARYDIR})
- elseif(_ENV_BOOST_LIBRARYDIR)
- list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_ENV_BOOST_LIBRARYDIR})
- endif()
-
- if(BOOST_ROOT)
- list(APPEND _boost_LIBRARY_SEARCH_DIRS ${BOOST_ROOT}/lib ${BOOST_ROOT}/stage/lib)
- elseif(_ENV_BOOST_ROOT)
- list(APPEND _boost_LIBRARY_SEARCH_DIRS ${_ENV_BOOST_ROOT}/lib ${_ENV_BOOST_ROOT}/stage/lib)
- endif()
-
- list(APPEND _boost_LIBRARY_SEARCH_DIRS
- ${Boost_INCLUDE_DIR}/lib
- ${Boost_INCLUDE_DIR}/../lib
- ${Boost_INCLUDE_DIR}/stage/lib
- )
- if( Boost_NO_SYSTEM_PATHS )
- list(APPEND _boost_LIBRARY_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH)
- else()
- list(APPEND _boost_LIBRARY_SEARCH_DIRS PATHS
- C:/boost/lib
- C:/boost
- /sw/local/lib
- )
- endif()
-endif()
-
-if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "_boost_LIBRARY_SEARCH_DIRS = ${_boost_LIBRARY_SEARCH_DIRS}")
-endif()
-
-# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
-if( Boost_USE_STATIC_LIBS )
- set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
- if(WIN32)
- set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
- else()
- set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
- endif()
-endif()
-
-# We want to use the tag inline below without risking double dashes
-if(_boost_RELEASE_ABI_TAG)
- if(${_boost_RELEASE_ABI_TAG} STREQUAL "-")
- set(_boost_RELEASE_ABI_TAG "")
- endif()
-endif()
-if(_boost_DEBUG_ABI_TAG)
- if(${_boost_DEBUG_ABI_TAG} STREQUAL "-")
- set(_boost_DEBUG_ABI_TAG "")
- endif()
-endif()
-
-# The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled
-# on WIN32 was to:
-# 1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found)
-# 2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found)
-# We maintain this behavior since changing it could break people's builds.
-# To disable the ambiguous behavior, the user need only
-# set Boost_USE_STATIC_RUNTIME either ON or OFF.
-set(_boost_STATIC_RUNTIME_WORKAROUND false)
-if(WIN32 AND Boost_USE_STATIC_LIBS)
- if(NOT DEFINED Boost_USE_STATIC_RUNTIME)
- set(_boost_STATIC_RUNTIME_WORKAROUND true)
- endif()
-endif()
-
-# On versions < 1.35, remove the System library from the considered list
-# since it wasn't added until 1.35.
-if(Boost_VERSION AND Boost_FIND_COMPONENTS)
- if(Boost_VERSION LESS 103500)
- list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
- endif()
-endif()
-
-# If the user changed any of our control inputs flush previous results.
-if(_Boost_CHANGE_LIBDIR OR _Boost_CHANGE_LIBNAME)
- foreach(COMPONENT ${_Boost_COMPONENTS_SEARCHED})
- string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
- foreach(c DEBUG RELEASE)
- set(_var Boost_${UPPERCOMPONENT}_LIBRARY_${c})
- unset(${_var} CACHE)
- set(${_var} "${_var}-NOTFOUND")
- endforeach()
- endforeach()
- set(_Boost_COMPONENTS_SEARCHED "")
-endif()
-
-foreach(COMPONENT ${Boost_FIND_COMPONENTS})
- string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
-
- set( _boost_docstring_release "Boost ${COMPONENT} library (release)")
- set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)")
-
- # Compute component-specific hints.
- set(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT "")
- if(${COMPONENT} STREQUAL "mpi" OR ${COMPONENT} STREQUAL "mpi_python" OR
- ${COMPONENT} STREQUAL "graph_parallel")
- foreach(lib ${MPI_CXX_LIBRARIES} ${MPI_C_LIBRARIES})
- if(IS_ABSOLUTE "${lib}")
- get_filename_component(libdir "${lib}" PATH)
- string(REPLACE "\\" "/" libdir "${libdir}")
- list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT ${libdir})
- endif()
- endforeach()
- endif()
-
- # Consolidate and report component-specific hints.
- if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
- list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Component-specific library search paths for ${COMPONENT}: "
- "${_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT}")
- endif()
- endif()
-
- #
- # Find RELEASE libraries
- #
- unset(_boost_RELEASE_NAMES)
- foreach(compiler IN LISTS _boost_COMPILER)
- list(APPEND _boost_RELEASE_NAMES
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} )
- endforeach()
- list(APPEND _boost_RELEASE_NAMES
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
- if(_boost_STATIC_RUNTIME_WORKAROUND)
- set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
- foreach(compiler IN LISTS _boost_COMPILER)
- list(APPEND _boost_RELEASE_NAMES
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
- endforeach()
- list( APPEND _boost_RELEASE_NAMES
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
- endif()
- if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
- _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
- endif()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}")
- endif()
-
- # Avoid passing backslashes to _Boost_FIND_LIBRARY due to macro re-parsing.
- string(REPLACE "\\" "/" _boost_LIBRARY_SEARCH_DIRS_tmp "${_boost_LIBRARY_SEARCH_DIRS}")
-
- _Boost_FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
- NAMES ${_boost_RELEASE_NAMES}
- HINTS ${_boost_LIBRARY_SEARCH_DIRS_tmp}
- NAMES_PER_DIR
- DOC "${_boost_docstring_release}"
- )
-
- #
- # Find DEBUG libraries
- #
- unset(_boost_DEBUG_NAMES)
- foreach(compiler IN LISTS _boost_COMPILER)
- list(APPEND _boost_DEBUG_NAMES
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} )
- endforeach()
- list(APPEND _boost_DEBUG_NAMES
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
- if(_boost_STATIC_RUNTIME_WORKAROUND)
- set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
- foreach(compiler IN LISTS _boost_COMPILER)
- list(APPEND _boost_DEBUG_NAMES
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
- endforeach()
- list(APPEND _boost_DEBUG_NAMES
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_AAM_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
- ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
- endif()
- if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
- _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
- endif()
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}")
- endif()
-
- # Avoid passing backslashes to _Boost_FIND_LIBRARY due to macro re-parsing.
- string(REPLACE "\\" "/" _boost_LIBRARY_SEARCH_DIRS_tmp "${_boost_LIBRARY_SEARCH_DIRS}")
-
- _Boost_FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
- NAMES ${_boost_DEBUG_NAMES}
- HINTS ${_boost_LIBRARY_SEARCH_DIRS_tmp}
- NAMES_PER_DIR
- DOC "${_boost_docstring_debug}"
- )
-
- if(Boost_REALPATH)
- _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "${_boost_docstring_release}")
- _Boost_SWAP_WITH_REALPATH(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "${_boost_docstring_debug}" )
- endif()
-
- _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
-
-endforeach()
-
-# Restore the original find library ordering
-if( Boost_USE_STATIC_LIBS )
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-endif()
-
-# ------------------------------------------------------------------------
-# End finding boost libraries
-# ------------------------------------------------------------------------
-
-set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
-set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR})
-
-# The above setting of Boost_FOUND was based only on the header files.
-# Update it for the requested component libraries.
-if(Boost_FOUND)
- # The headers were found. Check for requested component libs.
- set(_boost_CHECKED_COMPONENT FALSE)
- set(_Boost_MISSING_COMPONENTS "")
- foreach(COMPONENT ${Boost_FIND_COMPONENTS})
- string(TOUPPER ${COMPONENT} COMPONENT)
- set(_boost_CHECKED_COMPONENT TRUE)
- if(NOT Boost_${COMPONENT}_FOUND)
- string(TOLOWER ${COMPONENT} COMPONENT)
- list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
- endif()
- endforeach()
-
- if(Boost_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
- endif()
-
- if (_Boost_MISSING_COMPONENTS)
- set(Boost_FOUND 0)
- # We were unable to find some libraries, so generate a sensible
- # error message that lists the libraries we were unable to find.
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}\nCould not find the following")
- if(Boost_USE_STATIC_LIBS)
- set(Boost_ERROR_REASON "${Boost_ERROR_REASON} static")
- endif()
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON} Boost libraries:\n")
- foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON} ${Boost_NAMESPACE}_${COMPONENT}\n")
- endforeach()
-
- list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED)
- list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS)
- if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. If you still have problems search on forum for TCE00020.")
- else ()
- set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. If you still have problems search on forum for TCE00021.")
- endif ()
- endif ()
-
- if( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
- # Compatibility Code for backwards compatibility with CMake
- # 2.4's FindBoost module.
-
- # Look for the boost library path.
- # Note that the user may not have installed any libraries
- # so it is quite possible the Boost_LIBRARY_DIRS may not exist.
- set(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
-
- if("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
- get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
- endif()
-
- if("${_boost_LIB_DIR}" MATCHES "/include$")
- # Strip off the trailing "/include" in the path.
- get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
- endif()
-
- if(EXISTS "${_boost_LIB_DIR}/lib")
- set(_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
- else()
- if(EXISTS "${_boost_LIB_DIR}/stage/lib")
- set(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
- else()
- set(_boost_LIB_DIR "")
- endif()
- endif()
-
- if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
- set(Boost_LIBRARY_DIRS ${_boost_LIB_DIR})
- endif()
-
- endif()
-else()
- # Boost headers were not found so no components were found.
- foreach(COMPONENT ${Boost_FIND_COMPONENTS})
- string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
- set(Boost_${UPPERCOMPONENT}_FOUND 0)
- endforeach()
-endif()
-
-# ------------------------------------------------------------------------
-# Notification to end user about what was found
-# ------------------------------------------------------------------------
-
-set(Boost_LIBRARIES "")
-if(Boost_FOUND)
- if(NOT Boost_FIND_QUIETLY)
- message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
- if(Boost_FIND_COMPONENTS)
- message(STATUS "Found the following Boost libraries:")
- endif()
- endif()
- foreach( COMPONENT ${Boost_FIND_COMPONENTS} )
- string( TOUPPER ${COMPONENT} UPPERCOMPONENT )
- if( Boost_${UPPERCOMPONENT}_FOUND )
- if(NOT Boost_FIND_QUIETLY)
- message (STATUS " ${COMPONENT}")
- endif()
- list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY})
- endif()
- endforeach()
-else()
- if(Boost_FIND_REQUIRED)
- message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
- else()
- if(NOT Boost_FIND_QUIETLY)
- # we opt not to automatically output Boost_ERROR_REASON here as
- # it could be quite lengthy and somewhat imposing in its requests
- # Since Boost is not always a required dependency we'll leave this
- # up to the end-user.
- if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG)
- message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}")
- else()
- message(STATUS "Could NOT find Boost")
- endif()
- endif()
- endif()
-endif()
-
-# Configure display of cache entries in GUI.
-foreach(v BOOSTROOT BOOST_ROOT ${_Boost_VARS_INC} ${_Boost_VARS_LIB})
- get_property(_type CACHE ${v} PROPERTY TYPE)
- if(_type)
- set_property(CACHE ${v} PROPERTY ADVANCED 1)
- if("x${_type}" STREQUAL "xUNINITIALIZED")
- if("x${v}" STREQUAL "xBoost_ADDITIONAL_VERSIONS")
- set_property(CACHE ${v} PROPERTY TYPE STRING)
- else()
- set_property(CACHE ${v} PROPERTY TYPE PATH)
- endif()
- endif()
- endif()
-endforeach()
-
-# Record last used values of input variables so we can
-# detect on the next run if the user changed them.
-foreach(v
- ${_Boost_VARS_INC} ${_Boost_VARS_LIB}
- ${_Boost_VARS_DIR} ${_Boost_VARS_NAME}
- )
- if(DEFINED ${v})
- set(_${v}_LAST "${${v}}" CACHE INTERNAL "Last used ${v} value.")
- else()
- unset(_${v}_LAST CACHE)
- endif()
-endforeach()
-
-# Maintain a persistent list of components requested anywhere since
-# the last flush.
-set(_Boost_COMPONENTS_SEARCHED "${_Boost_COMPONENTS_SEARCHED}")
-list(APPEND _Boost_COMPONENTS_SEARCHED ${Boost_FIND_COMPONENTS})
-list(REMOVE_DUPLICATES _Boost_COMPONENTS_SEARCHED)
-list(SORT _Boost_COMPONENTS_SEARCHED)
-set(_Boost_COMPONENTS_SEARCHED "${_Boost_COMPONENTS_SEARCHED}"
- CACHE INTERNAL "Components requested for this build tree.")
diff --git a/cmake/macros/FindMySQL.cmake b/cmake/macros/FindMySQL.cmake
index 02d17ab48f2..122e88be6a2 100644
--- a/cmake/macros/FindMySQL.cmake
+++ b/cmake/macros/FindMySQL.cmake
@@ -1,19 +1,60 @@
+# This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
#
-# Find the MySQL client includes and library
+# 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; either version 2 of the License, or (at your
+# option) any later version.
#
+# 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, see .
+
+#[=======================================================================[.rst:
+FindMySQL
+-----------
+
+Find MySQL.
+
+Imported Targets
+^^^^^^^^^^^^^^^^
+
+This module defines the following :prop_tgt:`IMPORTED` targets:
+
+``MySQL::MySQL``
+ MySQL client library, if found.
-# This module defines
-# MYSQL_INCLUDE_DIR, where to find mysql.h
-# MYSQL_LIBRARIES, the libraries to link against to connect to MySQL
-# MYSQL_EXECUTABLE, the MySQL executable.
-# MYSQL_FOUND, if false, you cannot build anything that requires MySQL.
+Result Variables
+^^^^^^^^^^^^^^^^
-# also defined, but not for general use are
-# MYSQL_LIBRARY, where to find the MySQL library.
+This module will set the following variables in your project:
-set( MYSQL_FOUND 0 )
+``MYSQL_FOUND``
+ System has MySQL.
+``MYSQL_INCLUDE_DIR``
+ MySQL include directory.
+``MYSQL_LIBRARY``
+ MySQL library.
+``MYSQL_EXECUTABLE``
+ Path to mysql client binary.
-if( UNIX )
+Hints
+^^^^^
+
+Set ``MYSQL_ROOT_DIR`` to the root directory of MySQL installation.
+#]=======================================================================]
+
+set(MYSQL_FOUND 0)
+
+set(_MYSQL_ROOT_HINTS
+ ${MYSQL_ROOT_DIR}
+ ENV MYSQL_ROOT_DIR
+)
+
+if(UNIX)
set(MYSQL_CONFIG_PREFER_PATH "$ENV{MYSQL_HOME}/bin" CACHE FILEPATH
"preferred path to MySQL (mysql_config)"
)
@@ -25,21 +66,23 @@ if( UNIX )
/usr/bin/
)
- if( MYSQL_CONFIG )
+ if(MYSQL_CONFIG)
message(STATUS "Using mysql-config: ${MYSQL_CONFIG}")
# set INCLUDE_DIR
- exec_program(${MYSQL_CONFIG}
- ARGS --include
+ execute_process(
+ COMMAND "${MYSQL_CONFIG}" --include
OUTPUT_VARIABLE MY_TMP
+ OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REGEX REPLACE "-I([^ ]*)( .*)?" "\\1" MY_TMP "${MY_TMP}")
set(MYSQL_ADD_INCLUDE_PATH ${MY_TMP} CACHE FILEPATH INTERNAL)
#message("[DEBUG] MYSQL ADD_INCLUDE_PATH : ${MYSQL_ADD_INCLUDE_PATH}")
# set LIBRARY_DIR
- exec_program(${MYSQL_CONFIG}
- ARGS --libs_r
+ execute_process(
+ COMMAND "${MYSQL_CONFIG}" --libs_r
OUTPUT_VARIABLE MY_TMP
+ OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(MYSQL_ADD_LIBRARIES "")
string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
@@ -57,28 +100,23 @@ if( UNIX )
#message("[DEBUG] MYSQL ADD_LIBRARIES_PATH : ${MYSQL_ADD_LIBRARIES_PATH}")
endforeach(LIB ${MYSQL_LIBS})
- else( MYSQL_CONFIG )
+ else(MYSQL_CONFIG)
set(MYSQL_ADD_LIBRARIES "")
list(APPEND MYSQL_ADD_LIBRARIES "mysqlclient_r")
- endif( MYSQL_CONFIG )
-endif( UNIX )
+ endif(MYSQL_CONFIG)
+endif(UNIX)
-if( WIN32 )
+if(WIN32)
# read environment variables and change \ to /
- SET(PROGRAM_FILES_32 $ENV{ProgramFiles})
- if (${PROGRAM_FILES_32})
- STRING(REPLACE "\\\\" "/" PROGRAM_FILES_32 ${PROGRAM_FILES_32})
- endif(${PROGRAM_FILES_32})
-
- SET(PROGRAM_FILES_64 $ENV{ProgramW6432})
- if (${PROGRAM_FILES_64})
- STRING(REPLACE "\\\\" "/" PROGRAM_FILES_64 ${PROGRAM_FILES_64})
- endif(${PROGRAM_FILES_64})
-endif ( WIN32 )
+ file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" PROGRAM_FILES_32)
+ file(TO_CMAKE_PATH "$ENV{ProgramW6432}" PROGRAM_FILES_64)
+endif(WIN32)
find_path(MYSQL_INCLUDE_DIR
NAMES
mysql.h
+ HINTS
+ ${_MYSQL_ROOT_HINTS}
PATHS
${MYSQL_ADD_INCLUDE_PATH}
/usr/include
@@ -86,42 +124,50 @@ find_path(MYSQL_INCLUDE_DIR
/usr/local/include
/usr/local/include/mysql
/usr/local/mysql/include
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7/include"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.6/include"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.5/include"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.1/include"
- "${PROGRAM_FILES_64}/MySQL/include"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.7/include"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.6/include"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.5/include"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.1/include"
- "${PROGRAM_FILES_32}/MySQL/include"
- "C:/MySQL/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/include"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.7/include"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.6/include"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.5/include"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.1/include"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.7/include"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.6/include"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.5/include"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.1/include"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.3"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.2"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.1"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.0"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7"
+ "${PROGRAM_FILES_64}/MySQL"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.3"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.2"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.1"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.0"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.7"
+ "${PROGRAM_FILES_32}/MySQL"
+ "C:/MySQL"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.3;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.2;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.1;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.3;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.2;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.1;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.3"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.2"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.1"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.0"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 5.7"
"c:/msys/local/include"
- "$ENV{MYSQL_ROOT}/include"
+ "$ENV{MYSQL_ROOT}"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.4;INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.4 (x64);INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.5;INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.5 (x64);INSTALLDIR]"
+ PATH_SUFFIXES
+ include
+ include/mysql
DOC
"Specify the directory containing mysql.h."
)
-if( UNIX )
+if(UNIX)
foreach(LIB ${MYSQL_ADD_LIBRARIES})
- find_library( MYSQL_LIBRARY
+ find_library(MYSQL_LIBRARY
NAMES
mysql libmysql ${LIB}
PATHS
@@ -134,68 +180,62 @@ if( UNIX )
DOC "Specify the location of the mysql library here."
)
endforeach(LIB ${MYSQL_ADD_LIBRARY})
-endif( UNIX )
+endif(UNIX)
-if( WIN32 )
- find_library( MYSQL_LIBRARY
+if(WIN32)
+ find_library(MYSQL_LIBRARY
NAMES
- libmysql
+ libmysql libmariadb
+ HINTS
+ ${_MYSQL_ROOT_HINTS}
PATHS
${MYSQL_ADD_LIBRARIES_PATH}
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7/lib"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.6/lib"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.5/lib"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.1/lib"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7/lib/opt"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.6/lib/opt"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.5/lib/opt"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.1/lib/opt"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.3"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.2"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.1"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.0"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7"
"${PROGRAM_FILES_64}/MySQL/lib"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.7/lib"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.6/lib"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.5/lib"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.1/lib"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.7/lib/opt"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.6/lib/opt"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.5/lib/opt"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.1/lib/opt"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.3"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.2"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.1"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.0"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.7"
"${PROGRAM_FILES_32}/MySQL/lib"
"C:/MySQL/lib/debug"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.7/lib/opt"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.6/lib/opt"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.5/lib/opt"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.1/lib/opt"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.7/lib/opt"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.6/lib/opt"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.5/lib/opt"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.1/lib/opt"
- "c:/msys/local/include"
- "$ENV{MYSQL_ROOT}/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.3;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.2;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.1;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.3;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.2;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.1;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.3"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.2"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.1"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.0"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 5.7"
+ "c:/msys/local/lib"
+ "$ENV{MYSQL_ROOT}"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.4;INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.4 (x64);INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.5;INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.5 (x64);INSTALLDIR]"
+ PATH_SUFFIXES
+ lib
+ lib/opt
DOC "Specify the location of the mysql library here."
)
-endif( WIN32 )
+endif(WIN32)
# On Windows you typically don't need to include any extra libraries
# to build MYSQL stuff.
-if( NOT WIN32 )
- find_library( MYSQL_EXTRA_LIBRARIES
+if(NOT WIN32)
+ find_library(MYSQL_EXTRA_LIBRARIES
NAMES
z zlib
PATHS
@@ -204,11 +244,11 @@ if( NOT WIN32 )
DOC
"if more libraries are necessary to link in a MySQL client (typically zlib), specify them here."
)
-else( NOT WIN32 )
- set( MYSQL_EXTRA_LIBRARIES "" )
-endif( NOT WIN32 )
+else(NOT WIN32)
+ set(MYSQL_EXTRA_LIBRARIES "")
+endif(NOT WIN32)
-if( UNIX )
+if(UNIX)
find_program(MYSQL_EXECUTABLE mysql
PATHS
${MYSQL_CONFIG_PREFER_PATH}
@@ -218,73 +258,116 @@ if( UNIX )
DOC
"path to your mysql binary."
)
-endif( UNIX )
+endif(UNIX)
-if( WIN32 )
- find_program(MYSQL_EXECUTABLE mysql
- PATHS
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7/bin"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.6/bin"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.5/bin"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.1/bin"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7/bin/opt"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.6/bin/opt"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.5/bin/opt"
- "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.1/bin/opt"
- "${PROGRAM_FILES_64}/MySQL/bin"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.7/bin"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.6/bin"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.5/bin"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.1/bin"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.7/bin/opt"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.6/bin/opt"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.5/bin/opt"
- "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.1/bin/opt"
- "${PROGRAM_FILES_32}/MySQL/bin"
- "C:/MySQL/bin/debug"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/bin"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/bin"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/bin"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/bin"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]/bin/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/bin/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/bin/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/bin/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/bin"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/bin"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/bin"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/bin"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]/bin/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/bin/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/bin/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/bin/opt"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.7/bin/opt"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.6/bin/opt"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.5/bin/opt"
- "$ENV{ProgramFiles}/MySQL/MySQL Server 5.1/bin/opt"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.7/bin/opt"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.6/bin/opt"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.5/bin/opt"
- "$ENV{SystemDrive}/MySQL/MySQL Server 5.1/bin/opt"
- "c:/msys/local/include"
- "$ENV{MYSQL_ROOT}/bin"
- DOC
- "path to your mysql binary."
- )
-endif( WIN32 )
+if(WIN32)
+ find_program(MYSQL_EXECUTABLE mysql
+ HINTS
+ ${_MYSQL_ROOT_HINTS}
+ PATHS
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.3"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.2"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.1"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 8.0"
+ "${PROGRAM_FILES_64}/MySQL/MySQL Server 5.7"
+ "${PROGRAM_FILES_64}/MySQL"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.3"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.2"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.1"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 8.0"
+ "${PROGRAM_FILES_32}/MySQL/MySQL Server 5.7"
+ "${PROGRAM_FILES_32}/MySQL"
+ "C:/MySQL/bin/debug"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.3;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.2;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.1;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 8.0;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.7;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.3;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.2;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.1;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 8.0;Location]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.7;Location]"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.3"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.2"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.1"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 8.0"
+ "$ENV{SystemDrive}/MySQL/MySQL Server 5.7"
+ "c:/msys/local/bin"
+ "$ENV{MYSQL_ROOT}"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.4;INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.4 (x64);INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.5;INSTALLDIR]"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MariaDB 10.5 (x64);INSTALLDIR]"
+ PATH_SUFFIXES
+ bin
+ bin/opt
+ DOC
+ "path to your mysql binary."
+ )
+endif(WIN32)
+
+unset(MySQL_lib_WANTED)
+unset(MySQL_binary_WANTED)
+set(MYSQL_REQUIRED_VARS "")
+foreach(_comp IN LISTS MySQL_FIND_COMPONENTS)
+ if(_comp STREQUAL "lib")
+ set(MySQL_${_comp}_WANTED TRUE)
+ if(MySQL_FIND_REQUIRED_${_comp})
+ list(APPEND MYSQL_REQUIRED_VARS "MYSQL_LIBRARY")
+ list(APPEND MYSQL_REQUIRED_VARS "MYSQL_INCLUDE_DIR")
+ endif()
+ if(EXISTS "${MYSQL_LIBRARY}" AND EXISTS "${MYSQL_INCLUDE_DIR}")
+ set(MySQL_${_comp}_FOUND TRUE)
+ else()
+ set(MySQL_${_comp}_FOUND FALSE)
+ endif()
+ elseif(_comp STREQUAL "binary")
+ set(MySQL_${_comp}_WANTED TRUE)
+ if(MySQL_FIND_REQUIRED_${_comp})
+ list(APPEND MYSQL_REQUIRED_VARS "MYSQL_EXECUTABLE")
+ endif()
+ if(EXISTS "${MYSQL_EXECUTABLE}" )
+ set(MySQL_${_comp}_FOUND TRUE)
+ else()
+ set(MySQL_${_comp}_FOUND FALSE)
+ endif()
+ else()
+ message(WARNING "${_comp} is not a valid MySQL component")
+ set(MySQL_${_comp}_FOUND FALSE)
+ endif()
+endforeach()
+unset(_comp)
-if( MYSQL_LIBRARY )
- if( MYSQL_INCLUDE_DIR )
- set( MYSQL_FOUND 1 )
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MySQL
+ REQUIRED_VARS
+ ${MYSQL_REQUIRED_VARS}
+ HANDLE_COMPONENTS
+ FAIL_MESSAGE
+ "Could not find the MySQL libraries! Please install the development libraries and headers"
+)
+unset(MYSQL_REQUIRED_VARS)
+
+if(MYSQL_FOUND)
+ if(MySQL_lib_WANTED AND MySQL_lib_FOUND)
message(STATUS "Found MySQL library: ${MYSQL_LIBRARY}")
message(STATUS "Found MySQL headers: ${MYSQL_INCLUDE_DIR}")
- else( MYSQL_INCLUDE_DIR )
- message(FATAL_ERROR "Could not find MySQL headers! Please install the development libraries and headers")
- endif( MYSQL_INCLUDE_DIR )
- if( MYSQL_EXECUTABLE )
+ endif()
+ if(MySQL_binary_WANTED AND MySQL_binary_FOUND)
message(STATUS "Found MySQL executable: ${MYSQL_EXECUTABLE}")
- endif( MYSQL_EXECUTABLE )
- mark_as_advanced( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIR MYSQL_EXECUTABLE)
-else( MYSQL_LIBRARY )
+ endif()
+ mark_as_advanced(MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIR MYSQL_EXECUTABLE)
+
+ if(NOT TARGET MySQL::MySQL AND MySQL_lib_WANTED AND MySQL_lib_FOUND)
+ add_library(MySQL::MySQL UNKNOWN IMPORTED)
+ set_target_properties(MySQL::MySQL
+ PROPERTIES
+ IMPORTED_LOCATION
+ "${MYSQL_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${MYSQL_INCLUDE_DIR}")
+ endif()
+else()
message(FATAL_ERROR "Could not find the MySQL libraries! Please install the development libraries and headers")
-endif( MYSQL_LIBRARY )
+endif()
diff --git a/cmake/macros/FindOpenSSL.cmake b/cmake/macros/FindOpenSSL.cmake
index 3af44729410..98788bc2986 100644
--- a/cmake/macros/FindOpenSSL.cmake
+++ b/cmake/macros/FindOpenSSL.cmake
@@ -1,74 +1,314 @@
-# - Try to find the OpenSSL encryption library
-# Once done this will define
-#
-# OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL
-#
-# Read-Only variables:
-# OPENSSL_FOUND - system has the OpenSSL library
-# OPENSSL_INCLUDE_DIR - the OpenSSL include directory
-# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
-
-#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
-# Copyright 2006 Alexander Neundorf
-# Copyright 2009-2010 Mathieu Malaterre
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# http://www.slproweb.com/products/Win32OpenSSL.html
-
-set(OPENSSL_EXPECTED_VERSION "1.0")
-set(OPENSSL_MAX_VERSION "1.2")
-
-SET(_OPENSSL_ROOT_HINTS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
- )
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
-IF(PLATFORM EQUAL 64)
- SET(_OPENSSL_ROOT_PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]"
- "C:/OpenSSL-Win64/"
- "C:/OpenSSL/"
- )
-ELSE()
- SET(_OPENSSL_ROOT_PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]"
+#[=======================================================================[.rst:
+FindOpenSSL
+-----------
+
+Find the OpenSSL encryption library.
+
+This module finds an installed OpenSSL library and determines its version.
+
+.. versionadded:: 3.19
+ When a version is requested, it can be specified as a simple value or as a
+ range. For a detailed description of version range usage and capabilities,
+ refer to the :command:`find_package` command.
+
+.. versionadded:: 3.18
+ Support for OpenSSL 3.0.
+
+Optional COMPONENTS
+^^^^^^^^^^^^^^^^^^^
+
+.. versionadded:: 3.12
+
+This module supports two optional COMPONENTS: ``Crypto`` and ``SSL``. Both
+components have associated imported targets, as described below.
+
+Imported Targets
+^^^^^^^^^^^^^^^^
+
+.. versionadded:: 3.4
+
+This module defines the following :prop_tgt:`IMPORTED` targets:
+
+``OpenSSL::SSL``
+ The OpenSSL ``ssl`` library, if found.
+``OpenSSL::Crypto``
+ The OpenSSL ``crypto`` library, if found.
+``OpenSSL::applink``
+ .. versionadded:: 3.18
+
+ The OpenSSL ``applink`` components that might be need to be compiled into
+ projects under MSVC. This target is available only if found OpenSSL version
+ is not less than 0.9.8. By linking this target the above OpenSSL targets can
+ be linked even if the project has different MSVC runtime configurations with
+ the above OpenSSL targets. This target has no effect on platforms other than
+ MSVC.
+
+NOTE: Due to how ``INTERFACE_SOURCES`` are consumed by the consuming target,
+unless you certainly know what you are doing, it is always preferred to link
+``OpenSSL::applink`` target as ``PRIVATE`` and to make sure that this target is
+linked at most once for the whole dependency graph of any library or
+executable:
+
+.. code-block:: cmake
+
+ target_link_libraries(myTarget PRIVATE OpenSSL::applink)
+
+Otherwise you would probably encounter unexpected random problems when building
+and linking, as both the ISO C and the ISO C++ standard claims almost nothing
+about what a link process should be.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module will set the following variables in your project:
+
+``OPENSSL_FOUND``
+ System has the OpenSSL library. If no components are requested it only
+ requires the crypto library.
+``OPENSSL_INCLUDE_DIR``
+ The OpenSSL include directory.
+``OPENSSL_CRYPTO_LIBRARY``
+ The OpenSSL crypto library.
+``OPENSSL_CRYPTO_LIBRARIES``
+ The OpenSSL crypto library and its dependencies.
+``OPENSSL_SSL_LIBRARY``
+ The OpenSSL SSL library.
+``OPENSSL_SSL_LIBRARIES``
+ The OpenSSL SSL library and its dependencies.
+``OPENSSL_LIBRARIES``
+ All OpenSSL libraries and their dependencies.
+``OPENSSL_VERSION``
+ This is set to ``$major.$minor.$revision$patch`` (e.g. ``0.9.8s``).
+``OPENSSL_APPLINK_SOURCE``
+ The sources in the target ``OpenSSL::applink`` that is mentioned above. This
+ variable shall always be undefined if found openssl version is less than
+ 0.9.8 or if platform is not MSVC.
+
+Hints
+^^^^^
+
+The following variables may be set to control search behavior:
+
+``OPENSSL_ROOT_DIR``
+ Set to the root directory of an OpenSSL installation.
+
+``OPENSSL_USE_STATIC_LIBS``
+ .. versionadded:: 3.4
+
+ Set to ``TRUE`` to look for static libraries.
+
+``OPENSSL_MSVC_STATIC_RT``
+ .. versionadded:: 3.5
+
+ Set to ``TRUE`` to choose the MT version of the lib.
+
+``ENV{PKG_CONFIG_PATH}``
+ On UNIX-like systems, ``pkg-config`` is used to locate the system OpenSSL.
+ Set the ``PKG_CONFIG_PATH`` environment variable to look in alternate
+ locations. Useful on multi-lib systems.
+#]=======================================================================]
+
+macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
+ unset(_OpenSSL_extra_static_deps)
+ if(UNIX AND
+ (("${ssl_library}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$") OR
+ ("${crypto_library}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")))
+ set(_OpenSSL_has_dependencies TRUE)
+ unset(_OpenSSL_has_dependency_zlib)
+ if(OPENSSL_USE_STATIC_LIBS)
+ set(_OpenSSL_libs "${_OPENSSL_STATIC_LIBRARIES}")
+ set(_OpenSSL_ldflags_other "${_OPENSSL_STATIC_LDFLAGS_OTHER}")
+ else()
+ set(_OpenSSL_libs "${_OPENSSL_LIBRARIES}")
+ set(_OpenSSL_ldflags_other "${_OPENSSL_LDFLAGS_OTHER}")
+ endif()
+ if(_OpenSSL_libs)
+ unset(_OpenSSL_has_dependency_dl)
+ foreach(_OPENSSL_DEP_LIB IN LISTS _OpenSSL_libs)
+ if (_OPENSSL_DEP_LIB STREQUAL "ssl" OR _OPENSSL_DEP_LIB STREQUAL "crypto")
+ # ignoring: these are the targets
+ elseif(_OPENSSL_DEP_LIB STREQUAL CMAKE_DL_LIBS)
+ set(_OpenSSL_has_dependency_dl TRUE)
+ elseif(_OPENSSL_DEP_LIB STREQUAL "z")
+ find_package(ZLIB)
+ set(_OpenSSL_has_dependency_zlib TRUE)
+ else()
+ list(APPEND _OpenSSL_extra_static_deps "${_OPENSSL_DEP_LIB}")
+ endif()
+ endforeach()
+ unset(_OPENSSL_DEP_LIB)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(_OpenSSL_has_dependency_dl TRUE)
+ endif()
+ if(_OpenSSL_ldflags_other)
+ unset(_OpenSSL_has_dependency_threads)
+ foreach(_OPENSSL_DEP_LDFLAG IN LISTS _OpenSSL_ldflags_other)
+ if (_OPENSSL_DEP_LDFLAG STREQUAL "-pthread")
+ set(_OpenSSL_has_dependency_threads TRUE)
+ find_package(Threads)
+ endif()
+ endforeach()
+ unset(_OPENSSL_DEP_LDFLAG)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(_OpenSSL_has_dependency_threads TRUE)
+ find_package(Threads)
+ endif()
+ unset(_OpenSSL_libs)
+ unset(_OpenSSL_ldflags_other)
+ else()
+ set(_OpenSSL_has_dependencies FALSE)
+ endif()
+endmacro()
+
+function(_OpenSSL_add_dependencies libraries_var)
+ if(_OpenSSL_has_dependency_zlib)
+ list(APPEND ${libraries_var} ${ZLIB_LIBRARY})
+ endif()
+ if(_OpenSSL_has_dependency_threads)
+ list(APPEND ${libraries_var} ${CMAKE_THREAD_LIBS_INIT})
+ endif()
+ if(_OpenSSL_has_dependency_dl)
+ list(APPEND ${libraries_var} ${CMAKE_DL_LIBS})
+ endif()
+ list(APPEND ${libraries_var} ${_OpenSSL_extra_static_deps})
+ set(${libraries_var} ${${libraries_var}} PARENT_SCOPE)
+endfunction()
+
+function(_OpenSSL_target_add_dependencies target)
+ if(_OpenSSL_has_dependencies)
+ if(_OpenSSL_has_dependency_zlib)
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB )
+ endif()
+ if(_OpenSSL_has_dependency_threads)
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)
+ endif()
+ if(_OpenSSL_has_dependency_dl)
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${CMAKE_DL_LIBS} )
+ endif()
+ if(_OpenSSL_extra_static_deps)
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${_OpenSSL_extra_static_deps})
+ endif()
+ endif()
+ if(WIN32 AND OPENSSL_USE_STATIC_LIBS)
+ if(WINCE)
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ws2 )
+ else()
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ws2_32 )
+ endif()
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES crypt32 )
+ endif()
+endfunction()
+
+if (UNIX)
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(_OPENSSL QUIET openssl)
+endif ()
+
+# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
+if(OPENSSL_USE_STATIC_LIBS)
+ set(_openssl_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ if(MSVC)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ else()
+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
+ endif()
+endif()
+
+if(CMAKE_SYSTEM_NAME STREQUAL "QNX" AND
+ CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL "7.0" AND CMAKE_SYSTEM_VERSION VERSION_LESS "7.1" AND
+ OpenSSL_FIND_VERSION VERSION_GREATER_EQUAL "1.1" AND OpenSSL_FIND_VERSION VERSION_LESS "1.2")
+ # QNX 7.0.x provides openssl 1.0.2 and 1.1.1 in parallel:
+ # * openssl 1.0.2: libcrypto.so.2 and libssl.so.2, headers under usr/include/openssl
+ # * openssl 1.1.1: libcrypto1_1.so.2.1 and libssl1_1.so.2.1, header under usr/include/openssl1_1
+ # See http://www.qnx.com/developers/articles/rel_6726_0.html
+ set(_OPENSSL_FIND_PATH_SUFFIX "openssl1_1")
+ set(_OPENSSL_NAME_POSTFIX "1_1")
+else()
+ set(_OPENSSL_FIND_PATH_SUFFIX "include")
+endif()
+
+if (OPENSSL_ROOT_DIR OR NOT "$ENV{OPENSSL_ROOT_DIR}" STREQUAL "")
+ set(_OPENSSL_ROOT_HINTS HINTS ${OPENSSL_ROOT_DIR} ENV OPENSSL_ROOT_DIR)
+ set(_OPENSSL_ROOT_PATHS NO_DEFAULT_PATH)
+elseif (MSVC)
+ # http://www.slproweb.com/products/Win32OpenSSL.html
+ set(_OPENSSL_MSI_INSTALL_GUIDS "")
+
+ if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
+ if(TRINITY_SYSTEM_PROCESSOR STREQUAL "arm64")
+ set(_arch "Win64-ARM")
+ set(_OPENSSL_MSI_INSTALL_GUIDS "99C28AFA-6419-40B1-B88D-32B810BB4234")
+ else()
+ set(_arch "Win64")
+ set(_OPENSSL_MSI_INSTALL_GUIDS "117551DB-A110-4BBD-BB05-CFE0BCB3ED31" "50A9FBE2-0F8C-4D5D-97A4-A63A71C4EA1E")
+ endif()
+ file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
+ set(_OPENSSL_ROOT_HINTS HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]")
+ else()
+ set(_arch "Win32")
+ set(_progfiles_x86 "ProgramFiles(x86)")
+ if(NOT "$ENV{${_progfiles_x86}}" STREQUAL "")
+ # under windows 64 bit machine
+ file(TO_CMAKE_PATH "$ENV{${_progfiles_x86}}" _programfiles)
+ else()
+ # under windows 32 bit machine
+ file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _programfiles)
+ endif()
+ set(_OPENSSL_ROOT_HINTS HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]")
+ set(_OPENSSL_MSI_INSTALL_GUIDS "A1EEC576-43B9-4E75-9E02-03DA542D2A38" "31D2408A-9CAE-4988-9EC3-F40FDE7D6AE5")
+ endif()
+
+ # If OpenSSL was installed using .msi package instead of .exe, Inno Setup registry values are not written to Uninstall\OpenSSL
+ # but because it is only a shim around Inno Setup it does write the location of uninstaller which we can use to determine path
+ foreach(_OPENSSL_MSI_INSTALL_GUID IN LISTS _OPENSSL_MSI_INSTALL_GUIDS)
+ get_filename_component(_OPENSSL_MSI_INSTALL_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Inno Setup MSIs\\${_OPENSSL_MSI_INSTALL_GUID};]" DIRECTORY)
+ if(NOT _OPENSSL_MSI_INSTALL_PATH STREQUAL "/")
+ list(INSERT _OPENSSL_ROOT_HINTS 2 ${_OPENSSL_MSI_INSTALL_PATH})
+ endif()
+ endforeach()
+ unset(_OPENSSL_MSI_INSTALL_GUIDS)
+
+ set(_OPENSSL_ROOT_PATHS
+ PATHS
+ "${_programfiles}/OpenSSL"
+ "${_programfiles}/OpenSSL-${_arch}"
"C:/OpenSSL/"
- )
-ENDIF()
+ "C:/OpenSSL-${_arch}/"
+ )
+ unset(_programfiles)
+ unset(_arch)
+endif ()
-FIND_PATH(OPENSSL_ROOT_DIR
- NAMES
- include/openssl/ssl.h
- HINTS
+if(HOMEBREW_PREFIX)
+ list(APPEND _OPENSSL_ROOT_HINTS
+ "${HOMEBREW_PREFIX}/opt/openssl@3")
+endif()
+
+set(_OPENSSL_ROOT_HINTS_AND_PATHS
${_OPENSSL_ROOT_HINTS}
- PATHS
${_OPENSSL_ROOT_PATHS}
-)
-MARK_AS_ADVANCED(OPENSSL_ROOT_DIR)
+ )
-# Re-use the previous path:
-FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h
- ${OPENSSL_ROOT_DIR}/include
+find_path(OPENSSL_INCLUDE_DIR
+ NAMES
+ openssl/ssl.h
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ HINTS
+ ${_OPENSSL_INCLUDEDIR}
+ ${_OPENSSL_INCLUDE_DIRS}
+ PATH_SUFFIXES
+ ${_OPENSSL_FIND_PATH_SUFFIX}
)
-IF(WIN32 AND NOT CYGWIN)
- # MINGW should go here too
- IF(MSVC)
+if(WIN32 AND NOT CYGWIN)
+ if(MSVC)
# /MD and /MDd are the standard values - if someone wants to use
# others, the libnames have to change here too
# use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
- # TODO: handle /MT and static lib
+ # enable OPENSSL_MSVC_STATIC_RT to get the libs build /MT (Multithreaded no-DLL)
# In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
# * MD for dynamic-release
# * MDd for dynamic-debug
@@ -76,128 +316,326 @@ IF(WIN32 AND NOT CYGWIN)
# * MTd for static-debug
# Implementation details:
- # We are using the libraries located in the VC subdir instead of the parent directory eventhough :
+ # We are using the libraries located in the VC subdir instead of the parent directory even though :
# libeay32MD.lib is identical to ../libeay32.lib, and
# ssleay32MD.lib is identical to ../ssleay32.lib
+ # enable OPENSSL_USE_STATIC_LIBS to use the static libs located in lib/VC/static
+
+ if (OPENSSL_MSVC_STATIC_RT)
+ set(_OPENSSL_MSVC_RT_MODE "MT")
+ else ()
+ set(_OPENSSL_MSVC_RT_MODE "MD")
+ endif ()
# Since OpenSSL 1.1, lib names are like libcrypto32MTd.lib and libssl32MTd.lib
if( "${CMAKE_SIZEOF_VOID_P}" STREQUAL "8" )
- set(_OPENSSL_MSVC_ARCH_SUFFIX "64")
+ set(_OPENSSL_MSVC_ARCH_SUFFIX "64")
+ if(TRINITY_SYSTEM_PROCESSOR STREQUAL "arm64")
+ set(_OPENSSL_MSVC_ARCH_DIRECTORY "arm64")
+ else()
+ set(_OPENSSL_MSVC_ARCH_DIRECTORY "x64")
+ endif()
else()
- set(_OPENSSL_MSVC_ARCH_SUFFIX "32")
+ set(_OPENSSL_MSVC_ARCH_SUFFIX "32")
+ set(_OPENSSL_MSVC_ARCH_DIRECTORY "x86")
endif()
- FIND_LIBRARY(LIB_EAY_DEBUG
+ if(OPENSSL_USE_STATIC_LIBS)
+ set(_OPENSSL_STATIC_SUFFIX
+ "_static"
+ )
+ set(_OPENSSL_PATH_SUFFIXES
+ "lib/VC/static"
+ "VC/static"
+ "lib"
+ )
+ else()
+ set(_OPENSSL_STATIC_SUFFIX
+ ""
+ )
+ set(_OPENSSL_PATH_SUFFIXES
+ "lib/VC"
+ "VC"
+ "lib"
+ )
+ endif ()
+
+ find_library(LIB_EAY_DEBUG
NAMES
- libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}MDd libeay32MDd libeay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/VC
+ libcrypto${_OPENSSL_STATIC_SUFFIX}
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ "lib/VC/${_OPENSSL_MSVC_ARCH_DIRECTORY}/${_OPENSSL_MSVC_RT_MODE}d"
)
- FIND_LIBRARY(LIB_EAY_RELEASE
- NAMES
- libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}MD libeay32MD libeay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/VC
- )
+ if(NOT LIB_EAY_DEBUG)
+ find_library(LIB_EAY_DEBUG
+ NAMES
+ # When OpenSSL is built with default options, the static library name is suffixed with "_static".
+ # Looking the "libcrypto_static.lib" with a higher priority than "libcrypto.lib" which is the
+ # import library of "libcrypto.dll".
+ libcrypto${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+ libcrypto${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+ libcrypto${_OPENSSL_STATIC_SUFFIX}d
+ libeay32${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+ libeay32${_OPENSSL_STATIC_SUFFIX}d
+ crypto${_OPENSSL_STATIC_SUFFIX}d
+ # When OpenSSL is built with the "-static" option, only the static build is produced,
+ # and it is not suffixed with "_static".
+ libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+ libcrypto${_OPENSSL_MSVC_RT_MODE}d
+ libcryptod
+ libeay32${_OPENSSL_MSVC_RT_MODE}d
+ libeay32d
+ cryptod
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ ${_OPENSSL_PATH_SUFFIXES}
+ )
+ endif()
- FIND_LIBRARY(SSL_EAY_DEBUG
+ find_library(LIB_EAY_RELEASE
NAMES
- libssl${_OPENSSL_MSVC_ARCH_SUFFIX}MDd ssleay32MDd ssleay32 ssl
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/VC
+ # When OpenSSL is built with default options, the static library name is suffixed with "_static".
+ # Looking the "libcrypto_static.lib" with a higher priority than "libcrypto.lib" which is the
+ # import library of "libcrypto.dll".
+ libcrypto${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+ libcrypto${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+ libcrypto${_OPENSSL_STATIC_SUFFIX}
+ libeay32${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+ libeay32${_OPENSSL_STATIC_SUFFIX}
+ crypto${_OPENSSL_STATIC_SUFFIX}
+ # When OpenSSL is built with the "-static" option, only the static build is produced,
+ # and it is not suffixed with "_static".
+ libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+ libcrypto${_OPENSSL_MSVC_RT_MODE}
+ libcrypto
+ libeay32${_OPENSSL_MSVC_RT_MODE}
+ libeay32
+ crypto
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ ${_OPENSSL_PATH_SUFFIXES}
+ "lib/VC/${_OPENSSL_MSVC_ARCH_DIRECTORY}/${_OPENSSL_MSVC_RT_MODE}"
)
- FIND_LIBRARY(SSL_EAY_RELEASE
+ find_library(SSL_EAY_DEBUG
NAMES
- libssl${_OPENSSL_MSVC_ARCH_SUFFIX}MD ssleay32MD ssleay32 ssl
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/VC
+ libssl${_OPENSSL_STATIC_SUFFIX}
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ "lib/VC/${_OPENSSL_MSVC_ARCH_DIRECTORY}/${_OPENSSL_MSVC_RT_MODE}d"
)
- if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
- set( OPENSSL_LIBRARIES
- optimized ${SSL_EAY_RELEASE} optimized ${LIB_EAY_RELEASE}
- debug ${SSL_EAY_DEBUG} debug ${LIB_EAY_DEBUG}
- )
- else()
- set( OPENSSL_LIBRARIES
- ${SSL_EAY_RELEASE}
- ${LIB_EAY_RELEASE}
+ if(NOT SSL_EAY_DEBUG)
+ find_library(SSL_EAY_DEBUG
+ NAMES
+ # When OpenSSL is built with default options, the static library name is suffixed with "_static".
+ # Looking the "libssl_static.lib" with a higher priority than "libssl.lib" which is the
+ # import library of "libssl.dll".
+ libssl${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+ libssl${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+ libssl${_OPENSSL_STATIC_SUFFIX}d
+ ssleay32${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+ ssleay32${_OPENSSL_STATIC_SUFFIX}d
+ ssl${_OPENSSL_STATIC_SUFFIX}d
+ # When OpenSSL is built with the "-static" option, only the static build is produced,
+ # and it is not suffixed with "_static".
+ libssl${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}d
+ libssl${_OPENSSL_MSVC_RT_MODE}d
+ libssld
+ ssleay32${_OPENSSL_MSVC_RT_MODE}d
+ ssleay32d
+ ssld
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ ${_OPENSSL_PATH_SUFFIXES}
)
endif()
- MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE LIB_EAY_DEBUG LIB_EAY_RELEASE)
- ELSEIF(MINGW)
-
- # same player, for MingW
- FIND_LIBRARY(LIB_EAY
+ find_library(SSL_EAY_RELEASE
NAMES
- libeay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/MinGW
+ # When OpenSSL is built with default options, the static library name is suffixed with "_static".
+ # Looking the "libssl_static.lib" with a higher priority than "libssl.lib" which is the
+ # import library of "libssl.dll".
+ libssl${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+ libssl${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+ libssl${_OPENSSL_STATIC_SUFFIX}
+ ssleay32${_OPENSSL_STATIC_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+ ssleay32${_OPENSSL_STATIC_SUFFIX}
+ ssl${_OPENSSL_STATIC_SUFFIX}
+ # When OpenSSL is built with the "-static" option, only the static build is produced,
+ # and it is not suffixed with "_static".
+ libssl${_OPENSSL_MSVC_ARCH_SUFFIX}${_OPENSSL_MSVC_RT_MODE}
+ libssl${_OPENSSL_MSVC_RT_MODE}
+ libssl
+ ssleay32${_OPENSSL_MSVC_RT_MODE}
+ ssleay32
+ ssl
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ ${_OPENSSL_PATH_SUFFIXES}
+ "lib/VC/${_OPENSSL_MSVC_ARCH_DIRECTORY}/${_OPENSSL_MSVC_RT_MODE}"
)
- FIND_LIBRARY(SSL_EAY NAMES
+ set(LIB_EAY_LIBRARY_DEBUG "${LIB_EAY_DEBUG}")
+ set(LIB_EAY_LIBRARY_RELEASE "${LIB_EAY_RELEASE}")
+ set(SSL_EAY_LIBRARY_DEBUG "${SSL_EAY_DEBUG}")
+ set(SSL_EAY_LIBRARY_RELEASE "${SSL_EAY_RELEASE}")
+
+ include(SelectLibraryConfigurations)
+ select_library_configurations(LIB_EAY)
+ select_library_configurations(SSL_EAY)
+
+ mark_as_advanced(LIB_EAY_LIBRARY_DEBUG LIB_EAY_LIBRARY_RELEASE
+ SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE)
+ set(OPENSSL_SSL_LIBRARY ${SSL_EAY_LIBRARY} )
+ set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY_LIBRARY} )
+ elseif(MINGW)
+ # same player, for MinGW
+ set(LIB_EAY_NAMES crypto libeay32)
+ set(SSL_EAY_NAMES ssl ssleay32)
+ find_library(LIB_EAY
NAMES
- ssleay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/MinGW
+ ${LIB_EAY_NAMES}
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ "lib/MinGW"
+ "lib"
+ "lib64"
)
- MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
-
- set( OPENSSL_LIBRARIES
- ${SSL_EAY}
- ${LIB_EAY}
+ find_library(SSL_EAY
+ NAMES
+ ${SSL_EAY_NAMES}
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ PATH_SUFFIXES
+ "lib/MinGW"
+ "lib"
+ "lib64"
)
- ELSE(MSVC)
+
+ mark_as_advanced(SSL_EAY LIB_EAY)
+ set(OPENSSL_SSL_LIBRARY ${SSL_EAY} )
+ set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} )
+ unset(LIB_EAY_NAMES)
+ unset(SSL_EAY_NAMES)
+ else()
# Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues:
- FIND_LIBRARY(LIB_EAY
+ find_library(LIB_EAY
NAMES
+ libcrypto
libeay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib
- ${OPENSSL_ROOT_DIR}/lib/VC
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ HINTS
+ ${_OPENSSL_LIBDIR}
+ PATH_SUFFIXES
+ lib
)
- FIND_LIBRARY(SSL_EAY
+ find_library(SSL_EAY
NAMES
+ libssl
ssleay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib
- ${OPENSSL_ROOT_DIR}/lib/VC
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ HINTS
+ ${_OPENSSL_LIBDIR}
+ PATH_SUFFIXES
+ lib
)
- MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
- SET( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
- ENDIF(MSVC)
-ELSE(WIN32 AND NOT CYGWIN)
- FIND_LIBRARY(OPENSSL_SSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD)
- FIND_LIBRARY(OPENSSL_CRYPTO_LIBRARIES NAMES crypto)
- MARK_AS_ADVANCED(OPENSSL_CRYPTO_LIBRARIES OPENSSL_SSL_LIBRARIES)
+ mark_as_advanced(SSL_EAY LIB_EAY)
+ set(OPENSSL_SSL_LIBRARY ${SSL_EAY} )
+ set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} )
+ endif()
+else()
+
+ find_library(OPENSSL_SSL_LIBRARY
+ NAMES
+ ssl${_OPENSSL_NAME_POSTFIX}
+ ssleay32
+ ssleay32MD
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ HINTS
+ ${_OPENSSL_LIBDIR}
+ ${_OPENSSL_LIBRARY_DIRS}
+ PATH_SUFFIXES
+ lib lib64
+ )
- SET(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES})
+ find_library(OPENSSL_CRYPTO_LIBRARY
+ NAMES
+ crypto${_OPENSSL_NAME_POSTFIX}
+ NAMES_PER_DIR
+ ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+ HINTS
+ ${_OPENSSL_LIBDIR}
+ ${_OPENSSL_LIBRARY_DIRS}
+ PATH_SUFFIXES
+ lib lib64
+ )
-ENDIF(WIN32 AND NOT CYGWIN)
+ mark_as_advanced(OPENSSL_CRYPTO_LIBRARY OPENSSL_SSL_LIBRARY)
-if (NOT OPENSSL_INCLUDE_DIR)
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(OpenSSL DEFAULT_MSG
- OPENSSL_LIBRARIES
- OPENSSL_INCLUDE_DIR
- )
endif()
-if (OPENSSL_INCLUDE_DIR)
- message( STATUS "Found OpenSSL library: ${OPENSSL_LIBRARIES}")
- message( STATUS "Found OpenSSL headers: ${OPENSSL_INCLUDE_DIR}")
- if (_OPENSSL_VERSION)
- set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
- else (_OPENSSL_VERSION)
- file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
- REGEX "^# *define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*")
+set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
+set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
+set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES} )
+_OpenSSL_test_and_find_dependencies("${OPENSSL_SSL_LIBRARY}" "${OPENSSL_CRYPTO_LIBRARY}")
+if(_OpenSSL_has_dependencies)
+ _OpenSSL_add_dependencies( OPENSSL_SSL_LIBRARIES )
+ _OpenSSL_add_dependencies( OPENSSL_CRYPTO_LIBRARIES )
+ _OpenSSL_add_dependencies( OPENSSL_LIBRARIES )
+endif()
+
+function(from_hex HEX DEC)
+ string(TOUPPER "${HEX}" HEX)
+ set(_res 0)
+ string(LENGTH "${HEX}" _strlen)
+
+ while (_strlen GREATER 0)
+ math(EXPR _res "${_res} * 16")
+ string(SUBSTRING "${HEX}" 0 1 NIBBLE)
+ string(SUBSTRING "${HEX}" 1 -1 HEX)
+ if (NIBBLE STREQUAL "A")
+ math(EXPR _res "${_res} + 10")
+ elseif (NIBBLE STREQUAL "B")
+ math(EXPR _res "${_res} + 11")
+ elseif (NIBBLE STREQUAL "C")
+ math(EXPR _res "${_res} + 12")
+ elseif (NIBBLE STREQUAL "D")
+ math(EXPR _res "${_res} + 13")
+ elseif (NIBBLE STREQUAL "E")
+ math(EXPR _res "${_res} + 14")
+ elseif (NIBBLE STREQUAL "F")
+ math(EXPR _res "${_res} + 15")
+ else()
+ math(EXPR _res "${_res} + ${NIBBLE}")
+ endif()
+ string(LENGTH "${HEX}" _strlen)
+ endwhile()
+
+ set(${DEC} ${_res} PARENT_SCOPE)
+endfunction()
+
+if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
+ file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
+
+ if(openssl_version_str)
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.
# Major, minor, and fix directly translate into the version numbers shown in
@@ -205,33 +643,179 @@ if (OPENSSL_INCLUDE_DIR)
# indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
# on.
- string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]).*$"
+ string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)
+ from_hex("${OPENSSL_VERSION_MINOR}" OPENSSL_VERSION_MINOR)
list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX)
+ from_hex("${OPENSSL_VERSION_FIX}" OPENSSL_VERSION_FIX)
list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH)
- string(REGEX REPLACE "^0(.)" "\\1" OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_MINOR}")
- string(REGEX REPLACE "^0(.)" "\\1" OPENSSL_VERSION_FIX "${OPENSSL_VERSION_FIX}")
-
if (NOT OPENSSL_VERSION_PATCH STREQUAL "00")
+ from_hex("${OPENSSL_VERSION_PATCH}" _tmp)
# 96 is the ASCII code of 'a' minus 1
- math(EXPR OPENSSL_VERSION_PATCH_ASCII "${OPENSSL_VERSION_PATCH} + 96")
+ math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96")
+ unset(_tmp)
# Once anyone knows how OpenSSL would call the patch versions beyond 'z'
# this should be updated to handle that, too. This has not happened yet
# so it is simply ignored here for now.
string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING)
- endif (NOT OPENSSL_VERSION_PATCH STREQUAL "00")
+ endif ()
set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}")
- endif (_OPENSSL_VERSION)
+ else ()
+ # Since OpenSSL 3.0.0, the new version format is MAJOR.MINOR.PATCH and
+ # a new OPENSSL_VERSION_STR macro contains exactly that
+ file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" OPENSSL_VERSION_STR
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*")
+ string(REGEX REPLACE "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*$"
+ "\\1" OPENSSL_VERSION_STR "${OPENSSL_VERSION_STR}")
+
+ set(OPENSSL_VERSION "${OPENSSL_VERSION_STR}")
+
+ unset(OPENSSL_VERSION_STR)
+ endif ()
+endif ()
+
+foreach(_comp IN LISTS OpenSSL_FIND_COMPONENTS)
+ if(_comp STREQUAL "Crypto")
+ if(EXISTS "${OPENSSL_INCLUDE_DIR}" AND
+ (EXISTS "${OPENSSL_CRYPTO_LIBRARY}" OR
+ EXISTS "${LIB_EAY_LIBRARY_DEBUG}" OR
+ EXISTS "${LIB_EAY_LIBRARY_RELEASE}")
+ )
+ set(OpenSSL_${_comp}_FOUND TRUE)
+ else()
+ set(OpenSSL_${_comp}_FOUND FALSE)
+ endif()
+ elseif(_comp STREQUAL "SSL")
+ if(EXISTS "${OPENSSL_INCLUDE_DIR}" AND
+ (EXISTS "${OPENSSL_SSL_LIBRARY}" OR
+ EXISTS "${SSL_EAY_LIBRARY_DEBUG}" OR
+ EXISTS "${SSL_EAY_LIBRARY_RELEASE}")
+ )
+ set(OpenSSL_${_comp}_FOUND TRUE)
+ else()
+ set(OpenSSL_${_comp}_FOUND FALSE)
+ endif()
+ else()
+ message(WARNING "${_comp} is not a valid OpenSSL component")
+ set(OpenSSL_${_comp}_FOUND FALSE)
+ endif()
+endforeach()
+unset(_comp)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(OpenSSL
+ REQUIRED_VARS
+ OPENSSL_CRYPTO_LIBRARY
+ OPENSSL_INCLUDE_DIR
+ VERSION_VAR
+ OPENSSL_VERSION
+ HANDLE_COMPONENTS
+ FAIL_MESSAGE
+ "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
+)
+
+mark_as_advanced(OPENSSL_INCLUDE_DIR)
- include(EnsureVersion)
- ENSURE_VERSION_RANGE("${OPENSSL_EXPECTED_VERSION}" "${OPENSSL_VERSION}" "${OPENSSL_MAX_VERSION}" OPENSSL_VERSION_OK)
- if (NOT OPENSSL_VERSION_OK)
- message(FATAL_ERROR "TrinityCore needs OpenSSL version ${OPENSSL_EXPECTED_VERSION} but found version ${OPENSSL_VERSION}")
+if(OPENSSL_FOUND)
+ if(NOT TARGET OpenSSL::Crypto AND
+ (EXISTS "${OPENSSL_CRYPTO_LIBRARY}" OR
+ EXISTS "${LIB_EAY_LIBRARY_DEBUG}" OR
+ EXISTS "${LIB_EAY_LIBRARY_RELEASE}")
+ )
+ add_library(OpenSSL::Crypto UNKNOWN IMPORTED)
+ set_target_properties(OpenSSL::Crypto PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}")
+ if(EXISTS "${OPENSSL_CRYPTO_LIBRARY}")
+ set_target_properties(OpenSSL::Crypto PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+ IMPORTED_LOCATION "${OPENSSL_CRYPTO_LIBRARY}")
+ endif()
+ if(EXISTS "${LIB_EAY_LIBRARY_RELEASE}")
+ set_property(TARGET OpenSSL::Crypto APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(OpenSSL::Crypto PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
+ IMPORTED_LOCATION_RELEASE "${LIB_EAY_LIBRARY_RELEASE}")
+ endif()
+ if(EXISTS "${LIB_EAY_LIBRARY_DEBUG}")
+ set_property(TARGET OpenSSL::Crypto APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(OpenSSL::Crypto PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
+ IMPORTED_LOCATION_DEBUG "${LIB_EAY_LIBRARY_DEBUG}")
+ endif()
+ _OpenSSL_target_add_dependencies(OpenSSL::Crypto)
endif()
-endif (OPENSSL_INCLUDE_DIR)
-MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
+ if(NOT TARGET OpenSSL::SSL AND
+ (EXISTS "${OPENSSL_SSL_LIBRARY}" OR
+ EXISTS "${SSL_EAY_LIBRARY_DEBUG}" OR
+ EXISTS "${SSL_EAY_LIBRARY_RELEASE}")
+ )
+ add_library(OpenSSL::SSL UNKNOWN IMPORTED)
+ set_target_properties(OpenSSL::SSL PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}")
+ if(EXISTS "${OPENSSL_SSL_LIBRARY}")
+ set_target_properties(OpenSSL::SSL PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+ IMPORTED_LOCATION "${OPENSSL_SSL_LIBRARY}")
+ endif()
+ if(EXISTS "${SSL_EAY_LIBRARY_RELEASE}")
+ set_property(TARGET OpenSSL::SSL APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(OpenSSL::SSL PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
+ IMPORTED_LOCATION_RELEASE "${SSL_EAY_LIBRARY_RELEASE}")
+ endif()
+ if(EXISTS "${SSL_EAY_LIBRARY_DEBUG}")
+ set_property(TARGET OpenSSL::SSL APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(OpenSSL::SSL PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
+ IMPORTED_LOCATION_DEBUG "${SSL_EAY_LIBRARY_DEBUG}")
+ endif()
+ if(TARGET OpenSSL::Crypto)
+ set_target_properties(OpenSSL::SSL PROPERTIES
+ INTERFACE_LINK_LIBRARIES OpenSSL::Crypto)
+ endif()
+ _OpenSSL_target_add_dependencies(OpenSSL::SSL)
+ endif()
+
+ if("${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}" VERSION_GREATER_EQUAL "0.9.8")
+ if(MSVC)
+ if(EXISTS "${OPENSSL_INCLUDE_DIR}")
+ set(_OPENSSL_applink_paths PATHS ${OPENSSL_INCLUDE_DIR})
+ endif()
+ find_file(OPENSSL_APPLINK_SOURCE
+ NAMES
+ openssl/applink.c
+ ${_OPENSSL_applink_paths}
+ NO_DEFAULT_PATH)
+ if(OPENSSL_APPLINK_SOURCE)
+ set(_OPENSSL_applink_interface_srcs ${OPENSSL_APPLINK_SOURCE})
+ endif()
+ endif()
+ if(NOT TARGET OpenSSL::applink)
+ add_library(OpenSSL::applink INTERFACE IMPORTED)
+ set_property(TARGET OpenSSL::applink APPEND
+ PROPERTY INTERFACE_SOURCES
+ ${_OPENSSL_applink_interface_srcs})
+ endif()
+ endif()
+endif()
+
+# Restore the original find library ordering
+if(OPENSSL_USE_STATIC_LIBS)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openssl_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+endif()
+
+unset(_OPENSSL_FIND_PATH_SUFFIX)
+unset(_OPENSSL_NAME_POSTFIX)
+unset(_OpenSSL_extra_static_deps)
+unset(_OpenSSL_has_dependency_dl)
+unset(_OpenSSL_has_dependency_threads)
+unset(_OpenSSL_has_dependency_zlib)
diff --git a/cmake/macros/FindPCHSupport.cmake b/cmake/macros/FindPCHSupport.cmake
index 9c77605616b..aa5147cf499 100644
--- a/cmake/macros/FindPCHSupport.cmake
+++ b/cmake/macros/FindPCHSupport.cmake
@@ -1,27 +1,35 @@
-if (MSVC)
- # Specify the maximum PreCompiled Header memory allocation limit
- # Fixes a compiler-problem when using PCH - the /Ym flag is adjusted by the compiler in MSVC2012,
- # hence we need to set an upper limit with /Zm to avoid discrepancies)
- # (And yes, this is a verified, unresolved bug with MSVC... *sigh*)
- #
- # Note: This workaround was verified to be required on MSVC 2017 as well
- set(COTIRE_PCH_MEMORY_SCALING_FACTOR 500)
-endif()
+if (CMAKE_VERSION VERSION_LESS "3.16.0")
+ if (MSVC)
+ # Specify the maximum PreCompiled Header memory allocation limit
+ # Fixes a compiler-problem when using PCH - the /Ym flag is adjusted by the compiler in MSVC2012,
+ # hence we need to set an upper limit with /Zm to avoid discrepancies)
+ # (And yes, this is a verified, unresolved bug with MSVC... *sigh*)
+ #
+ # Note: This workaround was verified to be required on MSVC 2017 as well
+ set(COTIRE_PCH_MEMORY_SCALING_FACTOR 500)
+ endif ()
-include(cotire)
+ include(cotire)
-function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
- # Use the header for every target
- foreach(TARGET_NAME ${TARGET_NAME_LIST})
- # Disable unity builds
- set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD OFF)
+ function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
+ # Use the header for every target
+ foreach (TARGET_NAME ${TARGET_NAME_LIST})
+ # Disable unity builds
+ set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD OFF)
- # Set the prefix header
- set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT ${PCH_HEADER})
+ # Set the prefix header
+ set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT ${PCH_HEADER})
- # Workaround for cotire bug: https://github.com/sakra/cotire/issues/138
- set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14)
- endforeach()
+ # Workaround for cotire bug: https://github.com/sakra/cotire/issues/138
+ set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14)
+ endforeach ()
- cotire(${TARGET_NAME_LIST})
-endfunction(ADD_CXX_PCH)
+ cotire(${TARGET_NAME_LIST})
+ endfunction(ADD_CXX_PCH)
+else()
+ function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
+ foreach(TARGET_NAME ${TARGET_NAME_LIST})
+ target_precompile_headers(${TARGET_NAME} PRIVATE ${PCH_HEADER})
+ endforeach()
+ endfunction(ADD_CXX_PCH)
+endif()
diff --git a/cmake/options.cmake b/cmake/options.cmake
index 437c21294f8..12f3594cb0d 100644
--- a/cmake/options.cmake
+++ b/cmake/options.cmake
@@ -50,5 +50,4 @@ option(WITH_WARNINGS "Show all warnings during compile"
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.")
set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical hierarchical-folders)
-option(WITHOUT_GIT "Disable the GIT testing routines" 0)
-option(WITH_CPR "Enable CPR dep (curl wrapper)" 0)
+option(WITHOUT_GIT "Disable the GIT testing routines" 0)
\ No newline at end of file
diff --git a/contrib/ServerRelay/.gitignore b/contrib/ServerRelay/.gitignore
deleted file mode 100644
index a313c84bd43..00000000000
--- a/contrib/ServerRelay/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules*/
\ No newline at end of file
diff --git a/contrib/ServerRelay/README.md b/contrib/ServerRelay/README.md
deleted file mode 100644
index ad598f998c3..00000000000
--- a/contrib/ServerRelay/README.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# ServerRelay
-
-Server Relay between world of warcraft world channel(AshamaneCore) and Discord.
-
-### CREDITS
-* Made by : __DEVIL1234__
-* E-mail : __ingerasu1234@yahoo.com__.
-* Credits for helping me : __Traesh__ from AshamaneProject
-* Credits to guys with exceptional packages that simplified the process of making this project to happen
-
-### Installation
-
-To install this ServerRelay on your server(is more securely to run in same host with worldserver or internal on lan) you need to install Node.JS package and have setup a discord server and bot for it. Is already many tutorials how to setup this already on internet (google it bro). Tip : set the discordapp on developer mode, for id's right-click on channel's and select copy id.
-
-SPECIAL REQUIREMENT : compile the worldserver with -DCPR=1 argument on cmake. ( will take a longer time to configure)
-
-Recommended version of Node.JS : __v8.11.3__. Upper version is your risk to use.
-1. Commands:
- ```javascript
- //That will install all packages needed from package.json and will be ready to use
- npm install
- ```
-2. Configure the config.json file with your channels id and token from bot. The rest is preferable to not edit exception is the prefix for send command. Like this :
- ```javascript
- {
- "token": "BOT-TOKEN",
- "channel_id": "RELAY-CHAT-ID",
- "staff_channel_ID" : "STAFF-CHANNEL-ID",
- "post_url_server_message_world": "http://127.0.0.1:8082/sendChannelMessage/",
- "post_url_server_message_alliance" : "http://127.0.0.1:8082/sendChannelMessage/0",
- "post_url_server_message_horde" : "http://127.0.0.1:8082/sendChannelMessage/1",
- "post_url_server_command": "http://127.0.0.1:8082/command",
- "post_port": "8082",
- "post_token": "TOKEN FROM WORLDSERVER.CONF ON WorldREST.AuthToken, THIS ONE NEED TO MATCH HERE",
- "channel_horde" : "world_h", // I RECOMMEND TO NOT CHANGE IT
- "channel_alliance": "world_a", // I RECOMMEND TO NOT CHANGE IT
- "allow_interactions" : "0", // IF YOU SET TO 1, YOU NEED TO ENABLE IN WORLDSERVER.CONF THIS ONE : AllowTwoSide.Interaction.Channel.
- "channel_world" : "world", // I RECOMMEND TO NOT CHANGE IT
- "command_prefix" : "." // IS USED ON staff channel for purge command(delete the message on channels) and send command for ingame commands(is same one from console)
- }
- ```
-3. Configure the roles:
- ```javascript
- Open the server.js file with txt editor and read the comments line numbers : 13 -> 16
- ```
-4. Running the server :
- * Windows :
-
WARNING: WILL RUN WITHOUT CMD PROMPT TO BE SHOWN
- ```javascript
- Run the file windows.vbs
- ```
- * Linux :
- ```javascript
- chmod +x run.sh
- ./linux.sh &
-
- // OPTIONALY CAND SET A CRONTAB WITH run.sh. THE SERVER IF IS WILL CRASH, THE NODEMON WILL TAKE OF SERVER.JS. IF YOU WANT TO SETUP CRONTAB ON THE END NOT SPECIFY `` BECAUSE IS ALREADY SPECIFIED ON linux.sh
- ```
-
-### Commands accessible on this discord bot
-* Send
- ```javascript
- (prefix)send argument(commands accessible on worldserver console)
- ```
- * EXAMPLE :
- ```javascript
- .send help // will return all commands available
- ```
-
-* Purge
- ```javascript
- (prefix)purge <1-100> (will delete the message on channel(can be used on any channel)
- ```
- * EXAMPLE
- * EXAMPLE :
- ```javascript
- .purge 10 // delete 10 messages from channel
- ```
-
-### Support
-If you need support for this relay contact me on discord server Ashamane under the username : __devil1234__.
-If you want to support with donations contact me same like up but on direct message/private message.
\ No newline at end of file
diff --git a/contrib/ServerRelay/config.json b/contrib/ServerRelay/config.json
deleted file mode 100644
index 0f2de15fa69..00000000000
--- a/contrib/ServerRelay/config.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "token": "",
- "channel_id": "",
- "staff_channel_ID" : "",
- "post_url_server_message_world": "http://127.0.0.1:8082/sendChannelMessage/",
- "post_url_server_message_alliance" : "http://127.0.0.1:8082/sendChannelMessage/0",
- "post_url_server_message_horde" : "http://127.0.0.1:8082/sendChannelMessage/1",
- "post_url_server_command": "http://127.0.0.1:8082/command",
- "post_token": "",
- "channel_horde" : "world_h",
- "channel_alliance": "world_a",
- "allow_interactions" : "0",
- "channel_world" : "world",
- "command_prefix" : "."
-}
\ No newline at end of file
diff --git a/contrib/ServerRelay/linux.sh b/contrib/ServerRelay/linux.sh
deleted file mode 100644
index fa37637a303..00000000000
--- a/contrib/ServerRelay/linux.sh
+++ /dev/null
@@ -1 +0,0 @@
-nodemon > /dev/null
\ No newline at end of file
diff --git a/contrib/ServerRelay/package-lock.json b/contrib/ServerRelay/package-lock.json
deleted file mode 100644
index 25720e942c0..00000000000
--- a/contrib/ServerRelay/package-lock.json
+++ /dev/null
@@ -1,2766 +0,0 @@
-{
- "name": "server-relay",
- "version": "1.0.0",
- "lockfileVersion": 1,
- "requires": true,
- "dependencies": {
- "abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
- },
- "ajv": {
- "version": "5.5.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
- "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
- "requires": {
- "co": "^4.6.0",
- "fast-deep-equal": "^1.0.0",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.3.0"
- }
- },
- "ansi-align": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz",
- "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=",
- "requires": {
- "string-width": "^2.0.0"
- }
- },
- "ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
- },
- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "requires": {
- "color-convert": "^1.9.0"
- }
- },
- "anymatch": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
- "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
- "requires": {
- "micromatch": "^3.1.4",
- "normalize-path": "^2.1.1"
- }
- },
- "arr-diff": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
- "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
- },
- "arr-flatten": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
- "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
- },
- "arr-union": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
- "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ="
- },
- "array-unique": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
- "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
- },
- "asn1": {
- "version": "0.2.4",
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
- "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
- "requires": {
- "safer-buffer": "~2.1.0"
- }
- },
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
- },
- "assign-symbols": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
- "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
- },
- "async-each": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
- "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0="
- },
- "async-limiter": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
- "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
- },
- "asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
- },
- "atob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz",
- "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio="
- },
- "aws-sign2": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
- "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
- },
- "aws4": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz",
- "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w=="
- },
- "balanced-match": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
- },
- "base": {
- "version": "0.11.2",
- "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
- "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
- "requires": {
- "cache-base": "^1.0.1",
- "class-utils": "^0.3.5",
- "component-emitter": "^1.2.1",
- "define-property": "^1.0.0",
- "isobject": "^3.0.1",
- "mixin-deep": "^1.2.0",
- "pascalcase": "^0.1.1"
- },
- "dependencies": {
- "define-property": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
- "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
- "requires": {
- "is-descriptor": "^1.0.0"
- }
- },
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
- "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
- "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
- "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- }
- }
- },
- "bcrypt-pbkdf": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
- "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
- "optional": true,
- "requires": {
- "tweetnacl": "^0.14.3"
- },
- "dependencies": {
- "tweetnacl": {
- "version": "0.14.5",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
- "optional": true
- }
- }
- },
- "binary-extensions": {
- "version": "1.11.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
- "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU="
- },
- "bluebird": {
- "version": "3.5.1",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
- "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
- },
- "boxen": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz",
- "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==",
- "requires": {
- "ansi-align": "^2.0.0",
- "camelcase": "^4.0.0",
- "chalk": "^2.0.1",
- "cli-boxes": "^1.0.0",
- "string-width": "^2.0.0",
- "term-size": "^1.2.0",
- "widest-line": "^2.0.0"
- }
- },
- "brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "braces": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
- "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
- "requires": {
- "arr-flatten": "^1.1.0",
- "array-unique": "^0.3.2",
- "extend-shallow": "^2.0.1",
- "fill-range": "^4.0.0",
- "isobject": "^3.0.1",
- "repeat-element": "^1.1.2",
- "snapdragon": "^0.8.1",
- "snapdragon-node": "^2.0.1",
- "split-string": "^3.0.2",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "cache-base": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
- "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
- "requires": {
- "collection-visit": "^1.0.0",
- "component-emitter": "^1.2.1",
- "get-value": "^2.0.6",
- "has-value": "^1.0.0",
- "isobject": "^3.0.1",
- "set-value": "^2.0.0",
- "to-object-path": "^0.3.0",
- "union-value": "^1.0.0",
- "unset-value": "^1.0.0"
- }
- },
- "camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
- },
- "capture-stack-trace": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz",
- "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0="
- },
- "caseless": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
- },
- "chalk": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
- "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "chokidar": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz",
- "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==",
- "requires": {
- "anymatch": "^2.0.0",
- "async-each": "^1.0.0",
- "braces": "^2.3.0",
- "fsevents": "^1.2.2",
- "glob-parent": "^3.1.0",
- "inherits": "^2.0.1",
- "is-binary-path": "^1.0.0",
- "is-glob": "^4.0.0",
- "lodash.debounce": "^4.0.8",
- "normalize-path": "^2.1.1",
- "path-is-absolute": "^1.0.0",
- "readdirp": "^2.0.0",
- "upath": "^1.0.5"
- }
- },
- "ci-info": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz",
- "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg=="
- },
- "class-utils": {
- "version": "0.3.6",
- "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
- "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
- "requires": {
- "arr-union": "^3.1.0",
- "define-property": "^0.2.5",
- "isobject": "^3.0.0",
- "static-extend": "^0.1.1"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
- "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- }
- }
- },
- "cli-boxes": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz",
- "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM="
- },
- "co": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
- },
- "collection-visit": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
- "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
- "requires": {
- "map-visit": "^1.0.0",
- "object-visit": "^1.0.0"
- }
- },
- "color-convert": {
- "version": "1.9.2",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz",
- "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==",
- "requires": {
- "color-name": "1.1.1"
- }
- },
- "color-name": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz",
- "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok="
- },
- "combined-stream": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
- "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
- "requires": {
- "delayed-stream": "~1.0.0"
- }
- },
- "component-emitter": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
- "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
- },
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
- },
- "configstore": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz",
- "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==",
- "requires": {
- "dot-prop": "^4.1.0",
- "graceful-fs": "^4.1.2",
- "make-dir": "^1.0.0",
- "unique-string": "^1.0.0",
- "write-file-atomic": "^2.0.0",
- "xdg-basedir": "^3.0.0"
- }
- },
- "copy-descriptor": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
- "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
- },
- "core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
- },
- "create-error-class": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
- "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=",
- "requires": {
- "capture-stack-trace": "^1.0.0"
- }
- },
- "cross-spawn": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
- "requires": {
- "lru-cache": "^4.0.1",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "crypto-random-string": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz",
- "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4="
- },
- "dashdash": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
- "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
- "requires": {
- "assert-plus": "^1.0.0"
- }
- },
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "decode-uri-component": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
- },
- "deep-extend": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
- },
- "define-property": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
- "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
- "requires": {
- "is-descriptor": "^1.0.2",
- "isobject": "^3.0.1"
- },
- "dependencies": {
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
- "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
- "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
- "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- }
- }
- },
- "delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
- },
- "discord.js": {
- "version": "11.3.2",
- "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.3.2.tgz",
- "integrity": "sha512-Abw9CTMX3Jb47IeRffqx2VNSnXl/OsTdQzhvbw/JnqCyqc2imAocc7pX2HoRmgKd8CgSqsjBFBneusz/E16e6A==",
- "requires": {
- "long": "^4.0.0",
- "prism-media": "^0.0.2",
- "snekfetch": "^3.6.4",
- "tweetnacl": "^1.0.0",
- "ws": "^4.0.0"
- }
- },
- "dot-prop": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
- "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
- "requires": {
- "is-obj": "^1.0.0"
- }
- },
- "duplexer": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
- "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E="
- },
- "duplexer3": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
- "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI="
- },
- "ecc-jsbn": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
- "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
- "optional": true,
- "requires": {
- "jsbn": "~0.1.0",
- "safer-buffer": "^2.1.0"
- }
- },
- "error-ex": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
- "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
- "requires": {
- "is-arrayish": "^0.2.1"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
- },
- "event-stream": {
- "version": "3.3.4",
- "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
- "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=",
- "requires": {
- "duplexer": "~0.1.1",
- "from": "~0",
- "map-stream": "~0.1.0",
- "pause-stream": "0.0.11",
- "split": "0.3",
- "stream-combiner": "~0.0.4",
- "through": "~2.3.1"
- }
- },
- "execa": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
- "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
- "requires": {
- "cross-spawn": "^5.0.1",
- "get-stream": "^3.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
- "expand-brackets": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
- "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
- "requires": {
- "debug": "^2.3.3",
- "define-property": "^0.2.5",
- "extend-shallow": "^2.0.1",
- "posix-character-classes": "^0.1.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "define-property": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
- "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- },
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "extend": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
- },
- "extend-shallow": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
- "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
- "requires": {
- "assign-symbols": "^1.0.0",
- "is-extendable": "^1.0.1"
- },
- "dependencies": {
- "is-extendable": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
- "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
- "requires": {
- "is-plain-object": "^2.0.4"
- }
- }
- }
- },
- "extglob": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
- "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
- "requires": {
- "array-unique": "^0.3.2",
- "define-property": "^1.0.0",
- "expand-brackets": "^2.1.4",
- "extend-shallow": "^2.0.1",
- "fragment-cache": "^0.2.1",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "define-property": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
- "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
- "requires": {
- "is-descriptor": "^1.0.0"
- }
- },
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- },
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
- "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
- "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
- "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- }
- }
- },
- "extsprintf": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
- "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
- },
- "fast-deep-equal": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
- "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
- },
- "fast-json-stable-stringify": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
- "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
- },
- "fill-range": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
- "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1",
- "to-regex-range": "^2.1.0"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "for-in": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
- "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
- },
- "forever-agent": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
- },
- "form-data": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
- "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
- "requires": {
- "asynckit": "^0.4.0",
- "combined-stream": "1.0.6",
- "mime-types": "^2.1.12"
- }
- },
- "fragment-cache": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
- "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
- "requires": {
- "map-cache": "^0.2.2"
- }
- },
- "from": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
- "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4="
- },
- "fsevents": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz",
- "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==",
- "optional": true,
- "requires": {
- "nan": "^2.9.2",
- "node-pre-gyp": "^0.10.0"
- },
- "dependencies": {
- "abbrev": {
- "version": "1.1.1",
- "bundled": true,
- "optional": true
- },
- "ansi-regex": {
- "version": "2.1.1",
- "bundled": true
- },
- "aproba": {
- "version": "1.2.0",
- "bundled": true,
- "optional": true
- },
- "are-we-there-yet": {
- "version": "1.1.4",
- "bundled": true,
- "optional": true,
- "requires": {
- "delegates": "^1.0.0",
- "readable-stream": "^2.0.6"
- }
- },
- "balanced-match": {
- "version": "1.0.0",
- "bundled": true
- },
- "brace-expansion": {
- "version": "1.1.11",
- "bundled": true,
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "chownr": {
- "version": "1.0.1",
- "bundled": true,
- "optional": true
- },
- "code-point-at": {
- "version": "1.1.0",
- "bundled": true
- },
- "concat-map": {
- "version": "0.0.1",
- "bundled": true
- },
- "console-control-strings": {
- "version": "1.1.0",
- "bundled": true
- },
- "core-util-is": {
- "version": "1.0.2",
- "bundled": true,
- "optional": true
- },
- "debug": {
- "version": "2.6.9",
- "bundled": true,
- "optional": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "deep-extend": {
- "version": "0.5.1",
- "bundled": true,
- "optional": true
- },
- "delegates": {
- "version": "1.0.0",
- "bundled": true,
- "optional": true
- },
- "detect-libc": {
- "version": "1.0.3",
- "bundled": true,
- "optional": true
- },
- "fs-minipass": {
- "version": "1.2.5",
- "bundled": true,
- "optional": true,
- "requires": {
- "minipass": "^2.2.1"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "bundled": true,
- "optional": true
- },
- "gauge": {
- "version": "2.7.4",
- "bundled": true,
- "optional": true,
- "requires": {
- "aproba": "^1.0.3",
- "console-control-strings": "^1.0.0",
- "has-unicode": "^2.0.0",
- "object-assign": "^4.1.0",
- "signal-exit": "^3.0.0",
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1",
- "wide-align": "^1.1.0"
- }
- },
- "glob": {
- "version": "7.1.2",
- "bundled": true,
- "optional": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "has-unicode": {
- "version": "2.0.1",
- "bundled": true,
- "optional": true
- },
- "iconv-lite": {
- "version": "0.4.21",
- "bundled": true,
- "optional": true,
- "requires": {
- "safer-buffer": "^2.1.0"
- }
- },
- "ignore-walk": {
- "version": "3.0.1",
- "bundled": true,
- "optional": true,
- "requires": {
- "minimatch": "^3.0.4"
- }
- },
- "inflight": {
- "version": "1.0.6",
- "bundled": true,
- "optional": true,
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "inherits": {
- "version": "2.0.3",
- "bundled": true
- },
- "ini": {
- "version": "1.3.5",
- "bundled": true,
- "optional": true
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "bundled": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "isarray": {
- "version": "1.0.0",
- "bundled": true,
- "optional": true
- },
- "minimatch": {
- "version": "3.0.4",
- "bundled": true,
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "minimist": {
- "version": "0.0.8",
- "bundled": true
- },
- "minipass": {
- "version": "2.2.4",
- "bundled": true,
- "requires": {
- "safe-buffer": "^5.1.1",
- "yallist": "^3.0.0"
- }
- },
- "minizlib": {
- "version": "1.1.0",
- "bundled": true,
- "optional": true,
- "requires": {
- "minipass": "^2.2.1"
- }
- },
- "mkdirp": {
- "version": "0.5.1",
- "bundled": true,
- "requires": {
- "minimist": "0.0.8"
- }
- },
- "ms": {
- "version": "2.0.0",
- "bundled": true,
- "optional": true
- },
- "needle": {
- "version": "2.2.0",
- "bundled": true,
- "optional": true,
- "requires": {
- "debug": "^2.1.2",
- "iconv-lite": "^0.4.4",
- "sax": "^1.2.4"
- }
- },
- "node-pre-gyp": {
- "version": "0.10.0",
- "bundled": true,
- "optional": true,
- "requires": {
- "detect-libc": "^1.0.2",
- "mkdirp": "^0.5.1",
- "needle": "^2.2.0",
- "nopt": "^4.0.1",
- "npm-packlist": "^1.1.6",
- "npmlog": "^4.0.2",
- "rc": "^1.1.7",
- "rimraf": "^2.6.1",
- "semver": "^5.3.0",
- "tar": "^4"
- }
- },
- "nopt": {
- "version": "4.0.1",
- "bundled": true,
- "optional": true,
- "requires": {
- "abbrev": "1",
- "osenv": "^0.1.4"
- }
- },
- "npm-bundled": {
- "version": "1.0.3",
- "bundled": true,
- "optional": true
- },
- "npm-packlist": {
- "version": "1.1.10",
- "bundled": true,
- "optional": true,
- "requires": {
- "ignore-walk": "^3.0.1",
- "npm-bundled": "^1.0.1"
- }
- },
- "npmlog": {
- "version": "4.1.2",
- "bundled": true,
- "optional": true,
- "requires": {
- "are-we-there-yet": "~1.1.2",
- "console-control-strings": "~1.1.0",
- "gauge": "~2.7.3",
- "set-blocking": "~2.0.0"
- }
- },
- "number-is-nan": {
- "version": "1.0.1",
- "bundled": true
- },
- "object-assign": {
- "version": "4.1.1",
- "bundled": true,
- "optional": true
- },
- "once": {
- "version": "1.4.0",
- "bundled": true,
- "requires": {
- "wrappy": "1"
- }
- },
- "os-homedir": {
- "version": "1.0.2",
- "bundled": true,
- "optional": true
- },
- "os-tmpdir": {
- "version": "1.0.2",
- "bundled": true,
- "optional": true
- },
- "osenv": {
- "version": "0.1.5",
- "bundled": true,
- "optional": true,
- "requires": {
- "os-homedir": "^1.0.0",
- "os-tmpdir": "^1.0.0"
- }
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "bundled": true,
- "optional": true
- },
- "process-nextick-args": {
- "version": "2.0.0",
- "bundled": true,
- "optional": true
- },
- "rc": {
- "version": "1.2.7",
- "bundled": true,
- "optional": true,
- "requires": {
- "deep-extend": "^0.5.1",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "dependencies": {
- "minimist": {
- "version": "1.2.0",
- "bundled": true,
- "optional": true
- }
- }
- },
- "readable-stream": {
- "version": "2.3.6",
- "bundled": true,
- "optional": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "rimraf": {
- "version": "2.6.2",
- "bundled": true,
- "optional": true,
- "requires": {
- "glob": "^7.0.5"
- }
- },
- "safe-buffer": {
- "version": "5.1.1",
- "bundled": true
- },
- "safer-buffer": {
- "version": "2.1.2",
- "bundled": true,
- "optional": true
- },
- "sax": {
- "version": "1.2.4",
- "bundled": true,
- "optional": true
- },
- "semver": {
- "version": "5.5.0",
- "bundled": true,
- "optional": true
- },
- "set-blocking": {
- "version": "2.0.0",
- "bundled": true,
- "optional": true
- },
- "signal-exit": {
- "version": "3.0.2",
- "bundled": true,
- "optional": true
- },
- "string-width": {
- "version": "1.0.2",
- "bundled": true,
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- },
- "string_decoder": {
- "version": "1.1.1",
- "bundled": true,
- "optional": true,
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "bundled": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "bundled": true,
- "optional": true
- },
- "tar": {
- "version": "4.4.1",
- "bundled": true,
- "optional": true,
- "requires": {
- "chownr": "^1.0.1",
- "fs-minipass": "^1.2.5",
- "minipass": "^2.2.4",
- "minizlib": "^1.1.0",
- "mkdirp": "^0.5.0",
- "safe-buffer": "^5.1.1",
- "yallist": "^3.0.2"
- }
- },
- "util-deprecate": {
- "version": "1.0.2",
- "bundled": true,
- "optional": true
- },
- "wide-align": {
- "version": "1.1.2",
- "bundled": true,
- "optional": true,
- "requires": {
- "string-width": "^1.0.2"
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "bundled": true
- },
- "yallist": {
- "version": "3.0.2",
- "bundled": true
- }
- }
- },
- "get-stream": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
- "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
- },
- "get-value": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
- "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
- },
- "getpass": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
- "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
- "requires": {
- "assert-plus": "^1.0.0"
- }
- },
- "glob-parent": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
- "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
- "requires": {
- "is-glob": "^3.1.0",
- "path-dirname": "^1.0.0"
- },
- "dependencies": {
- "is-glob": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
- "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
- "requires": {
- "is-extglob": "^2.1.0"
- }
- }
- }
- },
- "global-dirs": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz",
- "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=",
- "requires": {
- "ini": "^1.3.4"
- }
- },
- "got": {
- "version": "6.7.1",
- "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz",
- "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=",
- "requires": {
- "create-error-class": "^3.0.0",
- "duplexer3": "^0.1.4",
- "get-stream": "^3.0.0",
- "is-redirect": "^1.0.0",
- "is-retry-allowed": "^1.0.0",
- "is-stream": "^1.0.0",
- "lowercase-keys": "^1.0.0",
- "safe-buffer": "^5.0.1",
- "timed-out": "^4.0.0",
- "unzip-response": "^2.0.1",
- "url-parse-lax": "^1.0.0"
- }
- },
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
- },
- "har-schema": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
- "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
- },
- "har-validator": {
- "version": "5.0.3",
- "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
- "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
- "requires": {
- "ajv": "^5.1.0",
- "har-schema": "^2.0.0"
- }
- },
- "has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
- },
- "has-value": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
- "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
- "requires": {
- "get-value": "^2.0.6",
- "has-values": "^1.0.0",
- "isobject": "^3.0.0"
- }
- },
- "has-values": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
- "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
- "requires": {
- "is-number": "^3.0.0",
- "kind-of": "^4.0.0"
- },
- "dependencies": {
- "kind-of": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
- "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "http": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/http/-/http-0.0.0.tgz",
- "integrity": "sha1-huYybSnF0Dnen6xYSkVon5KfT3I="
- },
- "http-signature": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
- "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
- "requires": {
- "assert-plus": "^1.0.0",
- "jsprim": "^1.2.2",
- "sshpk": "^1.7.0"
- }
- },
- "ignore-by-default": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
- "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk="
- },
- "import-lazy": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
- "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM="
- },
- "imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
- },
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
- },
- "ini": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
- "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
- },
- "is-accessor-descriptor": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
- "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "is-arrayish": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
- },
- "is-binary-path": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
- "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
- "requires": {
- "binary-extensions": "^1.0.0"
- }
- },
- "is-buffer": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
- "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
- },
- "is-ci": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz",
- "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==",
- "requires": {
- "ci-info": "^1.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
- "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "is-descriptor": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
- "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
- "requires": {
- "is-accessor-descriptor": "^0.1.6",
- "is-data-descriptor": "^0.1.4",
- "kind-of": "^5.0.0"
- },
- "dependencies": {
- "kind-of": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
- "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
- }
- }
- },
- "is-empty": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/is-empty/-/is-empty-1.2.0.tgz",
- "integrity": "sha1-3pu1snhzigWgsJpX4ftNSjQan2s="
- },
- "is-extendable": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
- "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
- },
- "is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
- },
- "is-glob": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
- "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
- "requires": {
- "is-extglob": "^2.1.1"
- }
- },
- "is-installed-globally": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz",
- "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=",
- "requires": {
- "global-dirs": "^0.1.0",
- "is-path-inside": "^1.0.0"
- }
- },
- "is-npm": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz",
- "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ="
- },
- "is-number": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
- "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "is-obj": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
- "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
- },
- "is-path-inside": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
- "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=",
- "requires": {
- "path-is-inside": "^1.0.1"
- }
- },
- "is-plain-object": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
- "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
- "requires": {
- "isobject": "^3.0.1"
- }
- },
- "is-redirect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz",
- "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ="
- },
- "is-retry-allowed": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz",
- "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ="
- },
- "is-stream": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
- },
- "is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
- },
- "is-windows": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
- "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
- },
- "isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
- },
- "isobject": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
- "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
- },
- "isstream": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
- },
- "jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
- "optional": true
- },
- "json-parse-better-errors": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
- "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
- },
- "json-schema": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
- },
- "json-schema-traverse": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
- "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
- },
- "json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
- },
- "jsprim": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
- "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
- "requires": {
- "assert-plus": "1.0.0",
- "extsprintf": "1.3.0",
- "json-schema": "0.2.3",
- "verror": "1.10.0"
- }
- },
- "kind-of": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
- },
- "latest-version": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz",
- "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=",
- "requires": {
- "package-json": "^4.0.0"
- }
- },
- "lodash": {
- "version": "4.17.10",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
- "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
- },
- "lodash.debounce": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
- "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
- },
- "lodash.toarray": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz",
- "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE="
- },
- "long": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
- "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
- },
- "lowercase-keys": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
- "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA=="
- },
- "lru-cache": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
- "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==",
- "requires": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
- }
- },
- "make-dir": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
- "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
- "requires": {
- "pify": "^3.0.0"
- }
- },
- "map-cache": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
- "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8="
- },
- "map-stream": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
- "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ="
- },
- "map-visit": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
- "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
- "requires": {
- "object-visit": "^1.0.0"
- }
- },
- "micromatch": {
- "version": "3.1.10",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
- "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
- "requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "braces": "^2.3.1",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "extglob": "^2.0.4",
- "fragment-cache": "^0.2.1",
- "kind-of": "^6.0.2",
- "nanomatch": "^1.2.9",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.2"
- }
- },
- "mime-db": {
- "version": "1.35.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz",
- "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg=="
- },
- "mime-types": {
- "version": "2.1.19",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz",
- "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==",
- "requires": {
- "mime-db": "~1.35.0"
- }
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
- },
- "mixin-deep": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
- "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
- "requires": {
- "for-in": "^1.0.2",
- "is-extendable": "^1.0.1"
- },
- "dependencies": {
- "is-extendable": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
- "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
- "requires": {
- "is-plain-object": "^2.0.4"
- }
- }
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "nan": {
- "version": "2.10.0",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
- "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==",
- "optional": true
- },
- "nanomatch": {
- "version": "1.2.13",
- "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
- "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
- "requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "fragment-cache": "^0.2.1",
- "is-windows": "^1.0.2",
- "kind-of": "^6.0.2",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- }
- },
- "node-emoji": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.8.1.tgz",
- "integrity": "sha512-+ktMAh1Jwas+TnGodfCfjUbJKoANqPaJFN0z0iqh41eqD8dvguNzcitVSBSVK1pidz0AqGbLKcoVuVLRVZ/aVg==",
- "requires": {
- "lodash.toarray": "^4.4.0"
- }
- },
- "nodemon": {
- "version": "1.18.3",
- "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.3.tgz",
- "integrity": "sha512-XdVfAjGlDKU2nqoGgycxTndkJ5fdwvWJ/tlMGk2vHxMZBrSPVh86OM6z7viAv8BBJWjMgeuYQBofzr6LUoi+7g==",
- "requires": {
- "chokidar": "^2.0.2",
- "debug": "^3.1.0",
- "ignore-by-default": "^1.0.1",
- "minimatch": "^3.0.4",
- "pstree.remy": "^1.1.0",
- "semver": "^5.5.0",
- "supports-color": "^5.2.0",
- "touch": "^3.1.0",
- "undefsafe": "^2.0.2",
- "update-notifier": "^2.3.0"
- }
- },
- "nopt": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
- "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
- "requires": {
- "abbrev": "1"
- }
- },
- "normalize-path": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
- "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
- "requires": {
- "remove-trailing-separator": "^1.0.1"
- }
- },
- "npm-run-path": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
- "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
- "requires": {
- "path-key": "^2.0.0"
- }
- },
- "oauth-sign": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
- "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
- },
- "object-copy": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
- "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
- "requires": {
- "copy-descriptor": "^0.1.0",
- "define-property": "^0.2.5",
- "kind-of": "^3.0.3"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
- "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- },
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "object-visit": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
- "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
- "requires": {
- "isobject": "^3.0.0"
- }
- },
- "object.pick": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
- "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
- "requires": {
- "isobject": "^3.0.1"
- }
- },
- "p-finally": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
- },
- "package-json": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz",
- "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=",
- "requires": {
- "got": "^6.7.1",
- "registry-auth-token": "^3.0.1",
- "registry-url": "^3.0.3",
- "semver": "^5.1.0"
- }
- },
- "parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
- "requires": {
- "error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1"
- }
- },
- "pascalcase": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
- "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
- },
- "path-dirname": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
- "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA="
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
- },
- "path-is-inside": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
- "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM="
- },
- "path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
- },
- "pause-stream": {
- "version": "0.0.11",
- "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
- "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=",
- "requires": {
- "through": "~2.3"
- }
- },
- "performance-now": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
- "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
- },
- "pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
- },
- "posix-character-classes": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
- "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
- },
- "prepend-http": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
- "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
- },
- "prism-media": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.2.tgz",
- "integrity": "sha512-L6yc8P5NVG35ivzvfI7bcTYzqFV+K8gTfX9YaJbmIFfMXTs71RMnAupvTQPTCteGsiOy9QcNLkQyWjAafY/hCQ=="
- },
- "process-nextick-args": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
- "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
- },
- "ps-tree": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz",
- "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=",
- "requires": {
- "event-stream": "~3.3.0"
- }
- },
- "pseudomap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
- },
- "pstree.remy": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.0.tgz",
- "integrity": "sha512-q5I5vLRMVtdWa8n/3UEzZX7Lfghzrg9eG2IKk2ENLSofKRCXVqMvMUHxCKgXNaqH/8ebhBxrqftHWnyTFweJ5Q==",
- "requires": {
- "ps-tree": "^1.1.0"
- }
- },
- "punycode": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
- },
- "qs": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
- },
- "rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
- "requires": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- }
- },
- "readable-stream": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "readdirp": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
- "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
- "requires": {
- "graceful-fs": "^4.1.2",
- "minimatch": "^3.0.2",
- "readable-stream": "^2.0.2",
- "set-immediate-shim": "^1.0.1"
- }
- },
- "regex-not": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
- "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
- "requires": {
- "extend-shallow": "^3.0.2",
- "safe-regex": "^1.1.0"
- }
- },
- "registry-auth-token": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz",
- "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==",
- "requires": {
- "rc": "^1.1.6",
- "safe-buffer": "^5.0.1"
- }
- },
- "registry-url": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz",
- "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=",
- "requires": {
- "rc": "^1.0.1"
- }
- },
- "remove-trailing-separator": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
- "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
- },
- "repeat-element": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
- "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo="
- },
- "repeat-string": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
- "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
- },
- "request": {
- "version": "2.87.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz",
- "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==",
- "requires": {
- "aws-sign2": "~0.7.0",
- "aws4": "^1.6.0",
- "caseless": "~0.12.0",
- "combined-stream": "~1.0.5",
- "extend": "~3.0.1",
- "forever-agent": "~0.6.1",
- "form-data": "~2.3.1",
- "har-validator": "~5.0.3",
- "http-signature": "~1.2.0",
- "is-typedarray": "~1.0.0",
- "isstream": "~0.1.2",
- "json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.17",
- "oauth-sign": "~0.8.2",
- "performance-now": "^2.1.0",
- "qs": "~6.5.1",
- "safe-buffer": "^5.1.1",
- "tough-cookie": "~2.3.3",
- "tunnel-agent": "^0.6.0",
- "uuid": "^3.1.0"
- }
- },
- "request-promise": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.2.tgz",
- "integrity": "sha1-0epG1lSm7k+O5qT+oQGMIpEZBLQ=",
- "requires": {
- "bluebird": "^3.5.0",
- "request-promise-core": "1.1.1",
- "stealthy-require": "^1.1.0",
- "tough-cookie": ">=2.3.3"
- }
- },
- "request-promise-core": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz",
- "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=",
- "requires": {
- "lodash": "^4.13.1"
- }
- },
- "resolve-url": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
- "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
- },
- "ret": {
- "version": "0.1.15",
- "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
- "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
- },
- "safe-regex": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
- "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
- "requires": {
- "ret": "~0.1.10"
- }
- },
- "safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
- },
- "semver": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
- "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
- },
- "semver-diff": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz",
- "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=",
- "requires": {
- "semver": "^5.0.3"
- }
- },
- "set-immediate-shim": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
- "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E="
- },
- "set-value": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
- "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-extendable": "^0.1.1",
- "is-plain-object": "^2.0.3",
- "split-string": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
- "requires": {
- "shebang-regex": "^1.0.0"
- }
- },
- "shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
- },
- "signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
- },
- "snapdragon": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
- "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
- "requires": {
- "base": "^0.11.1",
- "debug": "^2.2.0",
- "define-property": "^0.2.5",
- "extend-shallow": "^2.0.1",
- "map-cache": "^0.2.2",
- "source-map": "^0.5.6",
- "source-map-resolve": "^0.5.0",
- "use": "^3.1.0"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "define-property": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
- "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- },
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "snapdragon-node": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
- "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
- "requires": {
- "define-property": "^1.0.0",
- "isobject": "^3.0.0",
- "snapdragon-util": "^3.0.1"
- },
- "dependencies": {
- "define-property": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
- "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
- "requires": {
- "is-descriptor": "^1.0.0"
- }
- },
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
- "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
- "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
- "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- }
- }
- },
- "snapdragon-util": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
- "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
- "requires": {
- "kind-of": "^3.2.0"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "snekfetch": {
- "version": "3.6.4",
- "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz",
- "integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw=="
- },
- "source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
- },
- "source-map-resolve": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
- "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
- "requires": {
- "atob": "^2.1.1",
- "decode-uri-component": "^0.2.0",
- "resolve-url": "^0.2.1",
- "source-map-url": "^0.4.0",
- "urix": "^0.1.0"
- }
- },
- "source-map-url": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
- "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
- },
- "split": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
- "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=",
- "requires": {
- "through": "2"
- }
- },
- "split-string": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
- "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
- "requires": {
- "extend-shallow": "^3.0.0"
- }
- },
- "sshpk": {
- "version": "1.14.2",
- "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
- "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
- "requires": {
- "asn1": "~0.2.3",
- "assert-plus": "^1.0.0",
- "bcrypt-pbkdf": "^1.0.0",
- "dashdash": "^1.12.0",
- "ecc-jsbn": "~0.1.1",
- "getpass": "^0.1.1",
- "jsbn": "~0.1.0",
- "safer-buffer": "^2.0.2",
- "tweetnacl": "~0.14.0"
- },
- "dependencies": {
- "tweetnacl": {
- "version": "0.14.5",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
- "optional": true
- }
- }
- },
- "static-extend": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
- "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
- "requires": {
- "define-property": "^0.2.5",
- "object-copy": "^0.1.0"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
- "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- }
- }
- },
- "stealthy-require": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
- "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
- },
- "stream-combiner": {
- "version": "0.0.4",
- "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
- "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=",
- "requires": {
- "duplexer": "~0.1.1"
- }
- },
- "string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
- "requires": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- }
- },
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- },
- "strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- },
- "strip-eof": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
- },
- "supports-color": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
- "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
- "requires": {
- "has-flag": "^3.0.0"
- }
- },
- "term-size": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz",
- "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=",
- "requires": {
- "execa": "^0.7.0"
- }
- },
- "through": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
- },
- "timed-out": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz",
- "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8="
- },
- "to-object-path": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
- "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "to-regex": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
- "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
- "requires": {
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "regex-not": "^1.0.2",
- "safe-regex": "^1.1.0"
- }
- },
- "to-regex-range": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
- "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
- "requires": {
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1"
- }
- },
- "touch": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
- "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
- "requires": {
- "nopt": "~1.0.10"
- }
- },
- "tough-cookie": {
- "version": "2.3.4",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
- "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
- "requires": {
- "punycode": "^1.4.1"
- }
- },
- "tunnel-agent": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
- "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
- "requires": {
- "safe-buffer": "^5.0.1"
- }
- },
- "tweetnacl": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz",
- "integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins="
- },
- "undefsafe": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz",
- "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=",
- "requires": {
- "debug": "^2.2.0"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- }
- }
- },
- "union-value": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
- "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
- "requires": {
- "arr-union": "^3.1.0",
- "get-value": "^2.0.6",
- "is-extendable": "^0.1.1",
- "set-value": "^0.4.3"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
- "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
- "requires": {
- "is-extendable": "^0.1.0"
- }
- },
- "set-value": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
- "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-extendable": "^0.1.1",
- "is-plain-object": "^2.0.1",
- "to-object-path": "^0.3.0"
- }
- }
- }
- },
- "unique-string": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz",
- "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=",
- "requires": {
- "crypto-random-string": "^1.0.0"
- }
- },
- "unset-value": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
- "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
- "requires": {
- "has-value": "^0.3.1",
- "isobject": "^3.0.0"
- },
- "dependencies": {
- "has-value": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
- "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
- "requires": {
- "get-value": "^2.0.3",
- "has-values": "^0.1.4",
- "isobject": "^2.0.0"
- },
- "dependencies": {
- "isobject": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
- "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
- "requires": {
- "isarray": "1.0.0"
- }
- }
- }
- },
- "has-values": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
- "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
- }
- }
- },
- "unzip-response": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz",
- "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c="
- },
- "upath": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz",
- "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw=="
- },
- "update-notifier": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz",
- "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==",
- "requires": {
- "boxen": "^1.2.1",
- "chalk": "^2.0.1",
- "configstore": "^3.0.0",
- "import-lazy": "^2.1.0",
- "is-ci": "^1.0.10",
- "is-installed-globally": "^0.1.0",
- "is-npm": "^1.0.0",
- "latest-version": "^3.0.0",
- "semver-diff": "^2.0.0",
- "xdg-basedir": "^3.0.0"
- }
- },
- "urix": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
- "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
- },
- "url-parse-lax": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
- "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=",
- "requires": {
- "prepend-http": "^1.0.1"
- }
- },
- "use": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
- "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
- },
- "util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
- },
- "uuid": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
- "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
- },
- "verror": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
- "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
- "requires": {
- "assert-plus": "^1.0.0",
- "core-util-is": "1.0.2",
- "extsprintf": "^1.2.0"
- }
- },
- "which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "requires": {
- "isexe": "^2.0.0"
- }
- },
- "widest-line": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz",
- "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=",
- "requires": {
- "string-width": "^2.1.1"
- }
- },
- "write-file-atomic": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
- "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==",
- "requires": {
- "graceful-fs": "^4.1.11",
- "imurmurhash": "^0.1.4",
- "signal-exit": "^3.0.2"
- }
- },
- "ws": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz",
- "integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==",
- "requires": {
- "async-limiter": "~1.0.0",
- "safe-buffer": "~5.1.0"
- }
- },
- "xdg-basedir": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz",
- "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ="
- },
- "yallist": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
- }
- }
-}
diff --git a/contrib/ServerRelay/package.json b/contrib/ServerRelay/package.json
deleted file mode 100644
index 98368b0a832..00000000000
--- a/contrib/ServerRelay/package.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "server-relay",
- "version": "1.0.0",
- "description": "Server Relay between world of warcraft channel(AshamaneCore) and Discord",
- "main": "server.js",
- "author": {
- "name": "DEVIL1234"
- },
- "nodemonConfig":{
- "ignore": ["config.json", "node_modules/*"]
- },
-
- "dependencies": {
- "discord.js": "^11.3.2",
- "http": "0.0.0",
- "is-empty": "^1.2.0",
- "node-emoji": "^1.8.1",
- "nodemon": "^1.18.3",
- "parse-json": "^4.0.0",
- "request": "^2.87.0",
- "request-promise": "^4.2.2"
- }
-}
diff --git a/contrib/ServerRelay/run-server-scripts/windows.bat b/contrib/ServerRelay/run-server-scripts/windows.bat
deleted file mode 100644
index 5f85a5cf892..00000000000
--- a/contrib/ServerRelay/run-server-scripts/windows.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-nodemon > NUL
\ No newline at end of file
diff --git a/contrib/ServerRelay/server.js b/contrib/ServerRelay/server.js
deleted file mode 100644
index 50df211767b..00000000000
--- a/contrib/ServerRelay/server.js
+++ /dev/null
@@ -1,244 +0,0 @@
-
-/* requirements */
-var Discord = require("discord.js");
-var config = require("./config.json")
-var client = new Discord.Client();
-const request = require('request');
-const http = require('http');
-var rp = require('request-promise');
-const parseJson = require('parse-json');
-var emoji = require('node-emoji');
-var empty = require('is-empty');
-
-// CONFIGURE THE ROLES NEEDED FOR GM Logo
-// If you want more roles added just do like this (append to original one on line 95 and 195(optionaly, for send command) with
-// || message.member.roles.find("name", role_3+) and add const role_number here.
-// If you want just to change role name, modify the attribute below . Example : Admin -> Your role name
-role_1 = "Owner";
-role_2 = "GameMasters";
-
-/* Ready the client */
-client.on('ready', () => {
- console.log('I am ready!');
-
- client.user.setPresence({game: {name: "WORD PORN", type: 0}});
- client.user.setStatus('dnd');
- //console.log(`Logged in as ${client.user.tag}!`);
-
- var server = http.createServer(OnWorldMessage);
- OnDiscordMessage();
- Commands();
- server.listen(8083);
-});
-
-client.on("disconnected", function () { process.exit(1); });
-/*
- * Handle message in the way "World => Discord"
- */
-function OnWorldMessage(request, response) {
- if (request.method != "POST") {
- response.writeHead(404);
- response.end();
- return;
- }
-
- try {
- let body = [];
- request.on('data', (chunk) => {
- body.push(chunk);
- }).on('end', () => {
- body = Buffer.concat(body).toString();
- //console.log(body);
-
- /*Send the message to discord*/
-
- // Parse the json message to can return part from it
- var myJSON = JSON.parse(body);
- //console.log(string);
-
- // send to discord channel id and the json text
- switch(config.allow_interactions)
- {
- case "1":
- client.channels.get(config.channel_id).send(myJSON.text);
- break;
- case "0":
- var string = "[" + myJSON.channel + "]" + " " + myJSON.text;
- client.channels.get(config.channel_id).send(string);
- break;
- }
-
- response.writeHead(200);
- response.end();
- });
- }
- catch (e) {
- console.log(e);
- response.writeHead(500);
- response.end();
- }
-}
-
-/*
- * Handle message in the way "Discord => World"
- */
-
-function OnDiscordMessage() {
-
- client.on('message', async message => {
- if (message.author.bot) return;
- if (message.channel.type === "dm") return;
-
- // SEND TO WORLD CHANNEL
- // showGMlogo bollean
- if(message.channel.id === config.channel_id){
- if(message.member.roles.find("name", role_1) || message.member.roles.find("name", role_2)) {var gmLOGO = '1'} else { gmLOGO = "0"};
-
- const messageArray = message.content;
- const author = message.member.user.username;
-
- const message_emoji_replace = emoji.replace(messageArray, (emoji) => `${emoji.key}`);
-
- // world channel
- let json_world = JSON.stringify({"senderName":author,"channelName":config.channel_world,"message": message_emoji_replace, "showGMLogo": gmLOGO});
- // world_a channel
- let json_world_a = JSON.stringify({"senderName":author,"channelName":config.channel_alliance,"message": message_emoji_replace, "showGMLogo": gmLOGO});
- // world_h channel
- let json_world_h = JSON.stringify({"senderName":author,"channelName":config.channel_horde,"message": message_emoji_replace, "showGMLogo": gmLOGO});
-
- // allow interactions between horde and alliance on world channel's
-
- switch (config.allow_interactions){
- case "1":
- var url_0 = config.post_url_server_message_world + "0";
- var url_1 = config.post_url_server_message_world + "1";
-
- console.log(url_0);
-
- var auth = { 'Authorization': config.post_token};
- request.post({url:url_0, form: json_world, headers: auth}, function(err, httpResponse,body)
- {
- if(err) {
- return console.log(err);
- }
- //console.log('post Suceess the response is:', body);
- });
-
- var auth = { 'Authorization': config.post_token};
- request.post({url:url_1, form: json_world, headers: auth}, function(err, httpResponse,body)
- {
- if(err) {
- return console.log(err);
- }
- //console.log('post Suceess the response is:', body);
- });
- break;
- case "0":
- var auth = { 'Authorization': config.post_token};
-
- request.post({url:config.post_url_server_message_alliance, form: json_world_a, headers: auth}, function(err, httpResponse,body)
- {
- if(err) {
- return console.log(err);
- }
- console.log('post Suceess the response is:', body);
- });
-
- request.post({url:config.post_url_server_message_horde, form: json_world_h, headers: auth}, function(err, httpResponse,body)
- {
- if(err) {
- return console.log(err);
- }
- //console.log('post Suceess the response is:', body);
- });
- break;
-// default:
-
- };
- };
- });
-};
-
-/*
- * Handle the commands
- */
-function Commands() {
-
- client.on('message', async message => {
- if (message.author.bot) return;
- if (message.channel.type === "dm") return;
-
- const args = message.content.slice(config.command_prefix.length).trim().split(/ +/g);
- const command = args.shift().toLowerCase();
-
- if(message.content.indexOf(config.command_prefix) !== 0) return;
-
- // COMMAND POST COMMANDS
- if(command === "purge") {
-
- // This command removes all messages from all users in the channel, up to 100.
-
- // get the delete count, as an actual number.
- const deleteCount = parseInt(args[0], 10);
-
- // Ooooh nice, combined conditions. <3
- if(!deleteCount || deleteCount < 2 || deleteCount > 1000)
- return message.reply("Please provide a number between 2 and 100 for the number of messages to delete");
-
- // So we get our messages, and delete them. Simple enough, right?
- const fetched = await message.channel.fetchMessages({limit: deleteCount});
- message.channel.bulkDelete(fetched)
- .catch(error => message.reply(`Couldn't delete messages because of: ${error}`));
- };
-
- if(message.channel.id === config.staff_channel_ID){
- if(message.member.roles.find("name", role_1) || message.member.roles.find("name", role_2))
- {
- if(command === "send") {
- const sendCommand = args.join(" ");
-
- message.delete().catch(O_o=>{});
-
- //let json = {"command":sendCommand}
-
- //console.log(args.length);
- if (args != null && args.length > 0)
- {
-
- //let json_string = JSON.stringify(json)
- var auth = { 'Authorization': config.post_token}
-
- var options = {method: 'POST', uri: config.post_url_server_command, body: {"command":sendCommand} ,headers: auth, json: true, resolveWithFullResponse: true, needReadable: true};
-
- rp(options).then(function (response) {
- //console.log(response);
- var myJSONString = JSON.stringify(response.body);
- //console.log(myJSONString);
- var myEscapedJSONString = myJSONString.replace(/\\r/g, "").replace(/\\n/g, "").replace(/\s\s+/g, " ");
- if (myEscapedJSONString === myJSONString)
- {
- var b = JSON.parse(myEscapedJSONString);
- //console.log("this is b:", b);
- //console.log(b.message);
- message.channel.send("The command was sent to worldserver.");
- } else {
- var a = JSON.parse(JSON.parse(myEscapedJSONString));
- //console.log("this is a :" ,a)
- //console.log(a.message);
- message.channel.send("Your command response is: " + a.message);
- }
-
- }).catch(function (err) {
- console.log(err)
- })
- }
- else {
- message.channel.send("You can't send emty command");
- };
- };
- } else { message.channel.send("Not enough permission to use this command. Contact Admin or Gamemaster to ban you :smile:"); };
- };
- });
-}
-
-client.login(config.token);
diff --git a/contrib/ServerRelay/windows.vbs b/contrib/ServerRelay/windows.vbs
deleted file mode 100644
index e6c791d0441..00000000000
--- a/contrib/ServerRelay/windows.vbs
+++ /dev/null
@@ -1,3 +0,0 @@
-Set WshShell = CreateObject("WScript.Shell")
-WshShell.Run chr(34) & ".\run-server-scripts\windows.bat" & Chr(34), 0
-Set WshShell = Nothing
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt
index e3ddba5533e..db0f3df8450 100644
--- a/dep/CMakeLists.txt
+++ b/dep/CMakeLists.txt
@@ -31,11 +31,6 @@ if(SERVERS)
add_subdirectory(rapidjson)
add_subdirectory(efsw)
add_subdirectory(protobuf)
- add_subdirectory(duktape)
-
- if (WITH_CPR)
- add_subdirectory(cpr)
- endif(WITH_CPR)
endif()
if(TOOLS)
diff --git a/dep/PackageList.txt b/dep/PackageList.txt
index e928f137448..279ace99262 100644
--- a/dep/PackageList.txt
+++ b/dep/PackageList.txt
@@ -41,8 +41,8 @@ OpenSSL (general-purpose cryptography library)
Version: external
SFMT (SIMD-oriented Fast Mersenne Twister)
- Based on http://agner.org/random/
- Version: 2010-Aug-03
+ https://github.com/MersenneTwister-Lab/SFMT
+ Version: 73bcba2e483640b8d50c1275514326dd4c1b0ca4
utf8-cpp (UTF-8 with C++ in a Portable Way)
http://utfcpp.sourceforge.net/
diff --git a/dep/SFMT/CHANGE-LOG.txt b/dep/SFMT/CHANGE-LOG.txt
new file mode 100644
index 00000000000..69d67f390dd
--- /dev/null
+++ b/dep/SFMT/CHANGE-LOG.txt
@@ -0,0 +1,69 @@
+ver 1.5
+-------
+bug fix to_res53 reported by Akio Takahashi.
+
+ver 1.4.1
+-------
+fix MSC compile error reported by Dirk Steenpass.
+
+ver 1.4
+-------
+internal state of SFMT is kept in structure.
+function and macro names are changed to have sfmt_ prefix.
+ALTIVEC OR BIGENDIAN ARE NOT TESTED AT ALL.
+
+ver 1.3.3
+-------
+change condition compile of do_recursion in SFMT.c
+
+ver 1.3.2
+-------
+bug fix to_res53_mix and genrand_res53_mix.
+
+ver 1.3.1
+-------
+gcc compile option changed from -O9 to -O3.
+add functions genrand_res53_mix and to_res53_mix.
+bug fix about definition of ALWAYS_INLINE.
+add new definition PRE_ALWAYS for MSC.
+
+ver 1.3
+-------
+bug fixed: -DONLY64 without -DBIG_ENIAN64 had been generating
+wrong sequence.
+bug fixed: There is no documentation about BIG_ENDIAN64.
+add automatic endian check by __BIG_ENDIAN__ predefined macro.
+bug fixed: change == in check.sh to =
+add SFMT-params216091.h
+add AltiVec parameter format for systems which are not osx.
+change Makefile for systems which are not osx and support AltiVec.
+change sample2 of howto-compile for Free BSD.
+change source files for BORLANDC and Visual Studio.
+change period certification code more smart.
+add params directory.
+
+ver 1.2.1
+-------
+Fix typo in SFMT-alti.c SFMT-sse2.c
+marge SFMT-alti.c and SFMT-alti.h into SFMT-alti.h
+marge SFMT-sse2.c and SFMT-sse2.h into SFMT-sse2.h
+This version is not released.
+
+ver 1.2
+-------
+Support many periods: 2^{607}, 2^{1279}, 2^{2281}, 2^{4253}, 2^{11213},
+2^{19937}, 2^{44497}, 2^{86243}, 2^{132049}
+Fix typo in LICENSE.txt.
+Add cast to vec_perm for SFMT-alti.c, SFMT-alti64.c.
+combine source codes.
+
+ver 1.1
+-------
+The period certification method is changed from constant to function.
+The convert functions from 32-bit and 64-bit integer to double are added.
+The documentation is changed.
+Sample programs are added.
+
+ver 1.0
+-------
+The first version.
diff --git a/dep/SFMT/CMakeLists.txt b/dep/SFMT/CMakeLists.txt
index a669a03e832..84f5cc6afc4 100644
--- a/dep/SFMT/CMakeLists.txt
+++ b/dep/SFMT/CMakeLists.txt
@@ -1,4 +1,5 @@
-# Copyright (C) 2008-2018 TrinityCore
+# This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
+# Copyright 2019 Josua Mayer
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -8,8 +9,70 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-add_library(sfmt INTERFACE)
+set(SFMT_SOURCES
+ SFMT.c
+ SFMT.h
+ SFMT-alti.h
+ SFMT-common.h
+ SFMT-neon.h
+ SFMT-params.h
+ SFMT-params607.h
+ SFMT-params1279.h
+ SFMT-params2281.h
+ SFMT-params4253.h
+ SFMT-params11213.h
+ SFMT-params19937.h
+ SFMT-params44497.h
+ SFMT-params86243.h
+ SFMT-params132049.h
+ SFMT-params216091.h
+ SFMT-sse2.h
+ SFMT-sse2-msc.h)
+
+add_library(sfmt STATIC ${SFMT_SOURCES})
target_include_directories(sfmt
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR})
+
+# using the standard Mersenne exponent 19937
+target_compile_definitions(sfmt PUBLIC -DSFMT_MEXP=19937)
+
+# enable SIMD instructions if available
+include(CheckCCompilerFlag)
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "(powerpc|ppc)64|(powerpc|ppc)64le")
+ check_c_compiler_flag("-maltivec" HAVE_ALTIVEC)
+ if (HAVE_ALTIVEC)
+ target_compile_options(sfmt PRIVATE -mabi=altivec -maltivec)
+ target_compile_definitions(sfmt PUBLIC -DHAVE_ALTIVEC)
+ else ()
+ message(WARNING "Altivec not available - performance will be poor!")
+ endif ()
+elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "arm|ARM")
+ check_c_compiler_flag(-mfpu=neon HAVE_NEON)
+ if (HAVE_NEON)
+ target_compile_options(sfmt PRIVATE -mfpu=neon -ftree-vectorize)
+ target_compile_definitions(sfmt PUBLIC -DHAVE_NEON)
+ else ()
+ message(WARNING "Neon not available - performance will be poor!")
+ endif ()
+elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
+ check_c_compiler_flag(-march=armv8-a+simd HAVE_NEON)
+ if (HAVE_NEON)
+ target_compile_options(sfmt PRIVATE -ftree-vectorize)
+ target_compile_definitions(sfmt PUBLIC -DHAVE_NEON)
+ else ()
+ message(WARNING "Neon not available - performance will be poor!")
+ endif ()
+elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
+ #SSE2 is always available
+ set(HAVE_SSE2 1)
+
+ if (NOT CMAKE_C_COMPILER_ID MATCHES "MSVC")
+ target_compile_options(sfmt PRIVATE -msse2)
+ endif ()
+ target_compile_definitions(sfmt PUBLIC -DHAVE_SSE2)
+endif ()
+
+# inherit trinitycore generic build options (e.g. fPIC)
+target_link_libraries(sfmt PRIVATE trinity-dependency-interface)
diff --git a/dep/SFMT/LICENSE.txt b/dep/SFMT/LICENSE.txt
new file mode 100644
index 00000000000..6f9c4a6d6a1
--- /dev/null
+++ b/dep/SFMT/LICENSE.txt
@@ -0,0 +1,32 @@
+Copyright (c) 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+University.
+Copyright (c) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University
+and The University of Tokyo.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the names of Hiroshima University, The University of
+ Tokyo nor the names of its contributors may be used to endorse
+ or promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/dep/SFMT/README.txt b/dep/SFMT/README.txt
new file mode 100644
index 00000000000..271fc40b651
--- /dev/null
+++ b/dep/SFMT/README.txt
@@ -0,0 +1,27 @@
+ =================================================================
+ SFMT ver. 1.5
+ SIMD oriented Fast Mersenne Twister(SFMT)
+
+ Mutsuo Saito (Hiroshima University) and
+ Makoto Matsumoto (The University of Tokyo)
+
+ Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ University.
+ Copyright (c) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University
+ and The University of Tokyo.
+ All rights reserved.
+
+ The (modified) BSD License is applied to this software, see LICENSE.txt
+ =================================================================
+ CAUTION:
+ BIGENDIAN OR ALTIVEC FEATURES ARE NOT TESTED AT ALL.
+
+ To see documents, see html/index.html.
+
+ To make test program, see html/howto-compile.html
+
+ If you want to redistribute and/or change source files, see LICENSE.txt.
+
+ When you change these files and redistribute them, PLEASE write your
+ e-mail address in redistribution and write to contact YOU first if
+ users of your changed source encounter troubles.
diff --git a/dep/SFMT/SFMT-alti.h b/dep/SFMT/SFMT-alti.h
new file mode 100644
index 00000000000..81c98b12b49
--- /dev/null
+++ b/dep/SFMT/SFMT-alti.h
@@ -0,0 +1,156 @@
+#pragma once
+/**
+ * @file SFMT-alti.h
+ *
+ * @brief SIMD oriented Fast Mersenne Twister(SFMT)
+ * pseudorandom number generator
+ *
+ * @author Mutsuo Saito (Hiroshima University)
+ * @author Makoto Matsumoto (Hiroshima University)
+ *
+ * Copyright (C) 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ * University. All rights reserved.
+ *
+ * The new BSD License is applied to this software.
+ * see LICENSE.txt
+ */
+
+#ifndef SFMT_ALTI_H
+#define SFMT_ALTI_H
+
+inline static vector unsigned int vec_recursion(vector unsigned int a,
+ vector unsigned int b,
+ vector unsigned int c,
+ vector unsigned int d);
+
+/**
+ * This function represents the recursion formula in AltiVec and BIG ENDIAN.
+ * @param a a 128-bit part of the interal state array
+ * @param b a 128-bit part of the interal state array
+ * @param c a 128-bit part of the interal state array
+ * @param d a 128-bit part of the interal state array
+ * @return output
+ */
+inline static vector unsigned int vec_recursion(vector unsigned int a,
+ vector unsigned int b,
+ vector unsigned int c,
+ vector unsigned int d) {
+
+ const vector unsigned int sl1 = SFMT_ALTI_SL1;
+ const vector unsigned int sr1 = SFMT_ALTI_SR1;
+#ifdef ONLY64
+ const vector unsigned int mask = SFMT_ALTI_MSK64;
+ const vector unsigned char perm_sl = SFMT_ALTI_SL2_PERM64;
+ const vector unsigned char perm_sr = SFMT_ALTI_SR2_PERM64;
+#else
+ const vector unsigned int mask = SFMT_ALTI_MSK;
+ const vector unsigned char perm_sl = SFMT_ALTI_SL2_PERM;
+ const vector unsigned char perm_sr = SFMT_ALTI_SR2_PERM;
+#endif
+ vector unsigned int v, w, x, y, z;
+ x = vec_perm(a, (vector unsigned int)perm_sl, perm_sl);
+ v = a;
+ y = vec_sr(b, sr1);
+ z = vec_perm(c, (vector unsigned int)perm_sr, perm_sr);
+ w = vec_sl(d, sl1);
+ z = vec_xor(z, w);
+ y = vec_and(y, mask);
+ v = vec_xor(v, x);
+ z = vec_xor(z, y);
+ z = vec_xor(z, v);
+ return z;
+}
+
+/**
+ * This function fills the internal state array with pseudorandom
+ * integers.
+ */
+void sfmt_gen_rand_all(sfmt_t * sfmt) {
+ int i;
+ vector unsigned int r, r1, r2;
+
+ r1 = sfmt->state[N - 2].s;
+ r2 = sfmt->state[N - 1].s;
+ for (i = 0; i < N - POS1; i++) {
+ r = vec_recursion(sfmt->state[i].s, sfmt->state[i + POS1].s, r1, r2);
+ sfmt->state[i].s = r;
+ r1 = r2;
+ r2 = r;
+ }
+ for (; i < N; i++) {
+ r = vec_recursion(sfmt->state[i].s, sfmt->state[i + POS1 - N].s, r1, r2);
+ sfmt->state[i].s = r;
+ r1 = r2;
+ r2 = r;
+ }
+}
+
+/**
+ * This function fills the user-specified array with pseudorandom
+ * integers.
+ *
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
+ * @param size number of 128-bit pesudorandom numbers to be generated.
+ */
+inline static void gen_rand_array(sfmt_t * sfmt, w128_t *array, int size) {
+ int i, j;
+ vector unsigned int r, r1, r2;
+
+ r1 = sfmt->state[N - 2].s;
+ r2 = sfmt->state[N - 1].s;
+ for (i = 0; i < N - POS1; i++) {
+ r = vec_recursion(sfmt->state[i].s, sfmt->state[i + POS1].s, r1, r2);
+ array[i].s = r;
+ r1 = r2;
+ r2 = r;
+ }
+ for (; i < N; i++) {
+ r = vec_recursion(sfmt->state[i].s, array[i + POS1 - N].s, r1, r2);
+ array[i].s = r;
+ r1 = r2;
+ r2 = r;
+ }
+ /* main loop */
+ for (; i < size - N; i++) {
+ r = vec_recursion(array[i - N].s, array[i + POS1 - N].s, r1, r2);
+ array[i].s = r;
+ r1 = r2;
+ r2 = r;
+ }
+ for (j = 0; j < 2 * N - size; j++) {
+ sfmt->state[j].s = array[j + size - N].s;
+ }
+ for (; i < size; i++) {
+ r = vec_recursion(array[i - N].s, array[i + POS1 - N].s, r1, r2);
+ array[i].s = r;
+ sfmt->state[j++].s = r;
+ r1 = r2;
+ r2 = r;
+ }
+}
+
+#ifndef ONLY64
+#if defined(__APPLE__)
+#define SFMT_ALTI_SWAP (vector unsigned char) \
+ (4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11)
+#else
+#define SFMT_ALTI_SWAP {4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11}
+#endif
+/**
+ * This function swaps high and low 32-bit of 64-bit integers in user
+ * specified array.
+ *
+ * @param array an 128-bit array to be swaped.
+ * @param size size of 128-bit array.
+ */
+inline static void swap(w128_t *array, int size) {
+ int i;
+ const vector unsigned char perm = SFMT_ALTI_SWAP;
+
+ for (i = 0; i < size; i++) {
+ array[i].s = vec_perm(array[i].s, (vector unsigned int)perm, perm);
+ }
+}
+#endif
+
+#endif
diff --git a/dep/SFMT/SFMT-common.h b/dep/SFMT/SFMT-common.h
new file mode 100644
index 00000000000..a5a9b05047a
--- /dev/null
+++ b/dep/SFMT/SFMT-common.h
@@ -0,0 +1,164 @@
+#pragma once
+/**
+ * @file SFMT-common.h
+ *
+ * @brief SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom
+ * number generator with jump function. This file includes common functions
+ * used in random number generation and jump.
+ *
+ * @author Mutsuo Saito (Hiroshima University)
+ * @author Makoto Matsumoto (The University of Tokyo)
+ *
+ * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ * University.
+ * Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima
+ * University and The University of Tokyo.
+ * All rights reserved.
+ *
+ * The 3-clause BSD License is applied to this software, see
+ * LICENSE.txt
+ */
+#ifndef SFMT_COMMON_H
+#define SFMT_COMMON_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#include "SFMT.h"
+
+inline static void do_recursion(w128_t * r, w128_t * a, w128_t * b,
+ w128_t * c, w128_t * d);
+
+inline static void rshift128(w128_t *out, w128_t const *in, int shift);
+inline static void lshift128(w128_t *out, w128_t const *in, int shift);
+
+/**
+ * This function simulates SIMD 128-bit right shift by the standard C.
+ * The 128-bit integer given in in is shifted by (shift * 8) bits.
+ * This function simulates the LITTLE ENDIAN SIMD.
+ * @param out the output of this function
+ * @param in the 128-bit data to be shifted
+ * @param shift the shift value
+ */
+#ifdef ONLY64
+inline static void rshift128(w128_t *out, w128_t const *in, int shift) {
+ uint64_t th, tl, oh, ol;
+
+ th = ((uint64_t)in->u[2] << 32) | ((uint64_t)in->u[3]);
+ tl = ((uint64_t)in->u[0] << 32) | ((uint64_t)in->u[1]);
+
+ oh = th >> (shift * 8);
+ ol = tl >> (shift * 8);
+ ol |= th << (64 - shift * 8);
+ out->u[0] = (uint32_t)(ol >> 32);
+ out->u[1] = (uint32_t)ol;
+ out->u[2] = (uint32_t)(oh >> 32);
+ out->u[3] = (uint32_t)oh;
+}
+#else
+inline static void rshift128(w128_t *out, w128_t const *in, int shift)
+{
+ uint64_t th, tl, oh, ol;
+
+ th = ((uint64_t)in->u[3] << 32) | ((uint64_t)in->u[2]);
+ tl = ((uint64_t)in->u[1] << 32) | ((uint64_t)in->u[0]);
+
+ oh = th >> (shift * 8);
+ ol = tl >> (shift * 8);
+ ol |= th << (64 - shift * 8);
+ out->u[1] = (uint32_t)(ol >> 32);
+ out->u[0] = (uint32_t)ol;
+ out->u[3] = (uint32_t)(oh >> 32);
+ out->u[2] = (uint32_t)oh;
+}
+#endif
+/**
+ * This function simulates SIMD 128-bit left shift by the standard C.
+ * The 128-bit integer given in in is shifted by (shift * 8) bits.
+ * This function simulates the LITTLE ENDIAN SIMD.
+ * @param out the output of this function
+ * @param in the 128-bit data to be shifted
+ * @param shift the shift value
+ */
+#ifdef ONLY64
+inline static void lshift128(w128_t *out, w128_t const *in, int shift) {
+ uint64_t th, tl, oh, ol;
+
+ th = ((uint64_t)in->u[2] << 32) | ((uint64_t)in->u[3]);
+ tl = ((uint64_t)in->u[0] << 32) | ((uint64_t)in->u[1]);
+
+ oh = th << (shift * 8);
+ ol = tl << (shift * 8);
+ oh |= tl >> (64 - shift * 8);
+ out->u[0] = (uint32_t)(ol >> 32);
+ out->u[1] = (uint32_t)ol;
+ out->u[2] = (uint32_t)(oh >> 32);
+ out->u[3] = (uint32_t)oh;
+}
+#else
+inline static void lshift128(w128_t *out, w128_t const *in, int shift)
+{
+ uint64_t th, tl, oh, ol;
+
+ th = ((uint64_t)in->u[3] << 32) | ((uint64_t)in->u[2]);
+ tl = ((uint64_t)in->u[1] << 32) | ((uint64_t)in->u[0]);
+
+ oh = th << (shift * 8);
+ ol = tl << (shift * 8);
+ oh |= tl >> (64 - shift * 8);
+ out->u[1] = (uint32_t)(ol >> 32);
+ out->u[0] = (uint32_t)ol;
+ out->u[3] = (uint32_t)(oh >> 32);
+ out->u[2] = (uint32_t)oh;
+}
+#endif
+/**
+ * This function represents the recursion formula.
+ * @param r output
+ * @param a a 128-bit part of the internal state array
+ * @param b a 128-bit part of the internal state array
+ * @param c a 128-bit part of the internal state array
+ * @param d a 128-bit part of the internal state array
+ */
+#ifdef ONLY64
+inline static void do_recursion(w128_t *r, w128_t *a, w128_t *b, w128_t *c,
+ w128_t *d) {
+ w128_t x;
+ w128_t y;
+
+ lshift128(&x, a, SFMT_SL2);
+ rshift128(&y, c, SFMT_SR2);
+ r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SFMT_SR1) & SFMT_MSK2) ^ y.u[0]
+ ^ (d->u[0] << SFMT_SL1);
+ r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SFMT_SR1) & SFMT_MSK1) ^ y.u[1]
+ ^ (d->u[1] << SFMT_SL1);
+ r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SFMT_SR1) & SFMT_MSK4) ^ y.u[2]
+ ^ (d->u[2] << SFMT_SL1);
+ r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SFMT_SR1) & SFMT_MSK3) ^ y.u[3]
+ ^ (d->u[3] << SFMT_SL1);
+}
+#else
+inline static void do_recursion(w128_t *r, w128_t *a, w128_t *b,
+ w128_t *c, w128_t *d)
+{
+ w128_t x;
+ w128_t y;
+
+ lshift128(&x, a, SFMT_SL2);
+ rshift128(&y, c, SFMT_SR2);
+ r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SFMT_SR1) & SFMT_MSK1)
+ ^ y.u[0] ^ (d->u[0] << SFMT_SL1);
+ r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SFMT_SR1) & SFMT_MSK2)
+ ^ y.u[1] ^ (d->u[1] << SFMT_SL1);
+ r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SFMT_SR1) & SFMT_MSK3)
+ ^ y.u[2] ^ (d->u[2] << SFMT_SL1);
+ r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SFMT_SR1) & SFMT_MSK4)
+ ^ y.u[3] ^ (d->u[3] << SFMT_SL1);
+}
+#endif
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // SFMT_COMMON_H
diff --git a/dep/SFMT/SFMT-hotfix1.diff b/dep/SFMT/SFMT-hotfix1.diff
deleted file mode 100644
index ba7810dc100..00000000000
--- a/dep/SFMT/SFMT-hotfix1.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/dep/SFMT/SFMT.h b/dep/SFMT/SFMT.h
-index 3d15d65..ccf21ce 100644
---- a/dep/SFMT/SFMT.h
-+++ b/dep/SFMT/SFMT.h
-@@ -173,7 +173,8 @@ public:
- uint32_t statesize = SFMT_N*4; // Size of state vector
-
- // Fill state vector with random numbers from seed
-- ((uint32_t*)state)[0] = y;
-+ uint32_t* s = (uint32_t*)&state;
-+ s[0] = y;
- const uint32_t factor = 1812433253U;// Multiplication factor
-
- for (i = 1; i < statesize; i++) {
diff --git a/dep/SFMT/SFMT-neon.h b/dep/SFMT/SFMT-neon.h
new file mode 100644
index 00000000000..8790b8b60ee
--- /dev/null
+++ b/dep/SFMT/SFMT-neon.h
@@ -0,0 +1,111 @@
+/**
+ * @file SFMT-neon.h
+ * @brief SIMD oriented Fast Mersenne Twister(SFMT) for ARM with 128b NEON
+ *
+ * @author Masaki Ota
+ *
+ * @note We assume LITTLE ENDIAN in this file
+ */
+
+#ifndef SFMT_NEON_H
+#define SFMT_NEON_H
+
+inline static void neon_recursion(uint32x4_t * r, uint32x4_t a, uint32x4_t b,
+ uint32x4_t c, uint32x4_t d);
+
+
+
+/**
+ * This function represents the recursion formula.
+ * @param r an output
+ * @param a a 128-bit part of the interal state array
+ * @param b a 128-bit part of the interal state array
+ * @param c a 128-bit part of the interal state array
+ * @param d a 128-bit part of the interal state array
+ */
+inline static void neon_recursion(uint32x4_t * r, uint32x4_t a, uint32x4_t b,
+ uint32x4_t c, uint32x4_t d)
+{
+ uint32x4_t v, x, y, z;
+ static const uint32x4_t vzero = {0,0,0,0};
+ static const uint32x4_t vmask = {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4};
+
+#define rotate_bytes(A, B, C) vreinterpretq_u32_u8(vextq_u8(vreinterpretq_u8_u32(A),vreinterpretq_u8_u32(B),(C)))
+
+ y = vshrq_n_u32(b, SFMT_SR1);
+ z = rotate_bytes(c, vzero, SFMT_SR2);
+ v = vshlq_n_u32(d, SFMT_SL1);
+ z = veorq_u32(z, a);
+ z = veorq_u32(z, v);
+ x = rotate_bytes(vzero, a, 16-SFMT_SL2);
+ y = vandq_u32(y, vmask);
+ z = veorq_u32(z, x);
+ z = veorq_u32(z, y);
+ *r = z;
+}
+
+/**
+ * This function fills the internal state array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state
+ */
+void sfmt_gen_rand_all(sfmt_t * sfmt) {
+ int i;
+ uint32x4_t r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ neon_recursion(&pstate[i].si, pstate[i].si, pstate[i + SFMT_POS1].si, r1, r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ neon_recursion(&pstate[i].si, pstate[i].si, pstate[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+}
+
+/**
+ * This function fills the user-specified array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state.
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
+ * @param size number of 128-bit pseudorandom numbers to be generated.
+ */
+static void gen_rand_array(sfmt_t * sfmt, w128_t * array, int size)
+{
+ int i, j;
+ uint32x4_t r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ neon_recursion(&array[i].si, pstate[i].si, pstate[i + SFMT_POS1].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ neon_recursion(&array[i].si, pstate[i].si, array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < size - SFMT_N; i++) {
+ neon_recursion(&array[i].si, array[i - SFMT_N].si, array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (j = 0; j < 2 * SFMT_N - size; j++) {
+ pstate[j] = array[j + size - SFMT_N];
+ }
+ for (; i < size; i++, j++) {
+ neon_recursion(&array[i].si, array[i - SFMT_N].si, array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = pstate[j].si = array[i].si;
+ }
+}
+
+#endif
diff --git a/dep/SFMT/SFMT-params.h b/dep/SFMT/SFMT-params.h
new file mode 100644
index 00000000000..2fe663ab65b
--- /dev/null
+++ b/dep/SFMT/SFMT-params.h
@@ -0,0 +1,98 @@
+#pragma once
+#ifndef SFMT_PARAMS_H
+#define SFMT_PARAMS_H
+
+#if !defined(SFMT_MEXP)
+#if defined(__GNUC__) && !defined(__ICC)
+ #warning "SFMT_MEXP is not defined. I assume MEXP is 19937."
+#endif
+ #define SFMT_MEXP 19937
+#endif
+/*-----------------
+ BASIC DEFINITIONS
+ -----------------*/
+/** Mersenne Exponent. The period of the sequence
+ * is a multiple of 2^MEXP-1.
+ * #define SFMT_MEXP 19937 */
+/** SFMT generator has an internal state array of 128-bit integers,
+ * and N is its size. */
+#define SFMT_N (SFMT_MEXP / 128 + 1)
+/** N32 is the size of internal state array when regarded as an array
+ * of 32-bit integers.*/
+#define SFMT_N32 (SFMT_N * 4)
+/** N64 is the size of internal state array when regarded as an array
+ * of 64-bit integers.*/
+#define SFMT_N64 (SFMT_N * 2)
+
+/*----------------------
+ the parameters of SFMT
+ following definitions are in paramsXXXX.h file.
+ ----------------------*/
+/** the pick up position of the array.
+#define SFMT_POS1 122
+*/
+
+/** the parameter of shift left as four 32-bit registers.
+#define SFMT_SL1 18
+ */
+
+/** the parameter of shift left as one 128-bit register.
+ * The 128-bit integer is shifted by (SFMT_SL2 * 8) bits.
+#define SFMT_SL2 1
+*/
+
+/** the parameter of shift right as four 32-bit registers.
+#define SFMT_SR1 11
+*/
+
+/** the parameter of shift right as one 128-bit register.
+ * The 128-bit integer is shifted by (SFMT_SR2 * 8) bits.
+#define SFMT_SR2 1
+*/
+
+/** A bitmask, used in the recursion. These parameters are introduced
+ * to break symmetry of SIMD.
+#define SFMT_MSK1 0xdfffffefU
+#define SFMT_MSK2 0xddfecb7fU
+#define SFMT_MSK3 0xbffaffffU
+#define SFMT_MSK4 0xbffffff6U
+*/
+
+/** These definitions are part of a 128-bit period certification vector.
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0x00000000U
+#define SFMT_PARITY4 0xc98e126aU
+*/
+
+#if SFMT_MEXP == 607
+ #include "SFMT-params607.h"
+#elif SFMT_MEXP == 1279
+ #include "SFMT-params1279.h"
+#elif SFMT_MEXP == 2281
+ #include "SFMT-params2281.h"
+#elif SFMT_MEXP == 4253
+ #include "SFMT-params4253.h"
+#elif SFMT_MEXP == 11213
+ #include "SFMT-params11213.h"
+#elif SFMT_MEXP == 19937
+ #include "SFMT-params19937.h"
+#elif SFMT_MEXP == 44497
+ #include "SFMT-params44497.h"
+#elif SFMT_MEXP == 86243
+ #include "SFMT-params86243.h"
+#elif SFMT_MEXP == 132049
+ #include "SFMT-params132049.h"
+#elif SFMT_MEXP == 216091
+ #include "SFMT-params216091.h"
+#else
+#if defined(__GNUC__) && !defined(__ICC)
+ #error "SFMT_MEXP is not valid."
+ #undef SFMT_MEXP
+#else
+ #undef SFMT_MEXP
+#endif
+
+#endif
+
+#endif /* SFMT_PARAMS_H */
diff --git a/dep/SFMT/SFMT-params11213.h b/dep/SFMT/SFMT-params11213.h
new file mode 100644
index 00000000000..57277477901
--- /dev/null
+++ b/dep/SFMT/SFMT-params11213.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS11213_H
+#define SFMT_PARAMS11213_H
+
+#define SFMT_POS1 68
+#define SFMT_SL1 14
+#define SFMT_SL2 3
+#define SFMT_SR1 7
+#define SFMT_SR2 3
+#define SFMT_MSK1 0xeffff7fbU
+#define SFMT_MSK2 0xffffffefU
+#define SFMT_MSK3 0xdfdfbfffU
+#define SFMT_MSK4 0x7fffdbfdU
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0xe8148000U
+#define SFMT_PARITY4 0xd0c7afa3U
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10}
+ #define SFMT_ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2}
+ #define SFMT_ALTI_SR2_PERM {5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12}
+ #define SFMT_ALTI_SR2_PERM64 {13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-11213:68-14-3-7-3:effff7fb-ffffffef-dfdfbfff-7fffdbfd"
+
+#endif /* SFMT_PARAMS11213_H */
diff --git a/dep/SFMT/SFMT-params1279.h b/dep/SFMT/SFMT-params1279.h
new file mode 100644
index 00000000000..12dbc132679
--- /dev/null
+++ b/dep/SFMT/SFMT-params1279.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS1279_H
+#define SFMT_PARAMS1279_H
+
+#define SFMT_POS1 7
+#define SFMT_SL1 14
+#define SFMT_SL2 3
+#define SFMT_SR1 5
+#define SFMT_SR2 1
+#define SFMT_MSK1 0xf7fefffdU
+#define SFMT_MSK2 0x7fefcfffU
+#define SFMT_MSK3 0xaff3ef3fU
+#define SFMT_MSK4 0xb5ffff7fU
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0x00000000U
+#define SFMT_PARITY4 0x20000000U
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10}
+ #define SFMT_ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2}
+ #define SFMT_ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
+ #define SFMT_ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-1279:7-14-3-5-1:f7fefffd-7fefcfff-aff3ef3f-b5ffff7f"
+
+#endif /* SFMT_PARAMS1279_H */
diff --git a/dep/SFMT/SFMT-params132049.h b/dep/SFMT/SFMT-params132049.h
new file mode 100644
index 00000000000..febc69f2f03
--- /dev/null
+++ b/dep/SFMT/SFMT-params132049.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS132049_H
+#define SFMT_PARAMS132049_H
+
+#define SFMT_POS1 110
+#define SFMT_SL1 19
+#define SFMT_SL2 1
+#define SFMT_SR1 21
+#define SFMT_SR2 1
+#define SFMT_MSK1 0xffffbb5fU
+#define SFMT_MSK2 0xfb6ebf95U
+#define SFMT_MSK3 0xfffefffaU
+#define SFMT_MSK4 0xcff77fffU
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0xcb520000U
+#define SFMT_PARITY4 0xc7e91c7dU
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8}
+ #define SFMT_ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0}
+ #define SFMT_ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
+ #define SFMT_ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-132049:110-19-1-21-1:ffffbb5f-fb6ebf95-fffefffa-cff77fff"
+
+#endif /* SFMT_PARAMS132049_H */
diff --git a/dep/SFMT/SFMT-params19937.h b/dep/SFMT/SFMT-params19937.h
new file mode 100644
index 00000000000..fc49fa14e50
--- /dev/null
+++ b/dep/SFMT/SFMT-params19937.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS19937_H
+#define SFMT_PARAMS19937_H
+
+#define SFMT_POS1 122
+#define SFMT_SL1 18
+#define SFMT_SL2 1
+#define SFMT_SR1 11
+#define SFMT_SR2 1
+#define SFMT_MSK1 0xdfffffefU
+#define SFMT_MSK2 0xddfecb7fU
+#define SFMT_MSK3 0xbffaffffU
+#define SFMT_MSK4 0xbffffff6U
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0x00000000U
+#define SFMT_PARITY4 0x13c9e684U
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8}
+ #define SFMT_ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0}
+ #define SFMT_ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
+ #define SFMT_ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-19937:122-18-1-11-1:dfffffef-ddfecb7f-bffaffff-bffffff6"
+
+#endif /* SFMT_PARAMS19937_H */
diff --git a/dep/SFMT/SFMT-params216091.h b/dep/SFMT/SFMT-params216091.h
new file mode 100644
index 00000000000..60d58574b83
--- /dev/null
+++ b/dep/SFMT/SFMT-params216091.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS216091_H
+#define SFMT_PARAMS216091_H
+
+#define SFMT_POS1 627
+#define SFMT_SL1 11
+#define SFMT_SL2 3
+#define SFMT_SR1 10
+#define SFMT_SR2 1
+#define SFMT_MSK1 0xbff7bff7U
+#define SFMT_MSK2 0xbfffffffU
+#define SFMT_MSK3 0xbffffa7fU
+#define SFMT_MSK4 0xffddfbfbU
+#define SFMT_PARITY1 0xf8000001U
+#define SFMT_PARITY2 0x89e80709U
+#define SFMT_PARITY3 0x3bd2b64bU
+#define SFMT_PARITY4 0x0c64b1e4U
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10}
+ #define SFMT_ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2}
+ #define SFMT_ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
+ #define SFMT_ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-216091:627-11-3-10-1:bff7bff7-bfffffff-bffffa7f-ffddfbfb"
+
+#endif /* SFMT_PARAMS216091_H */
diff --git a/dep/SFMT/SFMT-params2281.h b/dep/SFMT/SFMT-params2281.h
new file mode 100644
index 00000000000..05729515ce0
--- /dev/null
+++ b/dep/SFMT/SFMT-params2281.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS2281_H
+#define SFMT_PARAMS2281_H
+
+#define SFMT_POS1 12
+#define SFMT_SL1 19
+#define SFMT_SL2 1
+#define SFMT_SR1 5
+#define SFMT_SR2 1
+#define SFMT_MSK1 0xbff7ffbfU
+#define SFMT_MSK2 0xfdfffffeU
+#define SFMT_MSK3 0xf7ffef7fU
+#define SFMT_MSK4 0xf2f7cbbfU
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0x00000000U
+#define SFMT_PARITY4 0x41dfa600U
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8}
+ #define SFMT_ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0}
+ #define SFMT_ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
+ #define SFMT_ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-2281:12-19-1-5-1:bff7ffbf-fdfffffe-f7ffef7f-f2f7cbbf"
+
+#endif /* SFMT_PARAMS2281_H */
diff --git a/dep/SFMT/SFMT-params4253.h b/dep/SFMT/SFMT-params4253.h
new file mode 100644
index 00000000000..2e7bfad1fed
--- /dev/null
+++ b/dep/SFMT/SFMT-params4253.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS4253_H
+#define SFMT_PARAMS4253_H
+
+#define SFMT_POS1 17
+#define SFMT_SL1 20
+#define SFMT_SL2 1
+#define SFMT_SR1 7
+#define SFMT_SR2 1
+#define SFMT_MSK1 0x9f7bffffU
+#define SFMT_MSK2 0x9fffff5fU
+#define SFMT_MSK3 0x3efffffbU
+#define SFMT_MSK4 0xfffff7bbU
+#define SFMT_PARITY1 0xa8000001U
+#define SFMT_PARITY2 0xaf5390a3U
+#define SFMT_PARITY3 0xb740b3f8U
+#define SFMT_PARITY4 0x6c11486dU
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8}
+ #define SFMT_ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0}
+ #define SFMT_ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
+ #define SFMT_ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-4253:17-20-1-7-1:9f7bffff-9fffff5f-3efffffb-fffff7bb"
+
+#endif /* SFMT_PARAMS4253_H */
diff --git a/dep/SFMT/SFMT-params44497.h b/dep/SFMT/SFMT-params44497.h
new file mode 100644
index 00000000000..f9829db0bbb
--- /dev/null
+++ b/dep/SFMT/SFMT-params44497.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS44497_H
+#define SFMT_PARAMS44497_H
+
+#define SFMT_POS1 330
+#define SFMT_SL1 5
+#define SFMT_SL2 3
+#define SFMT_SR1 9
+#define SFMT_SR2 3
+#define SFMT_MSK1 0xeffffffbU
+#define SFMT_MSK2 0xdfbebfffU
+#define SFMT_MSK3 0xbfbf7befU
+#define SFMT_MSK4 0x9ffd7bffU
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0xa3ac4000U
+#define SFMT_PARITY4 0xecc1327aU
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10}
+ #define SFMT_ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2}
+ #define SFMT_ALTI_SR2_PERM {5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12}
+ #define SFMT_ALTI_SR2_PERM64 {13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-44497:330-5-3-9-3:effffffb-dfbebfff-bfbf7bef-9ffd7bff"
+
+#endif /* SFMT_PARAMS44497_H */
diff --git a/dep/SFMT/SFMT-params607.h b/dep/SFMT/SFMT-params607.h
new file mode 100644
index 00000000000..085367254af
--- /dev/null
+++ b/dep/SFMT/SFMT-params607.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS607_H
+#define SFMT_PARAMS607_H
+
+#define SFMT_POS1 2
+#define SFMT_SL1 15
+#define SFMT_SL2 3
+#define SFMT_SR1 13
+#define SFMT_SR2 3
+#define SFMT_MSK1 0xfdff37ffU
+#define SFMT_MSK2 0xef7f3f7dU
+#define SFMT_MSK3 0xff777b7dU
+#define SFMT_MSK4 0x7ff7fb2fU
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0x00000000U
+#define SFMT_PARITY4 0x5986f054U
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {3,21,21,21,7,0,1,2,11,4,5,6,15,8,9,10}
+ #define SFMT_ALTI_SL2_PERM64 {3,4,5,6,7,29,29,29,11,12,13,14,15,0,1,2}
+ #define SFMT_ALTI_SR2_PERM {5,6,7,0,9,10,11,4,13,14,15,8,19,19,19,12}
+ #define SFMT_ALTI_SR2_PERM64 {13,14,15,0,1,2,3,4,19,19,19,8,9,10,11,12}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-607:2-15-3-13-3:fdff37ff-ef7f3f7d-ff777b7d-7ff7fb2f"
+
+#endif /* SFMT_PARAMS607_H */
diff --git a/dep/SFMT/SFMT-params86243.h b/dep/SFMT/SFMT-params86243.h
new file mode 100644
index 00000000000..89773b156a9
--- /dev/null
+++ b/dep/SFMT/SFMT-params86243.h
@@ -0,0 +1,50 @@
+#pragma once
+#ifndef SFMT_PARAMS86243_H
+#define SFMT_PARAMS86243_H
+
+#define SFMT_POS1 366
+#define SFMT_SL1 6
+#define SFMT_SL2 7
+#define SFMT_SR1 19
+#define SFMT_SR2 1
+#define SFMT_MSK1 0xfdbffbffU
+#define SFMT_MSK2 0xbff7ff3fU
+#define SFMT_MSK3 0xfd77efffU
+#define SFMT_MSK4 0xbf9ff3ffU
+#define SFMT_PARITY1 0x00000001U
+#define SFMT_PARITY2 0x00000000U
+#define SFMT_PARITY3 0x00000000U
+#define SFMT_PARITY4 0xe9528d85U
+
+
+/* PARAMETERS FOR ALTIVEC */
+#if defined(__APPLE__) /* For OSX */
+ #define SFMT_ALTI_SL1 \
+ (vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
+ #define SFMT_ALTI_SR1 \
+ (vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
+ #define SFMT_ALTI_MSK \
+ (vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
+ #define SFMT_ALTI_MSK64 \
+ (vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
+ #define SFMT_ALTI_SL2_PERM \
+ (vector unsigned char)(25,25,25,25,3,25,25,25,7,0,1,2,11,4,5,6)
+ #define SFMT_ALTI_SL2_PERM64 \
+ (vector unsigned char)(7,25,25,25,25,25,25,25,15,0,1,2,3,4,5,6)
+ #define SFMT_ALTI_SR2_PERM \
+ (vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
+ #define SFMT_ALTI_SR2_PERM64 \
+ (vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
+#else /* For OTHER OSs(Linux?) */
+ #define SFMT_ALTI_SL1 {SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
+ #define SFMT_ALTI_SR1 {SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
+ #define SFMT_ALTI_MSK {SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
+ #define SFMT_ALTI_MSK64 {SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
+ #define SFMT_ALTI_SL2_PERM {25,25,25,25,3,25,25,25,7,0,1,2,11,4,5,6}
+ #define SFMT_ALTI_SL2_PERM64 {7,25,25,25,25,25,25,25,15,0,1,2,3,4,5,6}
+ #define SFMT_ALTI_SR2_PERM {7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
+ #define SFMT_ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
+#endif /* For OSX */
+#define SFMT_IDSTR "SFMT-86243:366-6-7-19-1:fdbffbff-bff7ff3f-fd77efff-bf9ff3ff"
+
+#endif /* SFMT_PARAMS86243_H */
diff --git a/dep/SFMT/SFMT-sse2-msc.h b/dep/SFMT/SFMT-sse2-msc.h
new file mode 100644
index 00000000000..9839df1a218
--- /dev/null
+++ b/dep/SFMT/SFMT-sse2-msc.h
@@ -0,0 +1,321 @@
+#pragma once
+/**
+ * @file SFMT-sse2-msc.h
+ * @brief SIMD oriented Fast Mersenne Twister(SFMT) for Intel SSE2 for MSC
+ *
+ * @author Mutsuo Saito (Hiroshima University)
+ * @author Makoto Matsumoto (Hiroshima University)
+ *
+ * @note We assume LITTLE ENDIAN in this file
+ *
+ * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ * University. All rights reserved.
+ * Copyright (C) 2013 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ * University.
+ *
+ * The new BSD License is applied to this software, see LICENSE.txt
+ */
+
+#ifndef SFMT_SSE2_MSC_H
+#define SFMT_SSE2_MSC_H
+
+/* This header file is included only when _MSC_VER is defined. */
+#if _MSC_VER > 1700
+
+inline static __m128i __vectorcall mm_recursion(__m128i a, __m128i b,
+ __m128i c, __m128i d);
+
+/**
+ * This function represents the recursion formula.
+ * @param a a 128-bit part of the interal state array
+ * @param b a 128-bit part of the interal state array
+ * @param c a 128-bit part of the interal state array
+ * @param d a 128-bit part of the interal state array
+ * @return new value
+ */
+inline static __m128i __vectorcall mm_recursion(__m128i a, __m128i b,
+ __m128i c, __m128i d)
+{
+ __m128i v, x, y, z;
+
+ y = _mm_srli_epi32(b, SFMT_SR1);
+ z = _mm_srli_si128(c, SFMT_SR2);
+ v = _mm_slli_epi32(d, SFMT_SL1);
+ z = _mm_xor_si128(z, a);
+ z = _mm_xor_si128(z, v);
+ x = _mm_slli_si128(a, SFMT_SL2);
+ y = _mm_and_si128(y, sse2_param_mask.si);
+ z = _mm_xor_si128(z, x);
+ return _mm_xor_si128(z, y);
+}
+
+/**
+ * This function fills the internal state array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state
+ */
+void sfmt_gen_rand_all(sfmt_t * sfmt) {
+ int i;
+ __m128i r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ pstate[i].si = mm_recursion(pstate[i].si,
+ pstate[i + SFMT_POS1].si, r1, r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ pstate[i].si = mm_recursion(pstate[i].si,
+ pstate[i + SFMT_POS1 - SFMT_N].si,
+ r1, r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+}
+
+/**
+ * This function fills the user-specified array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state.
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
+ * @param size number of 128-bit pseudorandom numbers to be generated.
+ */
+static void gen_rand_array(sfmt_t * sfmt, w128_t * array, int size)
+{
+ int i, j;
+ __m128i r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ array[i].si = mm_recursion(pstate[i].si,
+ pstate[i + SFMT_POS1].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ array[i].si = mm_recursion(pstate[i].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < size - SFMT_N; i++) {
+ array[i].si = mm_recursion(array[i - SFMT_N].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (j = 0; j < 2 * SFMT_N - size; j++) {
+ pstate[j] = array[j + size - SFMT_N];
+ }
+ for (; i < size; i++, j++) {
+ array[i].si = mm_recursion(array[i - SFMT_N].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ pstate[j] = array[i];
+ }
+}
+
+#elif defined(SFMT_USE_MACRO_FUNCTION_FOR_MSC)
+/**
+ * This function represents the recursion formula.
+ * @param r an output
+ * @param a a 128-bit part of the interal state array
+ * @param b a 128-bit part of the interal state array
+ * @param c a 128-bit part of the interal state array
+ * @param d a 128-bit part of the interal state array
+ */
+#define mm_recursion(r, a, b, c, d) \
+do { \
+ __m128i v, x, y, z; \
+ \
+ y = _mm_srli_epi32((b), SFMT_SR1); \
+ z = _mm_srli_si128((c), SFMT_SR2); \
+ v = _mm_slli_epi32((d), SFMT_SL1); \
+ z = _mm_xor_si128(z, (a)); \
+ z = _mm_xor_si128(z, v); \
+ x = _mm_slli_si128((a), SFMT_SL2); \
+ y = _mm_and_si128(y, sse2_param_mask.si); \
+ z = _mm_xor_si128(z, x); \
+ r = _mm_xor_si128(z, y); \
+} while (0)
+
+/**
+ * This function fills the internal state array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state
+ */
+void sfmt_gen_rand_all(sfmt_t * sfmt) {
+ int i;
+ __m128i r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ mm_recursion(pstate[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1].si, r1, r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ mm_recursion(pstate[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1 - SFMT_N].si,
+ r1, r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+}
+
+/**
+ * This function fills the user-specified array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state.
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
+ * @param size number of 128-bit pseudorandom numbers to be generated.
+ */
+static void gen_rand_array(sfmt_t * sfmt, w128_t * array, int size)
+{
+ int i, j;
+ __m128i r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ mm_recursion(array[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ mm_recursion(array[i].si, pstate[i].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < size - SFMT_N; i++) {
+ mm_recursion(array[i].si, array[i - SFMT_N].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (j = 0; j < 2 * SFMT_N - size; j++) {
+ pstate[j] = array[j + size - SFMT_N];
+ }
+ for (; i < size; i++, j++) {
+ mm_recursion(array[i].si, array[i - SFMT_N].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ pstate[j] = array[i];
+ }
+}
+#else
+inline static void mm_recursion(__m128i * r, __m128i a, __m128i b,
+ __m128i c, __m128i * d);
+
+/**
+ * This function represents the recursion formula.
+ * @param r an output
+ * @param a a 128-bit part of the interal state array
+ * @param b a 128-bit part of the interal state array
+ * @param c a 128-bit part of the interal state array
+ * @param d a 128-bit part of the interal state array
+ */
+inline static void mm_recursion(__m128i * r, __m128i a, __m128i b,
+ __m128i c, __m128i * d)
+{
+ __m128i v, x, y, z;
+
+ y = _mm_srli_epi32(b, SFMT_SR1);
+ z = _mm_srli_si128(c, SFMT_SR2);
+ v = _mm_slli_epi32(*d, SFMT_SL1);
+ z = _mm_xor_si128(z, a);
+ z = _mm_xor_si128(z, v);
+ x = _mm_slli_si128(a, SFMT_SL2);
+ y = _mm_and_si128(y, sse2_param_mask.si);
+ z = _mm_xor_si128(z, x);
+ z = _mm_xor_si128(z, y);
+ *r = z;
+}
+
+/**
+ * This function fills the internal state array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state
+ */
+void sfmt_gen_rand_all(sfmt_t * sfmt) {
+ int i;
+ __m128i r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ mm_recursion(&pstate[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1].si, r1, &r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ mm_recursion(&pstate[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1 - SFMT_N].si,
+ r1, &r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+}
+
+/**
+ * This function fills the user-specified array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state.
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
+ * @param size number of 128-bit pseudorandom numbers to be generated.
+ */
+static void gen_rand_array(sfmt_t * sfmt, w128_t * array, int size)
+{
+ int i, j;
+ __m128i r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ mm_recursion(&array[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1].si, r1, &r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ mm_recursion(&array[i].si, pstate[i].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, &r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < size - SFMT_N; i++) {
+ mm_recursion(&array[i].si, array[i - SFMT_N].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, &r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (j = 0; j < 2 * SFMT_N - size; j++) {
+ pstate[j] = array[j + size - SFMT_N];
+ }
+ for (; i < size; i++, j++) {
+ mm_recursion(&array[i].si, array[i - SFMT_N].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, &r2);
+ r1 = r2;
+ r2 = array[i].si;
+ pstate[j] = array[i];
+ }
+}
+#endif
+
+#endif
diff --git a/dep/SFMT/SFMT-sse2.h b/dep/SFMT/SFMT-sse2.h
new file mode 100644
index 00000000000..99a33ff1f8e
--- /dev/null
+++ b/dep/SFMT/SFMT-sse2.h
@@ -0,0 +1,121 @@
+#pragma once
+/**
+ * @file SFMT-sse2.h
+ * @brief SIMD oriented Fast Mersenne Twister(SFMT) for Intel SSE2
+ *
+ * @author Mutsuo Saito (Hiroshima University)
+ * @author Makoto Matsumoto (Hiroshima University)
+ *
+ * @note We assume LITTLE ENDIAN in this file
+ *
+ * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ * University. All rights reserved.
+ *
+ * The new BSD License is applied to this software, see LICENSE.txt
+ */
+
+#ifndef SFMT_SSE2_H
+#define SFMT_SSE2_H
+
+inline static void mm_recursion(__m128i * r, __m128i a, __m128i b,
+ __m128i c, __m128i d);
+
+/**
+ * This function represents the recursion formula.
+ * @param r an output
+ * @param a a 128-bit part of the interal state array
+ * @param b a 128-bit part of the interal state array
+ * @param c a 128-bit part of the interal state array
+ * @param d a 128-bit part of the interal state array
+ */
+inline static void mm_recursion(__m128i * r, __m128i a, __m128i b,
+ __m128i c, __m128i d)
+{
+ __m128i v, x, y, z;
+
+ y = _mm_srli_epi32(b, SFMT_SR1);
+ z = _mm_srli_si128(c, SFMT_SR2);
+ v = _mm_slli_epi32(d, SFMT_SL1);
+ z = _mm_xor_si128(z, a);
+ z = _mm_xor_si128(z, v);
+ x = _mm_slli_si128(a, SFMT_SL2);
+ y = _mm_and_si128(y, sse2_param_mask.si);
+ z = _mm_xor_si128(z, x);
+ z = _mm_xor_si128(z, y);
+ *r = z;
+}
+
+/**
+ * This function fills the internal state array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state
+ */
+void sfmt_gen_rand_all(sfmt_t * sfmt) {
+ int i;
+ __m128i r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ mm_recursion(&pstate[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1].si, r1, r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ mm_recursion(&pstate[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1 - SFMT_N].si,
+ r1, r2);
+ r1 = r2;
+ r2 = pstate[i].si;
+ }
+}
+
+/**
+ * This function fills the user-specified array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state.
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
+ * @param size number of 128-bit pseudorandom numbers to be generated.
+ */
+static void gen_rand_array(sfmt_t * sfmt, w128_t * array, int size)
+{
+ int i, j;
+ __m128i r1, r2;
+ w128_t * pstate = sfmt->state;
+
+ r1 = pstate[SFMT_N - 2].si;
+ r2 = pstate[SFMT_N - 1].si;
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ mm_recursion(&array[i].si, pstate[i].si,
+ pstate[i + SFMT_POS1].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < SFMT_N; i++) {
+ mm_recursion(&array[i].si, pstate[i].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (; i < size - SFMT_N; i++) {
+ mm_recursion(&array[i].si, array[i - SFMT_N].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ }
+ for (j = 0; j < 2 * SFMT_N - size; j++) {
+ pstate[j] = array[j + size - SFMT_N];
+ }
+ for (; i < size; i++, j++) {
+ mm_recursion(&array[i].si, array[i - SFMT_N].si,
+ array[i + SFMT_POS1 - SFMT_N].si, r1, r2);
+ r1 = r2;
+ r2 = array[i].si;
+ pstate[j] = array[i];
+ }
+}
+
+
+#endif
diff --git a/dep/SFMT/SFMT.c b/dep/SFMT/SFMT.c
new file mode 100644
index 00000000000..b4ac9308bb5
--- /dev/null
+++ b/dep/SFMT/SFMT.c
@@ -0,0 +1,437 @@
+/**
+ * @file SFMT.c
+ * @brief SIMD oriented Fast Mersenne Twister(SFMT)
+ *
+ * @author Mutsuo Saito (Hiroshima University)
+ * @author Makoto Matsumoto (Hiroshima University)
+ *
+ * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ * University.
+ * Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima
+ * University and The University of Tokyo.
+ * Copyright (C) 2013 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ * University.
+ * All rights reserved.
+ *
+ * The 3-clause BSD License is applied to this software, see
+ * LICENSE.txt
+ */
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#include
+#include
+#include "SFMT.h"
+#include "SFMT-params.h"
+#include "SFMT-common.h"
+
+#if defined(__BIG_ENDIAN__) && !defined(__amd64) && !defined(BIG_ENDIAN64)
+#define BIG_ENDIAN64 1
+#endif
+#if defined(HAVE_ALTIVEC) && !defined(BIG_ENDIAN64)
+#define BIG_ENDIAN64 1
+#endif
+#if defined(ONLY64) && !defined(BIG_ENDIAN64)
+ #if defined(__GNUC__)
+ #error "-DONLY64 must be specified with -DBIG_ENDIAN64"
+ #endif
+#undef ONLY64
+#endif
+
+/*----------------
+ STATIC FUNCTIONS
+ ----------------*/
+inline static int idxof(int i);
+inline static void gen_rand_array(sfmt_t * sfmt, w128_t *array, int size);
+inline static uint32_t func1(uint32_t x);
+inline static uint32_t func2(uint32_t x);
+static void period_certification(sfmt_t * sfmt);
+#if defined(BIG_ENDIAN64) && !defined(ONLY64)
+inline static void swap(w128_t *array, int size);
+#endif
+
+#if defined(HAVE_ALTIVEC)
+ #include "SFMT-alti.h"
+#elif defined(HAVE_SSE2)
+/**
+ * parameters used by sse2.
+ */
+ static const w128_t sse2_param_mask = {{SFMT_MSK1, SFMT_MSK2,
+ SFMT_MSK3, SFMT_MSK4}};
+ #if defined(_MSC_VER)
+ #include "SFMT-sse2-msc.h"
+ #else
+ #include "SFMT-sse2.h"
+ #endif
+#elif defined(HAVE_NEON)
+ #include "SFMT-neon.h"
+#endif
+
+/**
+ * This function simulate a 64-bit index of LITTLE ENDIAN
+ * in BIG ENDIAN machine.
+ */
+#ifdef ONLY64
+inline static int idxof(int i) {
+ return i ^ 1;
+}
+#else
+inline static int idxof(int i) {
+ return i;
+}
+#endif
+
+#if (!defined(HAVE_ALTIVEC)) && (!defined(HAVE_SSE2)) && (!defined(HAVE_NEON))
+/**
+ * This function fills the user-specified array with pseudorandom
+ * integers.
+ *
+ * @param sfmt SFMT internal state
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
+ * @param size number of 128-bit pseudorandom numbers to be generated.
+ */
+inline static void gen_rand_array(sfmt_t * sfmt, w128_t *array, int size) {
+ int i, j;
+ w128_t *r1, *r2;
+
+ r1 = &sfmt->state[SFMT_N - 2];
+ r2 = &sfmt->state[SFMT_N - 1];
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ do_recursion(&array[i], &sfmt->state[i], &sfmt->state[i + SFMT_POS1], r1, r2);
+ r1 = r2;
+ r2 = &array[i];
+ }
+ for (; i < SFMT_N; i++) {
+ do_recursion(&array[i], &sfmt->state[i],
+ &array[i + SFMT_POS1 - SFMT_N], r1, r2);
+ r1 = r2;
+ r2 = &array[i];
+ }
+ for (; i < size - SFMT_N; i++) {
+ do_recursion(&array[i], &array[i - SFMT_N],
+ &array[i + SFMT_POS1 - SFMT_N], r1, r2);
+ r1 = r2;
+ r2 = &array[i];
+ }
+ for (j = 0; j < 2 * SFMT_N - size; j++) {
+ sfmt->state[j] = array[j + size - SFMT_N];
+ }
+ for (; i < size; i++, j++) {
+ do_recursion(&array[i], &array[i - SFMT_N],
+ &array[i + SFMT_POS1 - SFMT_N], r1, r2);
+ r1 = r2;
+ r2 = &array[i];
+ sfmt->state[j] = array[i];
+ }
+}
+#endif
+
+#if defined(BIG_ENDIAN64) && !defined(ONLY64) && !defined(HAVE_ALTIVEC)
+inline static void swap(w128_t *array, int size) {
+ int i;
+ uint32_t x, y;
+
+ for (i = 0; i < size; i++) {
+ x = array[i].u[0];
+ y = array[i].u[2];
+ array[i].u[0] = array[i].u[1];
+ array[i].u[2] = array[i].u[3];
+ array[i].u[1] = x;
+ array[i].u[3] = y;
+ }
+}
+#endif
+/**
+ * This function represents a function used in the initialization
+ * by init_by_array
+ * @param x 32-bit integer
+ * @return 32-bit integer
+ */
+static uint32_t func1(uint32_t x) {
+ return (x ^ (x >> 27)) * (uint32_t)1664525UL;
+}
+
+/**
+ * This function represents a function used in the initialization
+ * by init_by_array
+ * @param x 32-bit integer
+ * @return 32-bit integer
+ */
+static uint32_t func2(uint32_t x) {
+ return (x ^ (x >> 27)) * (uint32_t)1566083941UL;
+}
+
+/**
+ * This function certificate the period of 2^{MEXP}
+ * @param sfmt SFMT internal state
+ */
+static void period_certification(sfmt_t * sfmt) {
+ uint32_t inner = 0;
+ int i, j;
+ uint32_t work;
+ uint32_t *psfmt32 = &sfmt->state[0].u[0];
+ const uint32_t parity[4] = {SFMT_PARITY1, SFMT_PARITY2,
+ SFMT_PARITY3, SFMT_PARITY4};
+
+ for (i = 0; i < 4; i++) {
+ inner ^= psfmt32[idxof(i)] & parity[i];
+ }
+ for (i = 16; i > 0; i >>= 1) {
+ inner ^= inner >> i;
+ }
+ inner &= 1;
+ /* check OK */
+ if (inner == 1) {
+ return;
+ }
+ /* check NG, and modification */
+ for (i = 0; i < 4; i++) {
+ work = 1;
+ for (j = 0; j < 32; j++) {
+ if ((work & parity[i]) != 0) {
+ psfmt32[idxof(i)] ^= work;
+ return;
+ }
+ work = work << 1;
+ }
+ }
+}
+
+/*----------------
+ PUBLIC FUNCTIONS
+ ----------------*/
+#define UNUSED_VARIABLE(x) (void)(x)
+/**
+ * This function returns the identification string.
+ * The string shows the word size, the Mersenne exponent,
+ * and all parameters of this generator.
+ * @param sfmt SFMT internal state
+ */
+const char *sfmt_get_idstring(sfmt_t * sfmt) {
+ UNUSED_VARIABLE(sfmt);
+ return SFMT_IDSTR;
+}
+
+/**
+ * This function returns the minimum size of array used for \b
+ * fill_array32() function.
+ * @param sfmt SFMT internal state
+ * @return minimum size of array used for fill_array32() function.
+ */
+int sfmt_get_min_array_size32(sfmt_t * sfmt) {
+ UNUSED_VARIABLE(sfmt);
+ return SFMT_N32;
+}
+
+/**
+ * This function returns the minimum size of array used for \b
+ * fill_array64() function.
+ * @param sfmt SFMT internal state
+ * @return minimum size of array used for fill_array64() function.
+ */
+int sfmt_get_min_array_size64(sfmt_t * sfmt) {
+ UNUSED_VARIABLE(sfmt);
+ return SFMT_N64;
+}
+
+#if !defined(HAVE_SSE2) && !defined(HAVE_ALTIVEC) && !defined(HAVE_NEON)
+/**
+ * This function fills the internal state array with pseudorandom
+ * integers.
+ * @param sfmt SFMT internal state
+ */
+void sfmt_gen_rand_all(sfmt_t * sfmt) {
+ int i;
+ w128_t *r1, *r2;
+
+ r1 = &sfmt->state[SFMT_N - 2];
+ r2 = &sfmt->state[SFMT_N - 1];
+ for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
+ do_recursion(&sfmt->state[i], &sfmt->state[i],
+ &sfmt->state[i + SFMT_POS1], r1, r2);
+ r1 = r2;
+ r2 = &sfmt->state[i];
+ }
+ for (; i < SFMT_N; i++) {
+ do_recursion(&sfmt->state[i], &sfmt->state[i],
+ &sfmt->state[i + SFMT_POS1 - SFMT_N], r1, r2);
+ r1 = r2;
+ r2 = &sfmt->state[i];
+ }
+}
+#endif
+
+#ifndef ONLY64
+/**
+ * This function generates pseudorandom 32-bit integers in the
+ * specified array[] by one call. The number of pseudorandom integers
+ * is specified by the argument size, which must be at least 624 and a
+ * multiple of four. The generation by this function is much faster
+ * than the following gen_rand function.
+ *
+ * For initialization, init_gen_rand or init_by_array must be called
+ * before the first call of this function. This function can not be
+ * used after calling gen_rand function, without initialization.
+ *
+ * @param sfmt SFMT internal state
+ * @param array an array where pseudorandom 32-bit integers are filled
+ * by this function. The pointer to the array must be \b "aligned"
+ * (namely, must be a multiple of 16) in the SIMD version, since it
+ * refers to the address of a 128-bit integer. In the standard C
+ * version, the pointer is arbitrary.
+ *
+ * @param size the number of 32-bit pseudorandom integers to be
+ * generated. size must be a multiple of 4, and greater than or equal
+ * to (MEXP / 128 + 1) * 4.
+ *
+ * @note \b memalign or \b posix_memalign is available to get aligned
+ * memory. Mac OSX doesn't have these functions, but \b malloc of OSX
+ * returns the pointer to the aligned memory block.
+ */
+void sfmt_fill_array32(sfmt_t * sfmt, uint32_t *array, int size) {
+ assert(sfmt->idx == SFMT_N32);
+ assert(size % 4 == 0);
+ assert(size >= SFMT_N32);
+
+ gen_rand_array(sfmt, (w128_t *)array, size / 4);
+ sfmt->idx = SFMT_N32;
+}
+#endif
+
+/**
+ * This function generates pseudorandom 64-bit integers in the
+ * specified array[] by one call. The number of pseudorandom integers
+ * is specified by the argument size, which must be at least 312 and a
+ * multiple of two. The generation by this function is much faster
+ * than the following gen_rand function.
+ *
+ * @param sfmt SFMT internal state
+ * For initialization, init_gen_rand or init_by_array must be called
+ * before the first call of this function. This function can not be
+ * used after calling gen_rand function, without initialization.
+ *
+ * @param array an array where pseudorandom 64-bit integers are filled
+ * by this function. The pointer to the array must be "aligned"
+ * (namely, must be a multiple of 16) in the SIMD version, since it
+ * refers to the address of a 128-bit integer. In the standard C
+ * version, the pointer is arbitrary.
+ *
+ * @param size the number of 64-bit pseudorandom integers to be
+ * generated. size must be a multiple of 2, and greater than or equal
+ * to (MEXP / 128 + 1) * 2
+ *
+ * @note \b memalign or \b posix_memalign is available to get aligned
+ * memory. Mac OSX doesn't have these functions, but \b malloc of OSX
+ * returns the pointer to the aligned memory block.
+ */
+void sfmt_fill_array64(sfmt_t * sfmt, uint64_t *array, int size) {
+ assert(sfmt->idx == SFMT_N32);
+ assert(size % 2 == 0);
+ assert(size >= SFMT_N64);
+
+ gen_rand_array(sfmt, (w128_t *)array, size / 2);
+ sfmt->idx = SFMT_N32;
+
+#if defined(BIG_ENDIAN64) && !defined(ONLY64)
+ swap((w128_t *)array, size /2);
+#endif
+}
+
+/**
+ * This function initializes the internal state array with a 32-bit
+ * integer seed.
+ *
+ * @param sfmt SFMT internal state
+ * @param seed a 32-bit integer used as the seed.
+ */
+void sfmt_init_gen_rand(sfmt_t * sfmt, uint32_t seed) {
+ int i;
+
+ uint32_t *psfmt32 = &sfmt->state[0].u[0];
+
+ psfmt32[idxof(0)] = seed;
+ for (i = 1; i < SFMT_N32; i++) {
+ psfmt32[idxof(i)] = 1812433253UL * (psfmt32[idxof(i - 1)]
+ ^ (psfmt32[idxof(i - 1)] >> 30))
+ + i;
+ }
+ sfmt->idx = SFMT_N32;
+ period_certification(sfmt);
+}
+
+/**
+ * This function initializes the internal state array,
+ * with an array of 32-bit integers used as the seeds
+ * @param sfmt SFMT internal state
+ * @param init_key the array of 32-bit integers, used as a seed.
+ * @param key_length the length of init_key.
+ */
+void sfmt_init_by_array(sfmt_t * sfmt, uint32_t *init_key, int key_length) {
+ int i, j, count;
+ uint32_t r;
+ int lag;
+ int mid;
+ int size = SFMT_N * 4;
+ uint32_t *psfmt32 = &sfmt->state[0].u[0];
+
+ if (size >= 623) {
+ lag = 11;
+ } else if (size >= 68) {
+ lag = 7;
+ } else if (size >= 39) {
+ lag = 5;
+ } else {
+ lag = 3;
+ }
+ mid = (size - lag) / 2;
+
+ memset(sfmt, 0x8b, sizeof(sfmt_t));
+ if (key_length + 1 > SFMT_N32) {
+ count = key_length + 1;
+ } else {
+ count = SFMT_N32;
+ }
+ r = func1(psfmt32[idxof(0)] ^ psfmt32[idxof(mid)]
+ ^ psfmt32[idxof(SFMT_N32 - 1)]);
+ psfmt32[idxof(mid)] += r;
+ r += key_length;
+ psfmt32[idxof(mid + lag)] += r;
+ psfmt32[idxof(0)] = r;
+
+ count--;
+ for (i = 1, j = 0; (j < count) && (j < key_length); j++) {
+ r = func1(psfmt32[idxof(i)] ^ psfmt32[idxof((i + mid) % SFMT_N32)]
+ ^ psfmt32[idxof((i + SFMT_N32 - 1) % SFMT_N32)]);
+ psfmt32[idxof((i + mid) % SFMT_N32)] += r;
+ r += init_key[j] + i;
+ psfmt32[idxof((i + mid + lag) % SFMT_N32)] += r;
+ psfmt32[idxof(i)] = r;
+ i = (i + 1) % SFMT_N32;
+ }
+ for (; j < count; j++) {
+ r = func1(psfmt32[idxof(i)] ^ psfmt32[idxof((i + mid) % SFMT_N32)]
+ ^ psfmt32[idxof((i + SFMT_N32 - 1) % SFMT_N32)]);
+ psfmt32[idxof((i + mid) % SFMT_N32)] += r;
+ r += i;
+ psfmt32[idxof((i + mid + lag) % SFMT_N32)] += r;
+ psfmt32[idxof(i)] = r;
+ i = (i + 1) % SFMT_N32;
+ }
+ for (j = 0; j < SFMT_N32; j++) {
+ r = func2(psfmt32[idxof(i)] + psfmt32[idxof((i + mid) % SFMT_N32)]
+ + psfmt32[idxof((i + SFMT_N32 - 1) % SFMT_N32)]);
+ psfmt32[idxof((i + mid) % SFMT_N32)] ^= r;
+ r -= i;
+ psfmt32[idxof((i + mid + lag) % SFMT_N32)] ^= r;
+ psfmt32[idxof(i)] = r;
+ i = (i + 1) % SFMT_N32;
+ }
+
+ sfmt->idx = SFMT_N32;
+ period_certification(sfmt);
+}
+#if defined(__cplusplus)
+}
+#endif
diff --git a/dep/SFMT/SFMT.h b/dep/SFMT/SFMT.h
index ccf21cecd5f..79e012d633c 100644
--- a/dep/SFMT/SFMT.h
+++ b/dep/SFMT/SFMT.h
@@ -1,363 +1,304 @@
-/*
- * Copyright notice
- * ================
- * GNU General Public License http://www.gnu.org/licenses/gpl.html
- * This C++ implementation of SFMT contains parts of the original C code
- * which was published under the following BSD license, which is therefore
- * in effect in addition to the GNU General Public License.
- * Copyright (c) 2006, 2007 by Mutsuo Saito, Makoto Matsumoto and Hiroshima University.
- * Copyright (c) 2008 by Agner Fog.
- * Copyright (c) 2008-2013 Trinity Core
- *
- * BSD License:
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * > Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * > Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * > Neither the name of the Hiroshima University nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#pragma once
+/**
+ * @file SFMT.h
+ *
+ * @brief SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom
+ * number generator using C structure.
+ *
+ * @author Mutsuo Saito (Hiroshima University)
+ * @author Makoto Matsumoto (The University of Tokyo)
+ *
+ * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
+ * University.
+ * Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima
+ * University and The University of Tokyo.
+ * All rights reserved.
+ *
+ * The 3-clause BSD License is applied to this software, see
+ * LICENSE.txt
+ *
+ * @note We assume that your system has inttypes.h. If your system
+ * doesn't have inttypes.h, you have to typedef uint32_t and uint64_t,
+ * and you have to define PRIu64 and PRIx64 in this file as follows:
+ * @verbatim
+ typedef unsigned int uint32_t
+ typedef unsigned long long uint64_t
+ #define PRIu64 "llu"
+ #define PRIx64 "llx"
+@endverbatim
+ * uint32_t must be exactly 32-bit unsigned integer type (no more, no
+ * less), and uint64_t must be exactly 64-bit unsigned integer type.
+ * PRIu64 and PRIx64 are used for printf function to print 64-bit
+ * unsigned int and 64-bit unsigned int in hexadecimal format.
*/
-#ifndef SFMT_H
-#define SFMT_H
-
-#include // Define SSE2 intrinsics
-#include "randomc.h" // Define integer types etc
-#include
-#include
-
-// Choose one of the possible Mersenne exponents.
-// Higher values give longer cycle length and use more memory:
-//#define MEXP 607
-//#define MEXP 1279
-//#define MEXP 2281
-//#define MEXP 4253
- #define MEXP 11213
-//#define MEXP 19937
-//#define MEXP 44497
+#ifndef SFMTST_H
+#define SFMTST_H
+#if defined(__cplusplus)
+extern "C" {
+#endif
-// Define constants for the selected Mersenne exponent:
-#if MEXP == 44497
-#define SFMT_N 348 // Size of state vector
-#define SFMT_M 330 // Position of intermediate feedback
-#define SFMT_SL1 5 // Left shift of W[N-1], 32-bit words
-#define SFMT_SL2 3 // Left shift of W[0], *8, 128-bit words
-#define SFMT_SR1 9 // Right shift of W[M], 32-bit words
-#define SFMT_SR2 3 // Right shift of W[N-2], *8, 128-bit words
-#define SFMT_MASK 0xeffffffb,0xdfbebfff,0xbfbf7bef,0x9ffd7bff // AND mask
-#define SFMT_PARITY 1,0,0xa3ac4000,0xecc1327a // Period certification vector
+#include
+#include
+
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+ #include
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
+ typedef unsigned int uint32_t;
+ typedef unsigned __int64 uint64_t;
+ #define inline __inline
+#else
+ #include
+ #if defined(__GNUC__)
+ #define inline __inline__
+ #endif
+#endif
-#elif MEXP == 19937
-#define SFMT_N 156 // Size of state vector
-#define SFMT_M 122 // Position of intermediate feedback
-#define SFMT_SL1 18 // Left shift of W[N-1], 32-bit words
-#define SFMT_SL2 1 // Left shift of W[0], *8, 128-bit words
-#define SFMT_SR1 11 // Right shift of W[M], 32-bit words
-#define SFMT_SR2 1 // Right shift of W[N-2], *8, 128-bit words
-#define SFMT_MASK 0xdfffffef,0xddfecb7f,0xbffaffff,0xbffffff6 // AND mask
-#define SFMT_PARITY 1,0,0,0x13c9e684 // Period certification vector
+#ifndef PRIu64
+ #if defined(_MSC_VER) || defined(__BORLANDC__)
+ #define PRIu64 "I64u"
+ #define PRIx64 "I64x"
+ #else
+ #define PRIu64 "llu"
+ #define PRIx64 "llx"
+ #endif
+#endif
-#elif MEXP == 11213
-#define SFMT_N 88 // Size of state vector
-#define SFMT_M 68 // Position of intermediate feedback
-#define SFMT_SL1 14 // Left shift of W[N-1], 32-bit words
-#define SFMT_SL2 3 // Left shift of W[0], *8, 128-bit words
-#define SFMT_SR1 7 // Right shift of W[M], 32-bit words
-#define SFMT_SR2 3 // Right shift of W[N-2], *8, 128-bit words
-#define SFMT_MASK 0xeffff7fb,0xffffffef,0xdfdfbfff,0x7fffdbfd // AND mask
-#define SFMT_PARITY 1,0,0xe8148000,0xd0c7afa3 // Period certification vector
+#include "SFMT-params.h"
+
+/*------------------------------------------
+ 128-bit SIMD like data type for standard C
+ ------------------------------------------*/
+#if defined(HAVE_ALTIVEC)
+ #if !defined(__APPLE__)
+ #include
+ #endif
+/** 128-bit data structure */
+union W128_T {
+ vector unsigned int s;
+ uint32_t u[4];
+ uint64_t u64[2];
+};
+#elif defined(HAVE_NEON)
+ #include
+
+/** 128-bit data structure */
+union W128_T {
+ uint32_t u[4];
+ uint64_t u64[2];
+ uint32x4_t si;
+};
+#elif defined(HAVE_SSE2)
+ #include
+
+/** 128-bit data structure */
+union W128_T {
+ uint32_t u[4];
+ uint64_t u64[2];
+ __m128i si;
+};
+#else
+/** 128-bit data structure */
+union W128_T {
+ uint32_t u[4];
+ uint64_t u64[2];
+};
+#endif
-#elif MEXP == 4253
-#define SFMT_N 34 // Size of state vector
-#define SFMT_M 17 // Position of intermediate feedback
-#define SFMT_SL1 20 // Left shift of W[N-1], 32-bit words
-#define SFMT_SL2 1 // Left shift of W[0], *8, 128-bit words
-#define SFMT_SR1 7 // Right shift of W[M], 32-bit words
-#define SFMT_SR2 1 // Right shift of W[N-2], *8, 128-bit words
-#define SFMT_MASK 0x9f7bffff, 0x9fffff5f, 0x3efffffb, 0xfffff7bb // AND mask
-#define SFMT_PARITY 0xa8000001, 0xaf5390a3, 0xb740b3f8, 0x6c11486d // Period certification vector
+/** 128-bit data type */
+typedef union W128_T w128_t;
-#elif MEXP == 2281
-#define SFMT_N 18 // Size of state vector
-#define SFMT_M 12 // Position of intermediate feedback
-#define SFMT_SL1 19 // Left shift of W[N-1], 32-bit words
-#define SFMT_SL2 1 // Left shift of W[0], *8, 128-bit words
-#define SFMT_SR1 5 // Right shift of W[M], 32-bit words
-#define SFMT_SR2 1 // Right shift of W[N-2], *8, 128-bit words
-#define SFMT_MASK 0xbff7ffbf, 0xfdfffffe, 0xf7ffef7f, 0xf2f7cbbf // AND mask
-#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x41dfa600 // Period certification vector
+/**
+ * SFMT internal state
+ */
+struct SFMT_T {
+ /** the 128-bit internal state array */
+ w128_t state[SFMT_N];
+ /** index counter to the 32-bit internal state array */
+ int idx;
+};
-#elif MEXP == 1279
-#define SFMT_N 10 // Size of state vector
-#define SFMT_M 7 // Position of intermediate feedback
-#define SFMT_SL1 14 // Left shift of W[N-1], 32-bit words
-#define SFMT_SL2 3 // Left shift of W[0], *8, 128-bit words
-#define SFMT_SR1 5 // Right shift of W[M], 32-bit words
-#define SFMT_SR2 1 // Right shift of W[N-2], *8, 128-bit words
-#define SFMT_MASK 0xf7fefffd, 0x7fefcfff, 0xaff3ef3f, 0xb5ffff7f // AND mask
-#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x20000000 // Period certification vector
+typedef struct SFMT_T sfmt_t;
+
+void sfmt_fill_array32(sfmt_t * sfmt, uint32_t * array, int size);
+void sfmt_fill_array64(sfmt_t * sfmt, uint64_t * array, int size);
+void sfmt_init_gen_rand(sfmt_t * sfmt, uint32_t seed);
+void sfmt_init_by_array(sfmt_t * sfmt, uint32_t * init_key, int key_length);
+const char * sfmt_get_idstring(sfmt_t * sfmt);
+int sfmt_get_min_array_size32(sfmt_t * sfmt);
+int sfmt_get_min_array_size64(sfmt_t * sfmt);
+void sfmt_gen_rand_all(sfmt_t * sfmt);
+
+#ifndef ONLY64
+/**
+ * This function generates and returns 32-bit pseudorandom number.
+ * init_gen_rand or init_by_array must be called before this function.
+ * @param sfmt SFMT internal state
+ * @return 32-bit pseudorandom number
+ */
+inline static uint32_t sfmt_genrand_uint32(sfmt_t * sfmt) {
+ uint32_t r;
+ uint32_t * psfmt32 = &sfmt->state[0].u[0];
-#elif MEXP == 607
-#define SFMT_N 5 // Size of state vector
-#define SFMT_M 2 // Position of intermediate feedback
-#define SFMT_SL1 15 // Left shift of W[N-1], 32-bit words
-#define SFMT_SL2 3 // Left shift of W[0], *8, 128-bit words
-#define SFMT_SR1 13 // Right shift of W[M], 32-bit words
-#define SFMT_SR2 3 // Right shift of W[N-2], *8, 128-bit words
-#define SFMT_MASK 0xfdff37ff, 0xef7f3f7d, 0xff777b7d, 0x7ff7fb2f // AND mask
-#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x5986f054 // Period certification vector
+ if (sfmt->idx >= SFMT_N32) {
+ sfmt_gen_rand_all(sfmt);
+ sfmt->idx = 0;
+ }
+ r = psfmt32[sfmt->idx++];
+ return r;
+}
#endif
+/**
+ * This function generates and returns 64-bit pseudorandom number.
+ * init_gen_rand or init_by_array must be called before this function.
+ * The function gen_rand64 should not be called after gen_rand32,
+ * unless an initialization is again executed.
+ * @param sfmt SFMT internal state
+ * @return 64-bit pseudorandom number
+ */
+inline static uint64_t sfmt_genrand_uint64(sfmt_t * sfmt) {
+#if defined(BIG_ENDIAN64) && !defined(ONLY64)
+ uint32_t * psfmt32 = &sfmt->state[0].u[0];
+ uint32_t r1, r2;
+#else
+ uint64_t r;
+#endif
+ uint64_t * psfmt64 = &sfmt->state[0].u64[0];
+ assert(sfmt->idx % 2 == 0);
-// Functions used by SFMTRand::RandomInitByArray (UNUSED AND COMMENTED OUT)
-/*
-static uint32_t func1(uint32_t x) {
- return (x ^ (x >> 27)) * 1664525U;
+ if (sfmt->idx >= SFMT_N32) {
+ sfmt_gen_rand_all(sfmt);
+ sfmt->idx = 0;
+ }
+#if defined(BIG_ENDIAN64) && !defined(ONLY64)
+ r1 = psfmt32[sfmt->idx];
+ r2 = psfmt32[sfmt->idx + 1];
+ sfmt->idx += 2;
+ return ((uint64_t)r2 << 32) | r1;
+#else
+ r = psfmt64[sfmt->idx / 2];
+ sfmt->idx += 2;
+ return r;
+#endif
}
-static uint32_t func2(uint32_t x) {
- return (x ^ (x >> 27)) * 1566083941U;
+/* =================================================
+ The following real versions are due to Isaku Wada
+ ================================================= */
+/**
+ * converts an unsigned 32-bit number to a double on [0,1]-real-interval.
+ * @param v 32-bit unsigned integer
+ * @return double on [0,1]-real-interval
+ */
+inline static double sfmt_to_real1(uint32_t v)
+{
+ return v * (1.0/4294967295.0);
+ /* divided by 2^32-1 */
}
-*/
-// Subfunction for the sfmt algorithm
-static inline __m128i sfmt_recursion(__m128i const &a, __m128i const &b,
-__m128i const &c, __m128i const &d, __m128i const &mask) {
- __m128i a1, b1, c1, d1, z1, z2;
- b1 = _mm_srli_epi32(b, SFMT_SR1);
- a1 = _mm_slli_si128(a, SFMT_SL2);
- c1 = _mm_srli_si128(c, SFMT_SR2);
- d1 = _mm_slli_epi32(d, SFMT_SL1);
- b1 = _mm_and_si128(b1, mask);
- z1 = _mm_xor_si128(a, a1);
- z2 = _mm_xor_si128(b1, d1);
- z1 = _mm_xor_si128(z1, c1);
- z2 = _mm_xor_si128(z1, z2);
- return z2;
+/**
+ * generates a random number on [0,1]-real-interval
+ * @param sfmt SFMT internal state
+ * @return double on [0,1]-real-interval
+ */
+inline static double sfmt_genrand_real1(sfmt_t * sfmt)
+{
+ return sfmt_to_real1(sfmt_genrand_uint32(sfmt));
}
-namespace boost {
- template class thread_specific_ptr;
+/**
+ * converts an unsigned 32-bit integer to a double on [0,1)-real-interval.
+ * @param v 32-bit unsigned integer
+ * @return double on [0,1)-real-interval
+ */
+inline static double sfmt_to_real2(uint32_t v)
+{
+ return v * (1.0/4294967296.0);
+ /* divided by 2^32 */
}
-// Class for SFMT generator
-class SFMTRand { // Encapsulate random number generator
- friend class boost::thread_specific_ptr;
-
-public:
- SFMTRand()
- {
- LastInterval = 0;
- RandomInit((int)(time(0)));
- }
-
- void RandomInit(int seed) // Re-seed
- {
- // Re-seed
- uint32_t i; // Loop counter
- uint32_t y = seed; // Temporary
- uint32_t statesize = SFMT_N*4; // Size of state vector
-
- // Fill state vector with random numbers from seed
- uint32_t* s = (uint32_t*)&state;
- s[0] = y;
- const uint32_t factor = 1812433253U;// Multiplication factor
-
- for (i = 1; i < statesize; i++) {
- y = factor * (y ^ (y >> 30)) + i;
- ((uint32_t*)state)[i] = y;
- }
-
- // Further initialization and period certification
- Init2();
- }
-
- int32_t IRandom(int32_t min, int32_t max) // Output random integer
- {
- // Output random integer in the interval min <= x <= max
- // Slightly inaccurate if (max-min+1) is not a power of 2
- if (max <= min) {
- if (max == min) return min; else return 0x80000000;
- }
- // Assume 64 bit integers supported. Use multiply and shift method
- uint32_t interval; // Length of interval
- uint64_t longran; // Random bits * interval
- uint32_t iran; // Longran / 2^32
-
- interval = (uint32_t)(max - min + 1);
- longran = (uint64_t)BRandom() * interval;
- iran = (uint32_t)(longran >> 32);
- // Convert back to signed and return result
- return (int32_t)iran + min;
- }
-
- uint32_t URandom(uint32_t min, uint32_t max)
- {
- // Output random integer in the interval min <= x <= max
- // Slightly inaccurate if (max-min+1) is not a power of 2
- if (max <= min) {
- if (max == min) return min; else return 0;
- }
- // Assume 64 bit integers supported. Use multiply and shift method
- uint32_t interval; // Length of interval
- uint64_t longran; // Random bits * interval
- uint32_t iran; // Longran / 2^32
-
- interval = (uint32_t)(max - min + 1);
- longran = (uint64_t)BRandom() * interval;
- iran = (uint32_t)(longran >> 32);
- // Convert back to signed and return result
- return iran + min;
- }
-
- double Random() // Output random floating point number
- {
- // Output random floating point number
- if (ix >= SFMT_N*4-1) {
- // Make sure we have at least two 32-bit numbers
- Generate();
- }
- uint64_t r = *(uint64_t*)((uint32_t*)state+ix);
- ix += 2;
- // 52 bits resolution for compatibility with assembly version:
- return (int64_t)(r >> 12) * (1./(67108864.0*67108864.0));
- }
-
- uint32_t BRandom() // Output random bits
- {
- // Output 32 random bits
- uint32_t y;
-
- if (ix >= SFMT_N*4) {
- Generate();
- }
- y = ((uint32_t*)state)[ix++];
- return y;
- }
-
- void* operator new(size_t size, std::nothrow_t const&)
- {
- return _mm_malloc(size, 16);
- }
-
- void operator delete(void* ptr, std::nothrow_t const&)
- {
- _mm_free(ptr);
- }
-
- void* operator new(size_t size)
- {
- return _mm_malloc(size, 16);
- }
-
- void operator delete(void* ptr)
- {
- _mm_free(ptr);
- }
-
- void* operator new[](size_t size, std::nothrow_t const&)
- {
- return _mm_malloc(size, 16);
- }
-
- void operator delete[](void* ptr, std::nothrow_t const&)
- {
- _mm_free(ptr);
- }
-
- void* operator new[](size_t size)
- {
- return _mm_malloc(size, 16);
- }
+/**
+ * generates a random number on [0,1)-real-interval
+ * @param sfmt SFMT internal state
+ * @return double on [0,1)-real-interval
+ */
+inline static double sfmt_genrand_real2(sfmt_t * sfmt)
+{
+ return sfmt_to_real2(sfmt_genrand_uint32(sfmt));
+}
- void operator delete[](void* ptr)
- {
- _mm_free(ptr);
- }
+/**
+ * converts an unsigned 32-bit integer to a double on (0,1)-real-interval.
+ * @param v 32-bit unsigned integer
+ * @return double on (0,1)-real-interval
+ */
+inline static double sfmt_to_real3(uint32_t v)
+{
+ return (((double)v) + 0.5)*(1.0/4294967296.0);
+ /* divided by 2^32 */
+}
-private:
- void Init2() // Various initializations and period certification
- {
- // Various initializations and period certification
- uint32_t i, j, temp;
-
- // Initialize mask
- static const uint32_t maskinit[4] = {SFMT_MASK};
- mask = _mm_loadu_si128((__m128i*)maskinit);
+/**
+ * generates a random number on (0,1)-real-interval
+ * @param sfmt SFMT internal state
+ * @return double on (0,1)-real-interval
+ */
+inline static double sfmt_genrand_real3(sfmt_t * sfmt)
+{
+ return sfmt_to_real3(sfmt_genrand_uint32(sfmt));
+}
- // Period certification
- // Define period certification vector
- static const uint32_t parityvec[4] = {SFMT_PARITY};
+/**
+ * converts an unsigned 32-bit integer to double on [0,1)
+ * with 53-bit resolution.
+ * @param v 32-bit unsigned integer
+ * @return double on [0,1)-real-interval with 53-bit resolution.
+ */
+inline static double sfmt_to_res53(uint64_t v)
+{
+ return (v >> 11) * (1.0/9007199254740992.0);
+}
- // Check if parityvec & state[0] has odd parity
- temp = 0;
- for (i = 0; i < 4; i++)
- temp ^= parityvec[i] & ((uint32_t*)state)[i];
+/**
+ * generates a random number on [0,1) with 53-bit resolution
+ * @param sfmt SFMT internal state
+ * @return double on [0,1) with 53-bit resolution
+ */
+inline static double sfmt_genrand_res53(sfmt_t * sfmt)
+{
+ return sfmt_to_res53(sfmt_genrand_uint64(sfmt));
+}
- for (i = 16; i > 0; i >>= 1) temp ^= temp >> i;
- if (!(temp & 1)) {
- // parity is even. Certification failed
- // Find a nonzero bit in period certification vector
- for (i = 0; i < 4; i++) {
- if (parityvec[i]) {
- for (j = 1; j; j <<= 1) {
- if (parityvec[i] & j) {
- // Flip the corresponding bit in state[0] to change parity
- ((uint32_t*)state)[i] ^= j;
- // Done. Exit i and j loops
- i = 5; break;
- }
- }
- }
- }
- }
- // Generate first random numbers and set ix = 0
- Generate();
- }
+/* =================================================
+ The following function are added by Saito.
+ ================================================= */
+/**
+ * generates a random number on [0,1) with 53-bit resolution from two
+ * 32 bit integers
+ */
+inline static double sfmt_to_res53_mix(uint32_t x, uint32_t y)
+{
+ return sfmt_to_res53(x | ((uint64_t)y << 32));
+}
- void Generate() // Fill state array with new random numbers
- {
- // Fill state array with new random numbers
- int i;
- __m128i r, r1, r2;
+/**
+ * generates a random number on [0,1) with 53-bit resolution
+ * using two 32bit integers.
+ * @param sfmt SFMT internal state
+ * @return double on [0,1) with 53-bit resolution
+ */
+inline static double sfmt_genrand_res53_mix(sfmt_t * sfmt)
+{
+ uint32_t x, y;
- r1 = state[SFMT_N - 2];
- r2 = state[SFMT_N - 1];
- for (i = 0; i < SFMT_N - SFMT_M; i++) {
- r = sfmt_recursion(state[i], state[i + SFMT_M], r1, r2, mask);
- state[i] = r;
- r1 = r2;
- r2 = r;
- }
- for (; i < SFMT_N; i++) {
- r = sfmt_recursion(state[i], state[i + SFMT_M - SFMT_N], r1, r2, mask);
- state[i] = r;
- r1 = r2;
- r2 = r;
- }
- ix = 0;
- }
+ x = sfmt_genrand_uint32(sfmt);
+ y = sfmt_genrand_uint32(sfmt);
+ return sfmt_to_res53_mix(x, y);
+}
- __m128i mask; // AND mask
- __m128i state[SFMT_N]; // State vector for SFMT generator
- uint32_t ix; // Index into state array
- uint32_t LastInterval; // Last interval length for IRandom
- uint32_t RLimit; // Rejection limit used by IRandom
-};
+#if defined(__cplusplus)
+}
+#endif
-#endif // SFMT_H
+#endif
diff --git a/dep/SFMT/randomc.h b/dep/SFMT/randomc.h
deleted file mode 100644
index eed2c81a205..00000000000
--- a/dep/SFMT/randomc.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright notice
- * ================
- * GNU General Public License http://www.gnu.org/licenses/gpl.html
- * This C++ implementation of SFMT contains parts of the original C code
- * which was published under the following BSD license, which is therefore
- * in effect in addition to the GNU General Public License.
- * Copyright (c) 2006, 2007 by Mutsuo Saito, Makoto Matsumoto and Hiroshima University.
- * Copyright (c) 2008 by Agner Fog.
- * Copyright (c) 2008-2013 Trinity Core
- *
- * BSD License:
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * > Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * > Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * > Neither the name of the Hiroshima University nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RANDOMC_H
-#define RANDOMC_H
-
-// Define integer types with known size: int32_t, uint32_t, int64_t, uint64_t.
-// If this doesn't work then insert compiler-specific definitions here:
-#if defined(__GNUC__)
- // Compilers supporting C99 or C++0x have inttypes.h defining these integer types
- #include
- #define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers
-#elif defined(_WIN16) || defined(__MSDOS__) || defined(_MSDOS)
- // 16 bit systems use long int for 32 bit integer
- typedef signed long int int32_t;
- typedef unsigned long int uint32_t;
-#elif defined(_MSC_VER)
- // Microsoft have their own definition
- typedef signed __int32 int32_t;
- typedef unsigned __int32 uint32_t;
- typedef signed __int64 int64_t;
- typedef unsigned __int64 uint64_t;
- #define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers
-#else
- // This works with most compilers
- typedef signed int int32_t;
- typedef unsigned int uint32_t;
- typedef long long int64_t;
- typedef unsigned long long uint64_t;
- #define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers
-#endif
-
-#endif // RANDOMC_H
diff --git a/dep/boost/CMakeLists.txt b/dep/boost/CMakeLists.txt
index 60cd0ff8fad..5b843feb93e 100644
--- a/dep/boost/CMakeLists.txt
+++ b/dep/boost/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) 2008-2018 TrinityCore
+# This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -8,27 +8,24 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+set(BOOST_SEARCH_HINTS)
if(WIN32)
- set(BOOST_DEBUG ON)
if(DEFINED ENV{BOOST_ROOT})
set(BOOST_ROOT $ENV{BOOST_ROOT})
- if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
- set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib${PLATFORM}-msvc-12.0)
- elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
- set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib${PLATFORM}-msvc-14.0)
- else()
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
- list(APPEND BOOST_LIBRARYDIR
- ${BOOST_ROOT}/lib${PLATFORM}-msvc-14.1
- ${BOOST_ROOT}/lib${PLATFORM}-msvc-14.0 )
- else()
- list(APPEND BOOST_LIBRARYDIR
- ${BOOST_ROOT}/lib${PLATFORM}-msvc-14.2
- ${BOOST_ROOT}/lib${PLATFORM}-msvc-14.1 )
- endif()
- endif()
- else()
- message(FATAL_ERROR "No BOOST_ROOT environment variable could be found! Please make sure it is set and the points to your Boost installation.")
+ endif()
+ if(DEFINED BOOST_ROOT AND MSVC)
+ # insert a dot (.) character before last digit of MSVC_TOOLSET_VERSION
+ # turn 143 into 14.3
+ string(LENGTH "${MSVC_TOOLSET_VERSION}" _BOOST_MSVC_TOOLSET_VERSION_LENGTH)
+ math(EXPR _BOOST_MSVC_TOOLSET_VERSION_LENGTH "${_BOOST_MSVC_TOOLSET_VERSION_LENGTH} - 1" OUTPUT_FORMAT DECIMAL)
+ string(SUBSTRING "${MSVC_TOOLSET_VERSION}" 0 ${_BOOST_MSVC_TOOLSET_VERSION_LENGTH} _BOOST_MSVC_TOOLSET_VERSION_MAJOR)
+ string(SUBSTRING "${MSVC_TOOLSET_VERSION}" ${_BOOST_MSVC_TOOLSET_VERSION_LENGTH} -1 _BOOST_MSVC_TOOLSET_VERSION_MINOR)
+
+ set(BOOST_SEARCH_HINTS "${BOOST_ROOT}/lib${PLATFORM}-msvc-${_BOOST_MSVC_TOOLSET_VERSION_MAJOR}.${_BOOST_MSVC_TOOLSET_VERSION_MINOR}/cmake")
+
+ unset(_BOOST_MSVC_TOOLSET_VERSION_LENGTH)
+ unset(_BOOST_MSVC_TOOLSET_VERSION_MAJOR)
+ unset(_BOOST_MSVC_TOOLSET_VERSION_MINOR)
endif()
set(Boost_USE_STATIC_LIBS ON)
@@ -36,32 +33,47 @@ if(WIN32)
set(Boost_USE_STATIC_RUNTIME OFF)
endif()
-include (CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
- #include
- int main() { std::wregex r(L\".*\"); }"
- STD_HAS_WORKING_WREGEX)
-
-if (STD_HAS_WORKING_WREGEX)
- find_package(Boost 1.58 REQUIRED system filesystem thread program_options iostreams)
+if (WIN32)
+ # On windows the requirements are higher according to the wiki.
+ set(BOOST_REQUIRED_VERSION 1.78)
else()
- find_package(Boost 1.58 REQUIRED system filesystem thread program_options iostreams regex)
+ set(BOOST_REQUIRED_VERSION 1.74)
endif()
+find_package(Boost ${BOOST_REQUIRED_VERSION}
+ REQUIRED
+ COMPONENTS
+ system
+ filesystem
+ thread
+ program_options
+ iostreams
+ regex
+ locale
+ CONFIG
+ HINTS
+ ${BOOST_SEARCH_HINTS})
+
# Find if Boost was compiled in C++03 mode because it requires -DBOOST_NO_CXX11_SCOPED_ENUMS
+include (CheckCXXSourceCompiles)
+
set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_IOSTREAMS_LIBRARY})
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
+unset(boost_filesystem_copy_links_without_NO_SCOPED_ENUM CACHE)
check_cxx_source_compiles("
#include
#include
int main() { boost::filesystem::copy_file(boost::filesystem::path(), boost::filesystem::path()); }"
boost_filesystem_copy_links_without_NO_SCOPED_ENUM)
-unset(CMAKE_REQUIRED_INCLUDES)
-unset(CMAKE_REQUIRED_LIBRARIES)
-unset(CMAKE_REQUIRED_FLAGS)
+unset(CMAKE_REQUIRED_INCLUDES CACHE)
+unset(CMAKE_REQUIRED_LIBRARIES CACHE)
+unset(CMAKE_REQUIRED_FLAGS CACHE)
+
+if (NOT boost_filesystem_copy_links_without_NO_SCOPED_ENUM)
+ set(OPTIONAL_BOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS)
+endif()
add_library(boost INTERFACE)
@@ -78,17 +90,4 @@ target_compile_definitions(boost
-DBOOST_DATE_TIME_NO_LIB
-DBOOST_REGEX_NO_LIB
-DBOOST_CHRONO_NO_LIB
- -DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE
- -DBOOST_ASIO_NO_DEPRECATED)
-
-if (NOT boost_filesystem_copy_links_without_NO_SCOPED_ENUM)
- target_compile_definitions(boost
- INTERFACE
- -DBOOST_NO_CXX11_SCOPED_ENUMS)
-endif()
-
-if (NOT STD_HAS_WORKING_WREGEX)
- target_compile_definitions(boost
- INTERFACE
- -DTC_HAS_BROKEN_WSTRING_REGEX)
-endif()
+ ${OPTIONAL_BOOST_NO_SCOPED_ENUMS})
diff --git a/dep/cpr/.clang-format b/dep/cpr/.clang-format
deleted file mode 100644
index 2dda09e912d..00000000000
--- a/dep/cpr/.clang-format
+++ /dev/null
@@ -1,59 +0,0 @@
----
-Language: Cpp
-# BasedOnStyle: Google
-AccessModifierOffset: -2
-AlignAfterOpenBracket: true
-AlignEscapedNewlinesLeft: true
-AlignOperands: true
-AlignTrailingComments: true
-AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
-AllowShortIfStatementsOnASingleLine: false
-AllowShortLoopsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: Empty
-AlwaysBreakAfterDefinitionReturnType: false
-AlwaysBreakTemplateDeclarations: true
-AlwaysBreakBeforeMultilineStrings: true
-BreakBeforeBinaryOperators: None
-BreakBeforeTernaryOperators: true
-BreakConstructorInitializersBeforeComma: false
-BinPackParameters: true
-BinPackArguments: true
-ColumnLimit: 100
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
-ConstructorInitializerIndentWidth: 8
-DerivePointerAlignment: false
-ExperimentalAutoDetectBinPacking: false
-IndentCaseLabels: true
-IndentWrappedFunctionNames: false
-IndentFunctionDeclarationAfterType: false
-MaxEmptyLinesToKeep: 2
-KeepEmptyLinesAtTheStartOfBlocks: false
-NamespaceIndentation: None
-PenaltyBreakBeforeFirstCallParameter: 1
-PenaltyBreakComment: 300
-PenaltyBreakString: 1000
-PenaltyBreakFirstLessLess: 120
-PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 200
-PointerAlignment: Left
-SpacesBeforeTrailingComments: 1
-Cpp11BracedListStyle: true
-Standard: Auto
-IndentWidth: 4
-TabWidth: 8
-UseTab: Never
-BreakBeforeBraces: Attach
-SpacesInParentheses: false
-SpacesInSquareBrackets: false
-SpacesInAngles: false
-SpaceInEmptyParentheses: false
-SpacesInCStyleCastParentheses: false
-SpaceAfterCStyleCast: true
-SpacesInContainerLiterals: true
-SpaceBeforeAssignmentOperators: true
-ContinuationIndentWidth: 8
-CommentPragmas: '^ IWYU pragma:'
-SpaceBeforeParens: ControlStatements
-...
diff --git a/dep/cpr/.gitignore b/dep/cpr/.gitignore
deleted file mode 100644
index bedd5ade4e5..00000000000
--- a/dep/cpr/.gitignore
+++ /dev/null
@@ -1,45 +0,0 @@
-# Compiled Object files
-*.slo
-*.lo
-*.o
-*.obj
-
-# Precompiled Headers
-*.gch
-*.pch
-
-# Compiled Dynamic libraries
-*.so
-*.dylib
-*.dll
-
-# Fortran module files
-*.mod
-
-# Compiled Static libraries
-*.lai
-*.la
-*.a
-*.lib
-
-# Executables
-*.exe
-*.out
-*.app
-
-# CMake
-CMakeCache.txt
-CMakeFiles
-Makefile
-cmake_install.cmake
-install_manifest.txt
-
-# Custom
-build/
-
-# Jekyll stuff
-_includes/
-_site/
-
-# Vim
-.ycm_extra_conf.py*
diff --git a/dep/cpr/.travis.yml b/dep/cpr/.travis.yml
deleted file mode 100644
index 93d471f89ae..00000000000
--- a/dep/cpr/.travis.yml
+++ /dev/null
@@ -1,125 +0,0 @@
-language: cpp
-
-sudo: false
-cache: ccache
-
-compiler: clang
-
-# gcc 4.9 default
-addons: &addons
- apt:
- packages: &packages
- - g++-4.9
- - clang-format-3.8
- - python-pip
- sources: &sources
- - ubuntu-toolchain-r-test
- - llvm-toolchain-precise-3.5
- - llvm-toolchain-precise-3.6
- - llvm-toolchain-precise-3.7
- - llvm-toolchain-precise-3.8
-
-env:
- global:
- - BUILD_CPR_TESTS=ON
- - GTEST_SHUFFLE=1
- - USE_SYSTEM_CURL=ON
- matrix:
- - COMPILER=g++-4.9 CCOMPILER=gcc-4.9 GENERATE_COVERAGE=ON FORMAT_CHECK=ON
-
-matrix:
- include:
- # gcc 4.6
- - env: COMPILER=g++-4.6 CCOMPILER=gcc-4.6
- addons:
- apt:
- packages: g++-4.6
- sources: *sources
-
- # gcc 4.7
- - env: COMPILER=g++-4.7 CCOMPILER=gcc-4.7 EXTRA_CXXFLAGS=-D_GLIBCXX_USE_NANOSLEEP
- addons:
- apt:
- packages: g++-4.7
- sources: *sources
-
- # gcc 4.8
- - env: COMPILER=g++-4.8 CCOMPILER=gcc-4.8
- addons:
- apt:
- packages: g++-4.8
- sources: *sources
-
- # gcc 5
- - env: COMPILER=g++-5 CCOMPILER=gcc-5
- addons:
- apt:
- packages: g++-5
- sources: *sources
-
- # Clang 3.4
- - env: COMPILER=clang++ CCOMPILER=clang LINUX_CLANG=1
- addons:
- apt:
- packages: clang-3.4
- sources: *sources
-
- # Clang 3.5
- - env: COMPILER=clang++-3.5 CCOMPILER=clang-3.5
- addons:
- apt:
- packages: clang-3.5
- sources: *sources
-
- # Clang 3.6
- - env: COMPILER=clang++-3.6 CCOMPILER=clang-3.6
- addons:
- apt:
- packages: clang-3.6
- sources: *sources
-
- # Clang 3.7
- - env: COMPILER=clang++-3.7 CCOMPILER=clang-3.7
- addons:
- apt:
- packages: clang-3.7
- sources: *sources
-
- # Clang 3.8
- - env: COMPILER=clang++-3.8 CCOMPILER=clang-3.8
- addons:
- apt:
- packages: clang-3.8
- sources: *sources
-
- # Xcode 6.4
- - os: osx
- env: COMPILER=clang++ CCOMPILER=clang
- osx_image: xcode6.4
-
- # Xcode 7
- - os: osx
- env: COMPILER=clang++ CCOMPILER=clang
- osx_image: xcode7
- allow_failures:
- - env: COMPILER=g++-4.6 CCOMPILER=gcc-4.6
- - env: COMPILER=clang++ CCOMPILER=clang LINUX_CLANG=1
-
-install:
- - if [ "$GENERATE_COVERAGE" == "ON" ]; then pip install --user git+git://github.com/eddyxu/cpp-coveralls.git; fi
-
-before_script:
- - export CXX=$COMPILER CC=$CCOMPILER
- - export CXXFLAGS=$EXTRA_CXXFLAGS
- - cmake --version
- - mkdir build
- - cd build
- - cmake -LAH ..
-
-script:
- - make -j2 VERBOSE=1
- - ctest -V
- - if [ "$FORMAT_CHECK" == "ON" ]; then cd ${TRAVIS_BUILD_DIR} && ./format-check.sh; fi
-
-after_success:
- - if [ "$GENERATE_COVERAGE" == "ON" ]; then cd ${TRAVIS_BUILD_DIR}/build && coveralls -i 'cpr' -i 'include' -e '../include/cpr.h' --root '../' --verbose --gcov-options '\-lp' --gcov 'gcov-4.9'; fi
diff --git a/dep/cpr/AUTHORS b/dep/cpr/AUTHORS
deleted file mode 100644
index 32eac49266d..00000000000
--- a/dep/cpr/AUTHORS
+++ /dev/null
@@ -1,32 +0,0 @@
-Adam Nielsen
-Andreas Gerstmayr
-Anton Lindström
-bandzaw
-Bob Jansen
-Chase Geigle
-Danilo Spinella
-David E
-Don Goodman-Wilson
-Eren Okka
-Felix Vanorder
-Florian Dang
-fuchs
-Guo Xiao
-Himanshu Shekhar
-Huu Nguyen
-Ivan Smirnov
-Josh Leeb-du Toit
-Klaus Silveira
-Mexus
-nabijaczleweli
-noh4h_ss
-Omer Katz
-pravic
-Sam Bristow
-Sean Chittenden
-Shuyu Liang
-Simon Ninon
-Smiley Barry
-Vittorio Romeo
-Vladimir Gamalian
-xpol
diff --git a/dep/cpr/CMakeLists.txt b/dep/cpr/CMakeLists.txt
deleted file mode 100644
index ddb107d5e1c..00000000000
--- a/dep/cpr/CMakeLists.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-cmake_minimum_required(VERSION 2.8.7)
-
-if(POLICY CMP0048)
- # cmake warns if loaded from a min-3.0-required parent dir, so silence the warning:
- cmake_policy(SET CMP0048 NEW)
-endif()
-
-# Allow use of project folders for IDEs like Visual Studio, so we
-# could organize projects into relevant folders: "cpr", "tests" & "external (libraries)".
-# set_property(GLOBAL PROPERTY USE_FOLDERS ON)
-# set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake")
-
-project(cpr CXX)
-
-if(NOT ${CMAKE_VERSION} LESS 3.2)
- set(CMAKE_CXX_STANDARD 11)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
-else()
- message(STATUS "Checking compiler flags for C++11 support.")
- # Set C++11 support flags for various compilers
- include(CheckCXXCompilerFlag)
- check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
- check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- if(COMPILER_SUPPORTS_CXX11)
- message(STATUS "C++11 is supported.")
- if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
- else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- endif()
- elseif(COMPILER_SUPPORTS_CXX0X)
- message(STATUS "C++0x is supported.")
- if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++")
- else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- endif()
- else()
- message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
- endif()
-endif()
-
-set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
-set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
-
-set(CPR_LIBRARIES cpr CACHE INTERNAL "")
-set(CPR_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "")
-
-macro(cpr_option OPTION_NAME OPTION_TEXT OPTION_DEFAULT)
- option(${OPTION_NAME} ${OPTION_TEXT} ${OPTION_DEFAULT})
- if(DEFINED ENV{${OPTION_NAME}})
- # Allow setting the option through an environment variable
- set(${OPTION_NAME} $ENV{${OPTION_NAME}})
- endif()
- if(${OPTION_NAME})
- add_definitions(-D${OPTION_NAME})
- endif()
- message(STATUS " ${OPTION_NAME}: ${${OPTION_NAME}}")
-endmacro()
-
-message(STATUS "C++ Requests CMake Options")
-message(STATUS "=======================================================")
-cpr_option(USE_SYSTEM_CURL
- "If ON, this project will look in the system paths for an installed curl library" OFF)
-set(GENERATE_COVERAGE OFF)
-cpr_option(CPR_CURL_NOSIGNAL "Set to ON to disable use of signals in libcurl." OFF)
-cpr_option(USE_SYSTEM_GTEST
- "If ON, this project will look in the system paths for an installed gtest library" OFF)
-cpr_option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" OFF)
-message(STATUS "=======================================================")
-
-add_subdirectory(opt)
-add_subdirectory(cpr)
diff --git a/dep/cpr/CONTRIBUTING.md b/dep/cpr/CONTRIBUTING.md
deleted file mode 100644
index abfb97c346e..00000000000
--- a/dep/cpr/CONTRIBUTING.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Contributing to C++ Requests
-
-Please fork this repository and contribute back using [pull requests](https://github.com/whoshuu/cpr/pulls). Features can be requested using [issues](https://github.com/whoshuu/cpr/issues). All code, comments, and critiques are greatly appreciated.
-
-## Formatting
-
-To avoid unproductive debates on formatting, this project uses `clang-format` to ensure a consistent style across all source files. Currently, `clang-format` 3.8 is the version of `clang-format` we use. The format file can be found [here](https://github.com/whoshuu/cpr/blob/master/.clang-format). To install `clang-format` on Ubuntu, run this:
-
-```
-apt-get install clang-format-3.8
-```
-
-To install `clang-format` on OS X, run this:
-
-```
-brew install clang-format
-```
-
-Note that `brew` might install a later version of `clang-format`, but it should be mostly compatible with what's run on the Travis servers.
-
-To run `clang-format` on every source file, run this in the root directory:
-
-```
-./format-check.sh
-```
-
-This should indicate which files need formatting and also show a diff of the requested changes. More specific usage instructions can be found on the official [LLVM website](http://releases.llvm.org/3.8.0/tools/clang/docs/ClangFormat.html).
diff --git a/dep/cpr/LICENSE b/dep/cpr/LICENSE
deleted file mode 100644
index d173854dcf9..00000000000
--- a/dep/cpr/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2017 Huu Nguyen
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/dep/cpr/README.md b/dep/cpr/README.md
deleted file mode 100644
index 65ed0214df4..00000000000
--- a/dep/cpr/README.md
+++ /dev/null
@@ -1,96 +0,0 @@
-# C++ Requests: Curl for People
-
-[](https://travis-ci.org/whoshuu/cpr) [](https://ci.appveyor.com/project/whoshuu/cpr/branch/master) [](https://coveralls.io/github/whoshuu/cpr) [](https://whoshuu.github.io/cpr/)
-
-C++ Requests is a simple wrapper around [libcurl](http://curl.haxx.se/libcurl) inspired by the excellent [Python Requests](https://github.com/kennethreitz/requests) project.
-
-Despite its name, libcurl's easy interface is anything but, and making mistakes misusing it is a common source of error and frustration. Using the more expressive language facilities of C++11, this library captures the essence of making network calls into a few concise idioms.
-
-Here's a quick GET request:
-
-```c++
-#include
-
-int main(int argc, char** argv) {
- auto r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
- cpr::Authentication{"user", "pass"},
- cpr::Parameters{{"anon", "true"}, {"key", "value"}});
- r.status_code; // 200
- r.header["content-type"]; // application/json; charset=utf-8
- r.text; // JSON text string
-}
-```
-
-And here's [less functional, more complicated code, without cpr](https://gist.github.com/whoshuu/2dc858b8730079602044).
-
-## Documentation
-
-You can find the latest documentation [here](https://whoshuu.github.io/cpr). It's a work in progress, but it should give you a better idea of how to use the library than the [tests](https://github.com/whoshuu/cpr/tree/master/test) currently do.
-
-## Features
-
-C++ Requests currently supports:
-
-* Custom headers
-* Url encoded parameters
-* Url encoded POST values
-* Multipart form POST upload
-* File POST upload
-* Basic authentication
-* Digest authentication
-* Timeout specification
-* Timeout for low speed connection
-* Asynchronous requests
-* :cookie: support!
-* Proxy support
-* Callback interface
-* PUT methods
-* DELETE methods
-* HEAD methods
-* OPTIONS methods
-* PATCH methods
-
-## Planned
-
-Support for the following will be forthcoming (in rough order of implementation priority):
-
-* [Streamed requests](https://github.com/whoshuu/cpr/issues/25)
-* [OpenSSL support](https://github.com/whoshuu/cpr/issues/31)
-
-and much more!
-
-## Usage
-
-For just getting this library up and running, I highly recommend forking the [example project](https://github.com/whoshuu/cpr-example). It's configured with the minimum CMake magic and boilerplate needed to start playing around with networked applications.
-
-If you already have a project you need to integrate C++ Requests with, the primary way is to use git submodules. Add this repository as a submodule of your root repository:
-
-```shell
-git submodule add git@github.com:whoshuu/cpr.git
-OR
-git submodule add https://github.com/whoshuu/cpr.git
-
-git submodule update --init --recursive
-```
-
-Next, add this subdirectory to your CMakeLists.txt before declaring any targets that might use it:
-
-```cmake
-add_subdirectory(cpr)
-```
-
-This will produce two important CMake variables, `CPR_INCLUDE_DIRS` and `CPR_LIBRARIES`, which you'll use in the typical way:
-
-```cmake
-include_directories(${CPR_INCLUDE_DIRS})
-target_link_libraries(your_target_name ${CPR_LIBRARIES})
-```
-
-and that should do it! Using the submodule method of integrating C++ Requests, there's no need to handle libcurl yourself, all of those dependencies are taken care of for you.
-
-## Requirements
-
-The only explicit requirements are:
-
-* a C++11 compatible compiler such as Clang or GCC. The minimum required version of GCC is unknown, so if anyone has trouble building this library with a specific version of GCC, do let me know
-* curl and its development libraries
diff --git a/dep/cpr/VERSION b/dep/cpr/VERSION
deleted file mode 100644
index f0bb29e7638..00000000000
--- a/dep/cpr/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.3.0
diff --git a/dep/cpr/appveyor.yml b/dep/cpr/appveyor.yml
deleted file mode 100644
index 2f88cebe805..00000000000
--- a/dep/cpr/appveyor.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-version: '1.1.{build}'
-configuration:
- - RELEASE
- - DEBUG
-os: Visual Studio 2015
-before_build:
- - git submodule update --init --recursive
- - set CMAKE_USE_OPENSSL=OFF
- - mkdir build
- - cd build
- - cmake -DCMAKE_BUILD_TYPE=%Configuration% .. -G "Visual Studio 14 2015"
-build:
- project: C:\projects\cpr\build\cpr.sln
-test_script:
- - cd C:\projects\cpr\build
- - ctest -VV -C %Configuration%
diff --git a/dep/cpr/cpr-config.cmake b/dep/cpr/cpr-config.cmake
deleted file mode 100644
index 58ab48320bb..00000000000
--- a/dep/cpr/cpr-config.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-# - C++ Requests, Curl for People
-# This module is a libcurl wrapper written in modern C++.
-# It provides an easy, intuitive, and efficient interface to
-# a host of networking methods.
-#
-# Finding this module will define the following variables:
-# CPR_FOUND - True if the core library has been found
-# CPR_LIBRARIES - Path to the core library archive
-# CPR_INCLUDE_DIRS - Path to the include directories. Gives access
-# to cpr.h, which must be included in every
-# file that uses this interface
-
-find_path(CPR_INCLUDE_DIR
- NAMES cpr.h)
-
-find_library(CPR_LIBRARY
- NAMES cpr
- HINTS ${CPR_LIBRARY_ROOT})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CPR REQUIRED_VARS CPR_LIBRARY CPR_INCLUDE_DIR)
-
-if(CPR_FOUND)
- set(CPR_LIBRARIES ${CPR_LIBRARY})
- set(CPR_INCLUDE_DIRS ${CPR_INCLUDE_DIR})
-endif()
diff --git a/dep/cpr/cpr/CMakeLists.txt b/dep/cpr/cpr/CMakeLists.txt
deleted file mode 100644
index 9e15255e46a..00000000000
--- a/dep/cpr/cpr/CMakeLists.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-message(STATUS "Using CURL_INCLUDE_DIRS: ${CURL_INCLUDE_DIRS}.")
-
-add_library(${CPR_LIBRARIES} STATIC
-
- # Source files
- auth.cpp
- cookies.cpp
- cprtypes.cpp
- digest.cpp
- error.cpp
- multipart.cpp
- parameters.cpp
- payload.cpp
- proxies.cpp
- session.cpp
- timeout.cpp
- util.cpp
- ssl_options.cpp
-
- # Header files (useful in IDEs)
- "${CPR_INCLUDE_DIRS}/cpr/api.h"
- "${CPR_INCLUDE_DIRS}/cpr/auth.h"
- "${CPR_INCLUDE_DIRS}/cpr/body.h"
- "${CPR_INCLUDE_DIRS}/cpr/cookies.h"
- "${CPR_INCLUDE_DIRS}/cpr/cpr.h"
- "${CPR_INCLUDE_DIRS}/cpr/cprtypes.h"
- "${CPR_INCLUDE_DIRS}/cpr/curlholder.h"
- "${CPR_INCLUDE_DIRS}/cpr/defines.h"
- "${CPR_INCLUDE_DIRS}/cpr/digest.h"
- "${CPR_INCLUDE_DIRS}/cpr/error.h"
- "${CPR_INCLUDE_DIRS}/cpr/max_redirects.h"
- "${CPR_INCLUDE_DIRS}/cpr/multipart.h"
- "${CPR_INCLUDE_DIRS}/cpr/parameters.h"
- "${CPR_INCLUDE_DIRS}/cpr/payload.h"
- "${CPR_INCLUDE_DIRS}/cpr/proxies.h"
- "${CPR_INCLUDE_DIRS}/cpr/response.h"
- "${CPR_INCLUDE_DIRS}/cpr/session.h"
- "${CPR_INCLUDE_DIRS}/cpr/timeout.h"
- "${CPR_INCLUDE_DIRS}/cpr/util.h"
- "${CPR_INCLUDE_DIRS}/cpr/ssl_options.h")
-
-message(STATUS "Using CURL_LIBRARIES: ${CURL_LIBRARIES}.")
-set_property(TARGET ${CPR_LIBRARIES} PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_link_libraries(${CPR_LIBRARIES}
- ${CURL_LIBRARIES})
-
-if(NOT (CMAKE_VERSION VERSION_LESS 3.0))
- target_include_directories(${CPR_LIBRARIES}
- PUBLIC
- ${CPR_INCLUDE_DIRS}
- ${CURL_INCLUDE_DIRS})
-else()
- include_directories(
- ${CPR_INCLUDE_DIRS}
- ${CURL_INCLUDE_DIRS})
-endif()
diff --git a/dep/cpr/cpr/auth.cpp b/dep/cpr/cpr/auth.cpp
deleted file mode 100644
index ff7c3a9c5b2..00000000000
--- a/dep/cpr/cpr/auth.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "cpr/auth.h"
-
-namespace cpr {
-
-const char* Authentication::GetAuthString() const noexcept {
- return auth_string_.data();
-}
-
-} // namespace cpr
diff --git a/dep/cpr/cpr/cookies.cpp b/dep/cpr/cpr/cookies.cpp
deleted file mode 100644
index 21decd39f4d..00000000000
--- a/dep/cpr/cpr/cookies.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "cpr/cookies.h"
-
-#include "cpr/util.h"
-
-namespace cpr {
-
-Cookies::Cookies(const std::initializer_list>& pairs)
- : map_{pairs} {}
-
-std::string Cookies::GetEncoded() const {
- std::stringstream stream;
- for (const auto& item : map_) {
- stream << cpr::util::urlEncode(item.first) << "=";
- // special case version 1 cookies, which can be distinguished by
- // beginning and trailing quotes
- if (!item.second.empty() && item.second.front() == '"' && item.second.back() == '"') {
- stream << item.second;
- } else {
- stream << cpr::util::urlEncode(item.second);
- }
- stream << "; ";
- }
- return stream.str();
-}
-
-std::string& Cookies::operator[](const std::string& key) {
- return map_[key];
-}
-
-} // namespace cpr
diff --git a/dep/cpr/cpr/cprtypes.cpp b/dep/cpr/cpr/cprtypes.cpp
deleted file mode 100644
index 4daf6de754e..00000000000
--- a/dep/cpr/cpr/cprtypes.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "cpr/cprtypes.h"
-
-#include
-#include
-
-namespace cpr {
-
-bool CaseInsensitiveCompare::operator()(const std::string& a, const std::string& b) const noexcept {
- return std::lexicographical_compare(
- a.begin(), a.end(), b.begin(), b.end(),
- [](unsigned char ac, unsigned char bc) { return std::tolower(ac) < std::tolower(bc); });
-}
-
-} // namespace cpr
diff --git a/dep/cpr/cpr/digest.cpp b/dep/cpr/cpr/digest.cpp
deleted file mode 100644
index 252c5d20997..00000000000
--- a/dep/cpr/cpr/digest.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "cpr/digest.h"
-
-namespace cpr {
-
-const char* Digest::GetAuthString() const noexcept {
- return Authentication::GetAuthString();
-}
-
-} // namespace cpr
diff --git a/dep/cpr/cpr/error.cpp b/dep/cpr/cpr/error.cpp
deleted file mode 100644
index 713cb10c113..00000000000
--- a/dep/cpr/cpr/error.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-#include "cpr/error.h"
-
-#include
-
-namespace cpr {
-
-ErrorCode Error::getErrorCodeForCurlError(std::int32_t curl_code) {
- switch (curl_code) {
- case CURLE_OK:
- return ErrorCode::OK;
- case CURLE_UNSUPPORTED_PROTOCOL:
- return ErrorCode::UNSUPPORTED_PROTOCOL;
- case CURLE_URL_MALFORMAT:
- return ErrorCode::INVALID_URL_FORMAT;
- case CURLE_COULDNT_RESOLVE_PROXY:
- return ErrorCode::PROXY_RESOLUTION_FAILURE;
- case CURLE_COULDNT_RESOLVE_HOST:
- return ErrorCode::HOST_RESOLUTION_FAILURE;
- case CURLE_COULDNT_CONNECT:
- return ErrorCode::CONNECTION_FAILURE;
- case CURLE_OPERATION_TIMEDOUT:
- return ErrorCode::OPERATION_TIMEDOUT;
- case CURLE_SSL_CONNECT_ERROR:
- return ErrorCode::SSL_CONNECT_ERROR;
- case CURLE_PEER_FAILED_VERIFICATION:
- return ErrorCode::SSL_REMOTE_CERTIFICATE_ERROR;
- case CURLE_GOT_NOTHING:
- return ErrorCode::EMPTY_RESPONSE;
- case CURLE_SSL_ENGINE_NOTFOUND:
- return ErrorCode::GENERIC_SSL_ERROR;
- case CURLE_SSL_ENGINE_SETFAILED:
- return ErrorCode::GENERIC_SSL_ERROR;
- case CURLE_SEND_ERROR:
- return ErrorCode::NETWORK_SEND_FAILURE;
- case CURLE_RECV_ERROR:
- return ErrorCode::NETWORK_RECEIVE_ERROR;
- case CURLE_SSL_CERTPROBLEM:
- return ErrorCode::SSL_LOCAL_CERTIFICATE_ERROR;
- case CURLE_SSL_CIPHER:
- return ErrorCode::GENERIC_SSL_ERROR;
- case CURLE_SSL_CACERT:
- return ErrorCode::SSL_CACERT_ERROR;
- case CURLE_USE_SSL_FAILED:
- return ErrorCode::GENERIC_SSL_ERROR;
- case CURLE_SSL_ENGINE_INITFAILED:
- return ErrorCode::GENERIC_SSL_ERROR;
- case CURLE_SSL_CACERT_BADFILE:
- return ErrorCode::SSL_CACERT_ERROR;
- case CURLE_SSL_SHUTDOWN_FAILED:
- return ErrorCode::GENERIC_SSL_ERROR;
- case CURLE_SSL_CRL_BADFILE:
- return ErrorCode::SSL_CACERT_ERROR;
- case CURLE_SSL_ISSUER_ERROR:
- return ErrorCode::SSL_CACERT_ERROR;
- case CURLE_TOO_MANY_REDIRECTS:
- return ErrorCode::OK;
- default:
- return ErrorCode::INTERNAL_ERROR;
- }
-}
-
-} // namespace cpr
diff --git a/dep/cpr/cpr/multipart.cpp b/dep/cpr/cpr/multipart.cpp
deleted file mode 100644
index c2e030add22..00000000000
--- a/dep/cpr/cpr/multipart.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "cpr/multipart.h"
-
-namespace cpr {
-
-Multipart::Multipart(const std::initializer_list& parts) : parts{parts} {}
-
-} // namespace cpr
diff --git a/dep/cpr/cpr/parameters.cpp b/dep/cpr/cpr/parameters.cpp
deleted file mode 100644
index 1adb5100810..00000000000
--- a/dep/cpr/cpr/parameters.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "cpr/parameters.h"
-
-#include
-#include
-
-#include "cpr/util.h"
-
-namespace cpr {
-
-Parameters::Parameters(const std::initializer_list& parameters) {
- for (const auto& parameter : parameters) {
- AddParameter(parameter);
- }
-}
-
-void Parameters::AddParameter(const Parameter& parameter) {
- if (!content.empty()) {
- content += "&";
- }
-
- auto escapedKey = cpr::util::urlEncode(parameter.key);
- if (parameter.value.empty()) {
- content += escapedKey;
- } else {
- auto escapedValue = cpr::util::urlEncode(parameter.value);
- content += escapedKey + "=" + escapedValue;
- }
-}
-
-} // namespace cpr
diff --git a/dep/cpr/cpr/payload.cpp b/dep/cpr/cpr/payload.cpp
deleted file mode 100644
index de7e8cc4e75..00000000000
--- a/dep/cpr/cpr/payload.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "cpr/payload.h"
-
-#include
-#include
-
-#include "cpr/util.h"
-
-namespace cpr {
-
-Payload::Payload(const std::initializer_list& pairs) : Payload(begin(pairs), end(pairs)) {}
-
-void Payload::AddPair(const Pair& pair) {
- if (!content.empty()) {
- content += "&";
- }
- auto escaped = cpr::util::urlEncode(pair.value);
- content += pair.key + "=" + escaped;
-}
-
-} // namespace cpr
diff --git a/dep/cpr/cpr/proxies.cpp b/dep/cpr/cpr/proxies.cpp
deleted file mode 100644
index 446f7d7659a..00000000000
--- a/dep/cpr/cpr/proxies.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "cpr/proxies.h"
-
-#include
-#include