Enable Visual Studio 2013 again

Disable use of Effcee and RE2 with MSVC compilers older than Visual
Studio 2015 since RE2 doesn't support them.
This commit is contained in:
David Neto 2018-02-06 08:13:39 -08:00
parent e7fafdaa68
commit b1c9c4e8c0
2 changed files with 46 additions and 32 deletions

View File

@ -9,6 +9,7 @@ version: "{build}"
os:
- Visual Studio 2017
- Visual Studio 2015
- Visual Studio 2013
platform:
- x64
@ -35,6 +36,8 @@ matrix:
exclude:
- os: Visual Studio 2015
configuration: Debug
- os: Visual Studio 2013
configuration: Debug
# scripts that run after cloning repository
install:
@ -50,6 +53,7 @@ before_build:
- git clone --depth=1 https://github.com/google/effcee.git external/effcee
- git clone --depth=1 https://github.com/google/re2.git external/re2
# Set path and environment variables for the current Visual Studio version
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" (call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64)
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64)
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64)
@ -59,7 +63,7 @@ build:
build_script:
- mkdir build && cd build
- cmake -GNinja -DSPIRV_BUILD_COMPRESSION=ON -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=install ..
- cmake -GNinja -DSPIRV_BUILD_COMPRESSION=ON -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=install -DRE2_BUILD_TESTING=OFF ..
- ninja install
test_script:

View File

@ -66,6 +66,15 @@ if (NOT ${SPIRV_SKIP_TESTS})
endforeach()
endif()
set(SPIRV_ENABLE_EFFCEE ON)
if (MSVC)
if (MSVC_VERSION LESS 1900)
message(STATUS "SPIRV-Tools: Need Visual Studio 2015 or later for Effcee and RE2")
set(SPIRV_ENABLE_EFFCEE OFF)
endif()
endif()
if (SPIRV_ENABLE_EFFCEE)
# Find Effcee and RE2, for testing.
# Optional for now, but eventually we'll make this required.
@ -103,6 +112,7 @@ if (NOT ${SPIRV_SKIP_TESTS})
endif()
endif()
# TODO(dneto): Eventually, require this.
endif()
if (TARGET effcee)
message(STATUS "SPIRV-Tools: Effcee is configured")
else()