Build: MSVC 2017 compat (w/o xs code - Perl unit tests)
This commit is contained in:
parent
ed71f2ccd7
commit
a99c823401
3 changed files with 25 additions and 5 deletions
23
deps/deps-windows.cmake
vendored
23
deps/deps-windows.cmake
vendored
|
@ -1,8 +1,21 @@
|
|||
|
||||
if (MSVC_VERSION EQUAL 1800)
|
||||
set(DEP_VS_VER "12")
|
||||
set(DEP_BOOST_TOOLSET "msvc-12.0")
|
||||
elseif (MSVC_VERSION EQUAL 1900)
|
||||
set(DEP_VS_VER "14")
|
||||
set(DEP_BOOST_TOOLSET "msvc-14.0")
|
||||
elseif (MSVC_VERSION GREATER 1900)
|
||||
set(DEP_VS_VER "15")
|
||||
set(DEP_BOOST_TOOLSET "msvc-14.1")
|
||||
else ()
|
||||
message(FATAL_ERROR "Unsupported MSVC version")
|
||||
endif ()
|
||||
|
||||
if (${DEPS_BITS} EQUAL 32)
|
||||
set(DEP_MSVC_GEN "Visual Studio 12")
|
||||
set(DEP_MSVC_GEN "Visual Studio ${DEP_VS_VER}")
|
||||
else ()
|
||||
set(DEP_MSVC_GEN "Visual Studio 12 Win64")
|
||||
set(DEP_MSVC_GEN "Visual Studio ${DEP_VS_VER} Win64")
|
||||
endif ()
|
||||
|
||||
|
||||
|
@ -29,7 +42,7 @@ ExternalProject_Add(dep_boost
|
|||
--with-regex
|
||||
"--prefix=${DESTDIR}/usr/local"
|
||||
"address-model=${DEPS_BITS}"
|
||||
toolset=msvc-12.0
|
||||
"toolset=${DEP_BOOST_TOOLSET}"
|
||||
link=static
|
||||
variant=release
|
||||
threading=multi
|
||||
|
@ -204,7 +217,7 @@ ExternalProject_Add(dep_libcurl
|
|||
URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND cd winbuild && nmake /f Makefile.vc mode=static VC=12 GEN_PDB=yes DEBUG=no "MACHINE=${DEP_LIBCURL_TARGET}"
|
||||
BUILD_COMMAND cd winbuild && nmake /f Makefile.vc mode=static "VC=${DEP_VS_VER}" GEN_PDB=yes DEBUG=no "MACHINE=${DEP_LIBCURL_TARGET}"
|
||||
INSTALL_COMMAND cd builds\\libcurl-*-release-*-winssl
|
||||
&& "${CMAKE_COMMAND}" -E copy_directory include "${DESTDIR}\\usr\\local\\include"
|
||||
&& "${CMAKE_COMMAND}" -E copy_directory lib "${DESTDIR}\\usr\\local\\lib"
|
||||
|
@ -214,7 +227,7 @@ if (${DEP_DEBUG})
|
|||
ExternalProject_Add_Step(dep_libcurl build_debug
|
||||
DEPENDEES build
|
||||
DEPENDERS install
|
||||
COMMAND cd winbuild && nmake /f Makefile.vc mode=static VC=12 GEN_PDB=yes DEBUG=yes "MACHINE=${DEP_LIBCURL_TARGET}"
|
||||
COMMAND cd winbuild && nmake /f Makefile.vc mode=static "VC=${DEP_VS_VER}" GEN_PDB=yes DEBUG=yes "MACHINE=${DEP_LIBCURL_TARGET}"
|
||||
WORKING_DIRECTORY "${SOURCE_DIR}"
|
||||
)
|
||||
ExternalProject_Add_Step(dep_libcurl install_debug
|
||||
|
|
|
@ -45,7 +45,9 @@ extern "C" {
|
|||
#define chdir _chdir
|
||||
#define isatty _isatty
|
||||
#define lseek _lseek
|
||||
#if _MSC_VER < 1900
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#define stat _stat
|
||||
|
|
|
@ -53,6 +53,11 @@
|
|||
#define HAS_INTRINSIC_128_TYPE
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_WIN64)
|
||||
#include <intrin.h>
|
||||
#pragma intrinsic(_mul128)
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Int128 class (enables safe math on signed 64bit integers)
|
||||
// eg Int128 val1((int64_t)9223372036854775807); //ie 2^63 -1
|
||||
|
|
Loading…
Reference in a new issue