diff options
author | Nicholas Hutchinson <nshutchinson@gmail.com> | 2021-01-06 18:53:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 19:53:16 +0100 |
commit | 69bb827346996a0bb5bc3720ad76ce8543c851bf (patch) | |
tree | 82ade90d59d6316678743a4c7637bcf0bf580c89 /cmake | |
parent | a181d44d19e6cd35d186eb5c61cd183fcfb3f9e5 (diff) | |
download | ccache-69bb827346996a0bb5bc3720ad76ce8543c851bf.tar.gz |
CI: Add VS2019 build jobs (#757)
Add VS2019 build jobs that use clang for the test suite. There are many
test failures on Windows, but these are ignored for now.
Tweak CMake build scripts:
- Fix CI build type handling for MSVC (recognise `/NDEBUG` and not just
`-DNDEBUG`)
- Fix incorrect warnings-as-errors flag for MSVC
- Suppress an additional conversion warning on MSVC
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CIBuildType.cmake | 4 | ||||
-rw-r--r-- | cmake/DevModeWarnings.cmake | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cmake/CIBuildType.cmake b/cmake/CIBuildType.cmake index 963bc500..e7216141 100644 --- a/cmake/CIBuildType.cmake +++ b/cmake/CIBuildType.cmake @@ -25,7 +25,7 @@ set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel CI." FORCE) -string(REPLACE -DNDEBUG "" CMAKE_CXX_FLAGS_CI ${CMAKE_CXX_FLAGS_CI}) -string(REPLACE -DNDEBUG "" CMAKE_C_FLAGS_CI ${CMAKE_C_FLAGS_CI}) +string(REGEX REPLACE "[/-]DNDEBUG" "" CMAKE_CXX_FLAGS_CI ${CMAKE_CXX_FLAGS_CI}) +string(REGEX REPLACE "[/-]DNDEBUG" "" CMAKE_C_FLAGS_CI ${CMAKE_C_FLAGS_CI}) string(STRIP ${CMAKE_CXX_FLAGS_CI} CMAKE_CXX_FLAGS_CI) string(STRIP ${CMAKE_C_FLAGS_CI} CMAKE_C_FLAGS_CI) diff --git a/cmake/DevModeWarnings.cmake b/cmake/DevModeWarnings.cmake index f578a9bc..7ff5411b 100644 --- a/cmake/DevModeWarnings.cmake +++ b/cmake/DevModeWarnings.cmake @@ -115,7 +115,7 @@ elseif(MSVC) string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") if(WARNINGS_AS_ERRORS) - list(APPEND CCACHE_COMPILER_WARNINGS /WE) + list(APPEND CCACHE_COMPILER_WARNINGS /WX) endif() list( @@ -126,6 +126,7 @@ elseif(MSVC) /wd5105 # Conversion warnings: /wd4244 + /wd4245 /wd4267 # Assignment in conditional: /wd4706 |