From 03af2432e0eb9911f66d085f106aa0c9899280c4 Mon Sep 17 00:00:00 2001 From: Dmitry Kobets Date: Thu, 2 Dec 2021 14:28:25 -0800 Subject: [PATCH] Re-work CI and error suppression --- pipelines/jobs.yml | 11 +++++------ pipelines/steps.yml | 2 +- tests/CMakeLists.txt | 18 ++++++------------ 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/pipelines/jobs.yml b/pipelines/jobs.yml index 3025fdc..dff2f9b 100644 --- a/pipelines/jobs.yml +++ b/pipelines/jobs.yml @@ -11,24 +11,23 @@ jobs: matrix: 14_debug: GSL_CXX_STANDARD: '14' - CMAKE_CXX_STANDARD: '14' BUILD_TYPE: 'Debug' 14_release: GSL_CXX_STANDARD: '14' - CMAKE_CXX_STANDARD: '14' BUILD_TYPE: 'Release' 17_debug: GSL_CXX_STANDARD: '17' - CMAKE_CXX_STANDARD: '17' BUILD_TYPE: 'Debug' 17_release: GSL_CXX_STANDARD: '17' - CMAKE_CXX_STANDARD: '17' BUILD_TYPE: 'Release' + # Note: Currently, only some C++20 features are supported by GSL 20_debug: - GSL_CXX_STANDARD: '17' - CMAKE_CXX_STANDARD: '20' + GSL_CXX_STANDARD: '20' BUILD_TYPE: 'Debug' + 20_release: + GSL_CXX_STANDARD: '20' + BUILD_TYPE: 'Release' continueOnError: false steps: - template: ./steps.yml diff --git a/pipelines/steps.yml b/pipelines/steps.yml index 6cc089b..b9a4e8c 100644 --- a/pipelines/steps.yml +++ b/pipelines/steps.yml @@ -3,7 +3,7 @@ steps: name: Configure inputs: workingDirectory: build - cmakeArgs: '-DCMAKE_CXX_STANDARD=$(CMAKE_CXX_STANDARD) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -Werror=dev .. ' + cmakeArgs: '-DGSL_CXX_STANDARD=$(GSL_CXX_STANDARD) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -Werror=dev .. ' - task: CMake@1 name: Build diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index dbd36d3..77284b5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -54,7 +54,7 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) find_package(Microsoft.GSL REQUIRED) endif() -if (MSVC AND (GSL_CXX_STANDARD EQUAL 17)) +if (MSVC AND (GSL_CXX_STANDARD GREATER_EQUAL 17)) set(GSL_CPLUSPLUS_OPT -Zc:__cplusplus -permissive-) endif() @@ -130,17 +130,16 @@ else() -Wno-unused-member-function -Wno-unused-variable > - $<$: - $<$: - -Wno-zero-as-null-pointer-constant # Very noisy, minor, and just so - -Wno-sign-conversion # happens to trigger on googletest - > - > > $<$: $<$,4.99>,$,6>>: $<$:-Wno-undefined-func-template> > + $<$,$>: + -Wno-zero-as-null-pointer-constant # failing Clang Ubuntu 20.04 tests, seems to be a bug with clang 11.0.0 + # (operator< is being re-written by the compiler as operator<=> and + # raising the warning) + > > $<$: $<$,9.1>,$,10>>: @@ -238,11 +237,6 @@ else() -Wpedantic -Wshadow -Wsign-conversion - $<$: # happens to trigger on googletest - $<$: - -Wno-sign-conversion # happens to trigger on googletest - > - > $<$,$>: -Weverything -Wno-c++98-compat