CI: fix native tests toolchain on windows (#4668)

* CI: ctest: fix trigger on CMakeLists change

* CI: ctest: update cmake version

this removes a warning
and matches gtest

* CI: ctest: remove explicit build mode for MSVC

gtest switched to dynamic libc (/MD), which is default, so this just works now
This commit is contained in:
black-sliver
2025-02-19 13:50:25 +01:00
committed by GitHub
parent 15bde56551
commit 91a8fc91d6
2 changed files with 5 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ on:
- '**.hh?' - '**.hh?'
- '**.hpp' - '**.hpp'
- '**.hxx' - '**.hxx'
- '**.CMakeLists' - '**/CMakeLists.txt'
- '.github/workflows/ctest.yml' - '.github/workflows/ctest.yml'
pull_request: pull_request:
paths: paths:
@@ -21,7 +21,7 @@ on:
- '**.hh?' - '**.hh?'
- '**.hpp' - '**.hpp'
- '**.hxx' - '**.hxx'
- '**.CMakeLists' - '**/CMakeLists.txt'
- '.github/workflows/ctest.yml' - '.github/workflows/ctest.yml'
jobs: jobs:

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.16)
project(ap-cpp-tests) project(ap-cpp-tests)
enable_testing() enable_testing()
@@ -7,8 +7,8 @@ find_package(GTest REQUIRED)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_definitions("/source-charset:utf-8") add_definitions("/source-charset:utf-8")
set(CMAKE_CXX_FLAGS_DEBUG "/MTd") # set(CMAKE_CXX_FLAGS_DEBUG "/MDd") # this is the default
set(CMAKE_CXX_FLAGS_RELEASE "/MT") # set(CMAKE_CXX_FLAGS_RELEASE "/MD") # this is the default
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# enable static analysis for gcc # enable static analysis for gcc
add_compile_options(-fanalyzer -Werror) add_compile_options(-fanalyzer -Werror)