Added guard:ehcont for 64bit windows (#99)
- Added security flag guard:ehcont for MSVC. - Updated wininit script to use Visual Studio 2019 as default generator. - Re-enabled vcpkg tests now that rapidjson has been updated.
This commit is contained in:
Родитель
eaccf166e2
Коммит
382dea2c80
|
@ -62,85 +62,85 @@ jobs:
|
|||
testResultsFiles: built\Out\windows_$(buildPlatform)\$(buildConfiguration)\GLTFSDK.Test\GLTFSDK.Test.log
|
||||
condition: and(succeeded(), in(variables['buildPlatform'], 'Win32', 'x64'))
|
||||
|
||||
# - job: WindowsVcPkg_VS2019
|
||||
- job: WindowsVcPkg_VS2019
|
||||
|
||||
# pool:
|
||||
# vmImage: 'windows-2019'
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
|
||||
# strategy:
|
||||
# matrix:
|
||||
# Win32-Release:
|
||||
# buildPlatform: Win32
|
||||
# buildConfiguration: Release
|
||||
# vcpkgTriplet: x86-windows
|
||||
# Win32-Debug:
|
||||
# buildPlatform: Win32
|
||||
# buildConfiguration: Debug
|
||||
# vcpkgTriplet: x86-windows
|
||||
# x64-Release:
|
||||
# buildPlatform: x64
|
||||
# buildConfiguration: Release
|
||||
# vcpkgTriplet: x64-windows
|
||||
# x64-Debug:
|
||||
# buildPlatform: x64
|
||||
# buildConfiguration: Debug
|
||||
# vcpkgTriplet: x64-windows
|
||||
# ARM-Release:
|
||||
# buildPlatform: ARM
|
||||
# buildConfiguration: Release
|
||||
# vcpkgTriplet: arm-windows
|
||||
# ARM-Debug:
|
||||
# buildPlatform: ARM
|
||||
# buildConfiguration: Debug
|
||||
# vcpkgTriplet: arm-windows
|
||||
# ARM64-Release:
|
||||
# buildPlatform: ARM64
|
||||
# buildConfiguration: Release
|
||||
# vcpkgTriplet: arm64-windows
|
||||
# ARM64-Debug:
|
||||
# buildPlatform: ARM64
|
||||
# buildConfiguration: Debug
|
||||
# vcpkgTriplet: arm64-windows
|
||||
strategy:
|
||||
matrix:
|
||||
Win32-Release:
|
||||
buildPlatform: Win32
|
||||
buildConfiguration: Release
|
||||
vcpkgTriplet: x86-windows
|
||||
Win32-Debug:
|
||||
buildPlatform: Win32
|
||||
buildConfiguration: Debug
|
||||
vcpkgTriplet: x86-windows
|
||||
x64-Release:
|
||||
buildPlatform: x64
|
||||
buildConfiguration: Release
|
||||
vcpkgTriplet: x64-windows
|
||||
x64-Debug:
|
||||
buildPlatform: x64
|
||||
buildConfiguration: Debug
|
||||
vcpkgTriplet: x64-windows
|
||||
ARM-Release:
|
||||
buildPlatform: ARM
|
||||
buildConfiguration: Release
|
||||
vcpkgTriplet: arm-windows
|
||||
ARM-Debug:
|
||||
buildPlatform: ARM
|
||||
buildConfiguration: Debug
|
||||
vcpkgTriplet: arm-windows
|
||||
ARM64-Release:
|
||||
buildPlatform: ARM64
|
||||
buildConfiguration: Release
|
||||
vcpkgTriplet: arm64-windows
|
||||
ARM64-Debug:
|
||||
buildPlatform: ARM64
|
||||
buildConfiguration: Debug
|
||||
vcpkgTriplet: arm64-windows
|
||||
|
||||
# workspace:
|
||||
# clean: all
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
# variables:
|
||||
# vcpkgRoot: "C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
variables:
|
||||
vcpkgRoot: "C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
|
||||
# steps:
|
||||
# - powershell: vcpkg install --triplet "$(vcpkgTriplet)" rapidjson gtest
|
||||
# displayName: Install packages with VcPkg
|
||||
steps:
|
||||
- powershell: vcpkg install --triplet "$(vcpkgTriplet)" rapidjson gtest
|
||||
displayName: Install packages with VcPkg
|
||||
|
||||
# - task: CMake@1
|
||||
# inputs:
|
||||
# workingDirectory: 'built\Int\cmake_$(buildPlatform)'
|
||||
# cmakeArgs: '..\..\.. -G "Visual Studio 16 2019" -A "$(buildPlatform)" -DCMAKE_TOOLCHAIN_FILE="$(vcpkgRoot)" -DVCPKG_TARGET_TRIPLET="$(vcpkgTriplet)"'
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'built\Int\cmake_$(buildPlatform)'
|
||||
cmakeArgs: '..\..\.. -G "Visual Studio 16 2019" -A "$(buildPlatform)" -DCMAKE_TOOLCHAIN_FILE="$(vcpkgRoot)" -DVCPKG_TARGET_TRIPLET="$(vcpkgTriplet)"'
|
||||
|
||||
# - task: CMake@1
|
||||
# inputs:
|
||||
# workingDirectory: 'built\Int\cmake_$(buildPlatform)'
|
||||
# cmakeArgs: '--build . --target install --config $(buildConfiguration) -- /m'
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'built\Int\cmake_$(buildPlatform)'
|
||||
cmakeArgs: '--build . --target install --config $(buildConfiguration) -- /m'
|
||||
|
||||
# # copy googletest related dll files
|
||||
# - task: CopyFiles@2
|
||||
# inputs:
|
||||
# sourceFolder: 'built\Int\cmake_$(buildPlatform)\GLTFSDK.Test\$(buildConfiguration)'
|
||||
# contents: 'gtest*.dll'
|
||||
# targetFolder: 'built\Out\windows_$(buildPlatform)\$(buildConfiguration)\GLTFSDK.Test'
|
||||
# overWrite: true
|
||||
# condition: in(variables['buildPlatform'], 'Win32', 'x64')
|
||||
# copy googletest related dll files
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: 'built\Int\cmake_$(buildPlatform)\GLTFSDK.Test\$(buildConfiguration)'
|
||||
contents: 'gtest*.dll'
|
||||
targetFolder: 'built\Out\windows_$(buildPlatform)\$(buildConfiguration)\GLTFSDK.Test'
|
||||
overWrite: true
|
||||
condition: in(variables['buildPlatform'], 'Win32', 'x64')
|
||||
|
||||
# - script: .\GLTFSDK.Test.exe --gtest_output=xml:GLTFSDK.Test.log
|
||||
# workingDirectory: built\Out\windows_$(buildPlatform)\$(buildConfiguration)\GLTFSDK.Test
|
||||
# displayName: Running Unit Tests
|
||||
# condition: and(succeeded(), in(variables['buildPlatform'], 'Win32', 'x64'))
|
||||
- script: .\GLTFSDK.Test.exe --gtest_output=xml:GLTFSDK.Test.log
|
||||
workingDirectory: built\Out\windows_$(buildPlatform)\$(buildConfiguration)\GLTFSDK.Test
|
||||
displayName: Running Unit Tests
|
||||
condition: and(succeeded(), in(variables['buildPlatform'], 'Win32', 'x64'))
|
||||
|
||||
# - task: PublishTestResults@2
|
||||
# inputs:
|
||||
# testResultsFormat: 'JUnit'
|
||||
# testResultsFiles: built\Out\windows_$(buildPlatform)\$(buildConfiguration)\GLTFSDK.Test\GLTFSDK.Test.log
|
||||
# condition: and(succeeded(), in(variables['buildPlatform'], 'Win32', 'x64'))
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: 'JUnit'
|
||||
testResultsFiles: built\Out\windows_$(buildPlatform)\$(buildConfiguration)\GLTFSDK.Test\GLTFSDK.Test.log
|
||||
condition: and(succeeded(), in(variables['buildPlatform'], 'Win32', 'x64'))
|
||||
|
||||
- job: MacOS
|
||||
|
||||
|
@ -180,50 +180,50 @@ jobs:
|
|||
testResultsFormat: 'JUnit'
|
||||
testResultsFiles: built/Out/$(buildPlatform)/$(buildConfiguration)/GLTFSDK.Test/GLTFSDK.Test.log
|
||||
|
||||
# - job: MacOSVcPkg
|
||||
- job: MacOSVcPkg
|
||||
|
||||
# pool:
|
||||
# vmImage: 'macOS-10.15'
|
||||
pool:
|
||||
vmImage: 'macOS-10.15'
|
||||
|
||||
# strategy:
|
||||
# matrix:
|
||||
# macOS-Release:
|
||||
# buildPlatform: macOS
|
||||
# buildConfiguration: Release
|
||||
# vcpkgTriplet: x64-osx
|
||||
# macOS-Debug:
|
||||
# buildPlatform: macOS
|
||||
# buildConfiguration: Debug
|
||||
# vcpkgTriplet: x64-osx
|
||||
strategy:
|
||||
matrix:
|
||||
macOS-Release:
|
||||
buildPlatform: macOS
|
||||
buildConfiguration: Release
|
||||
vcpkgTriplet: x64-osx
|
||||
macOS-Debug:
|
||||
buildPlatform: macOS
|
||||
buildConfiguration: Debug
|
||||
vcpkgTriplet: x64-osx
|
||||
|
||||
# workspace:
|
||||
# clean: all
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
# steps:
|
||||
# - task: Bash@3
|
||||
# inputs:
|
||||
# targetType: 'inline'
|
||||
# script: vcpkg install --triplet "$(vcpkgTriplet)" rapidjson gtest
|
||||
# displayName: Install packages with VcPkg
|
||||
steps:
|
||||
- task: Bash@3
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: vcpkg install --triplet "$(vcpkgTriplet)" rapidjson gtest
|
||||
displayName: Install packages with VcPkg
|
||||
|
||||
# - task: CMake@1
|
||||
# inputs:
|
||||
# workingDirectory: 'built/Int/cmake_$(buildPlatform)'
|
||||
# cmakeArgs: '../../.. -G Xcode -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake'
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'built/Int/cmake_$(buildPlatform)'
|
||||
cmakeArgs: '../../.. -G Xcode -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake'
|
||||
|
||||
# - task: CMake@1
|
||||
# inputs:
|
||||
# workingDirectory: 'built/Int/cmake_$(buildPlatform)'
|
||||
# cmakeArgs: '--build . --target install --config $(buildConfiguration)'
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'built/Int/cmake_$(buildPlatform)'
|
||||
cmakeArgs: '--build . --target install --config $(buildConfiguration)'
|
||||
|
||||
# - script: ./GLTFSDK.Test --gtest_output=xml:GLTFSDK.Test.log
|
||||
# workingDirectory: built/Out/$(buildPlatform)/$(buildConfiguration)/GLTFSDK.Test
|
||||
# displayName: Running Unit Tests
|
||||
- script: ./GLTFSDK.Test --gtest_output=xml:GLTFSDK.Test.log
|
||||
workingDirectory: built/Out/$(buildPlatform)/$(buildConfiguration)/GLTFSDK.Test
|
||||
displayName: Running Unit Tests
|
||||
|
||||
# - task: PublishTestResults@2
|
||||
# inputs:
|
||||
# testResultsFormat: 'JUnit'
|
||||
# testResultsFiles: built/Out/$(buildPlatform)/$(buildConfiguration)/GLTFSDK.Test/GLTFSDK.Test.log
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: 'JUnit'
|
||||
testResultsFiles: built/Out/$(buildPlatform)/$(buildConfiguration)/GLTFSDK.Test/GLTFSDK.Test.log
|
||||
|
||||
- job: iOS
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ function GeneratePlatform($platform, $path)
|
|||
try
|
||||
{
|
||||
$argList = @(
|
||||
"-G", "Visual Studio 15 2017",
|
||||
"-G", "Visual Studio 16 2019",
|
||||
"-A", "$platform"
|
||||
)
|
||||
|
||||
|
|
|
@ -28,6 +28,11 @@ if (MSVC)
|
|||
# Set warning level to 4 (/W4)
|
||||
target_compile_options(GLTFSDK PRIVATE "/Zi;/W4;/EHsc")
|
||||
|
||||
if((MSVC_VERSION GREATER 1920) AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
|
||||
target_compile_options(GLTFSDK PRIVATE "$<$<CONFIG:RELEASE>:/guard:ehcont>")
|
||||
target_link_options(GLTFSDK PRIVATE "$<$<CONFIG:RELEASE>:/guard:ehcont>")
|
||||
endif()
|
||||
|
||||
# Make sure that all PDB files on Windows are installed to the output folder with the libraries. By default, only the debug build does this.
|
||||
set_target_properties(GLTFSDK PROPERTIES COMPILE_PDB_NAME "GLTFSDK" COMPILE_PDB_OUTPUT_DIRECTORY "${LIBRARY_OUTPUT_DIRECTORY}")
|
||||
endif()
|
||||
|
|
Загрузка…
Ссылка в новой задаче