From d2c67cc9ab74551bed470fecec62dc5ef0bb560e Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Sun, 30 Oct 2022 01:02:39 +0700 Subject: [PATCH] more msvc toolsets, little test fixes --- CMakePresets.json | 97 ++++++++++++++------------ untests/meta_utilities/value_tests.cpp | 6 +- 2 files changed, 56 insertions(+), 47 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 8ab60d2..cbe7af5 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -69,14 +69,14 @@ } }, { - "name": "windows-x86", + "name": "windows-x86-msvc2019", "inherits": "windows-base", "architecture": { "value": "x86", "strategy": "external" }, "toolset": { - "value": "host=x64", + "value": "v142,host=x64", "strategy": "external" }, "cacheVariables": { @@ -85,14 +85,46 @@ } }, { - "name": "windows-x64", + "name": "windows-x64-msvc2019", "inherits": "windows-base", "architecture": { "value": "x64", "strategy": "external" }, "toolset": { - "value": "host=x64", + "value": "v142,host=x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_C_COMPILER": "cl", + "CMAKE_CXX_COMPILER": "cl" + } + }, + { + "name": "windows-x86-msvc2022", + "inherits": "windows-base", + "architecture": { + "value": "x86", + "strategy": "external" + }, + "toolset": { + "value": "v143,host=x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_C_COMPILER": "cl", + "CMAKE_CXX_COMPILER": "cl" + } + }, + { + "name": "windows-x64-msvc2022", + "inherits": "windows-base", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "toolset": { + "value": "v143,host=x64", "strategy": "external" }, "cacheVariables": { @@ -124,67 +156,44 @@ "configurePreset": "macos-x64" }, { - "name": "windows-x86-debug", + "name": "windows-x86-msvc2019-debug", "configuration": "Debug", - "configurePreset": "windows-x86" + "configurePreset": "windows-x86-msvc2019" }, { - "name": "windows-x86-release", + "name": "windows-x86-msvc2019-release", "configuration": "Release", - "configurePreset": "windows-x86" + "configurePreset": "windows-x86-msvc2019" }, { - "name": "windows-x64-debug", + "name": "windows-x64-msvc2019-debug", "configuration": "Debug", - "configurePreset": "windows-x64" + "configurePreset": "windows-x64-msvc2019" }, { - "name": "windows-x64-release", + "name": "windows-x64-msvc2019-release", "configuration": "Release", - "configurePreset": "windows-x64" - } - ], - - "testPresets": [ + "configurePreset": "windows-x64-msvc2019" + }, { - "name": "macos-arm64-debug", + "name": "windows-x86-msvc2022-debug", "configuration": "Debug", - "configurePreset": "macos-arm64-san" + "configurePreset": "windows-x86-msvc2022" }, { - "name": "macos-arm64-release", + "name": "windows-x86-msvc2022-release", "configuration": "Release", - "configurePreset": "macos-arm64" + "configurePreset": "windows-x86-msvc2022" }, { - "name": "macos-x64-debug", + "name": "windows-x64-msvc2022-debug", "configuration": "Debug", - "configurePreset": "macos-x64-san" + "configurePreset": "windows-x64-msvc2022" }, { - "name": "macos-x64-release", + "name": "windows-x64-msvc2022-release", "configuration": "Release", - "configurePreset": "macos-x64" - }, - { - "name": "windows-x86-debug", - "configuration": "Debug", - "configurePreset": "windows-x86" - }, - { - "name": "windows-x86-release", - "configuration": "Release", - "configurePreset": "windows-x86" - }, - { - "name": "windows-x64-debug", - "configuration": "Debug", - "configurePreset": "windows-x64" - }, - { - "name": "windows-x64-release", - "configuration": "Release", - "configurePreset": "windows-x64" + "configurePreset": "windows-x64-msvc2022" } ] } diff --git a/untests/meta_utilities/value_tests.cpp b/untests/meta_utilities/value_tests.cpp index 08450f4..8f049d3 100644 --- a/untests/meta_utilities/value_tests.cpp +++ b/untests/meta_utilities/value_tests.cpp @@ -504,15 +504,15 @@ TEST_CASE("meta/meta_utilities/value") { CHECK(ivec2::copy_constructor_counter == 0); [[maybe_unused]] meta::uvalue vv1{*vp}; - CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 2)); + CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 1 || ivec2::move_constructor_counter == 2)); CHECK(ivec2::copy_constructor_counter == 1); [[maybe_unused]] meta::uvalue vv2{*std::move(vp)}; - CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 4)); + CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 2 || ivec2::move_constructor_counter == 4)); CHECK(ivec2::copy_constructor_counter == 2); [[maybe_unused]] meta::uvalue vv3{*std::as_const(vp)}; - CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 6)); + CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 3 || ivec2::move_constructor_counter == 6)); CHECK(ivec2::copy_constructor_counter == 3); } {