Merge pull request #478 from okuoku/win32-cmake

Activate Win64 platform with MSVC
This commit is contained in:
Alex Shinn 2018-06-21 22:36:56 +08:00 committed by GitHub
commit f16e889e04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 19 deletions

View file

@ -32,17 +32,6 @@ else()
add_definitions(-DSEXP_USE_DL=0)
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(MSVC)
# On MSVC, SEXP_64_BIT is not supported for now (#438)
add_definitions(-DSEXP_64_BIT=0)
else()
add_definitions(-DSEXP_64_BIT=1)
endif()
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
add_definitions(-DSEXP_64_BIT=0)
endif()
if(HAVE_STDINT_H)
add_definitions(-DSEXP_USE_INTTYPES=1)
endif()

View file

@ -12,7 +12,7 @@ Supported Environments
Chibi-scheme can be compiled with following platforms:
* Microsoft Visual Studio 2017 (32bit only)
* Microsoft Visual Studio 2017
* MinGW32
* MinGW64
* MSYS
@ -74,8 +74,8 @@ it does not support UNIX/APPLE platforms either.
1. (Make sure CMake was selected with Visual Studio installer)
2. Open this directory with "Open with Visual Studio"
3. Choose "x86-Release" or "x86-Debug" configuration
3. Choose "x86-" or "x64-" configuration
4. "CMake" => "Build all"
5. "CMake" => "Run Tests" => "chibi-scheme"
5. "CMake" => "Tests" => "Run chibi-scheme Tests"

View file

@ -20,11 +20,15 @@ environment:
- ARCH: x86
TOOLCHAIN: MSVC
BUILDSYSTEM: CMAKE
- ARCH: x64
TOOLCHAIN: MSVC
BUILDSYSTEM: CMAKE
install:
- if %BUILDSYSTEM%.==CMAKE. cinst ninja
- if %BUILDSYSTEM%.==CMAKE. set PATH=c:/tools/ninja;%PATH%
- if %TOOLCHAIN%.==MSVC. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- if %TOOLCHAIN%%ARCH%.==MSVCx86. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- if %TOOLCHAIN%%ARCH%.==MSVCx64. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
before_build:
- set BUILDTYPE= %ARCH%%TOOLCHAIN%

View file

@ -209,10 +209,6 @@ enum sexp_types {
#endif
#ifdef _WIN32
#if defined(_MSC_VER) && SEXP_64_BIT
/* On SEXP_64_BIT, 128bits arithmetic is mandatory */
#error Unsupported configuration
#endif
#if SEXP_64_BIT
typedef unsigned int sexp_tag_t;
typedef unsigned long long sexp_uint_t;