From 6863282a1e9c5d5d1721469e1350b4eac1797577 Mon Sep 17 00:00:00 2001 From: Stepanov Igor Date: Sat, 21 Dec 2024 01:26:27 +0300 Subject: [PATCH] Fix ctests --- .github/workflows/windows.yml | 2 +- CMakeLists.txt | 1 + CMakePresets.json | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c21016555..81a5e44c4 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -34,7 +34,7 @@ jobs: cmake --preset default-vs-msvc-windows cmake --build --preset default-vs-msvc-windows --config Release - name: Run tests - run: ctest --output-on-failure --test-dir build + run: ctest --preset default-vs-msvc-windows - name: Run engine tests run: | build/vctest/Release/vctest.exe -e build/Release/VoxelEngine.exe -d dev/tests -u build --output-always diff --git a/CMakeLists.txt b/CMakeLists.txt index 27373d0dc..e3d7c6f82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ option(VOXELENGINE_BUILD_APPDIR "" OFF) option(VOXELENGINE_BUILD_TESTS "" OFF) set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) add_subdirectory(src) add_executable(${PROJECT_NAME} src/main.cpp) diff --git a/CMakePresets.json b/CMakePresets.json index c0fb0919d..223733a28 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -41,5 +41,21 @@ "configurePreset": "default-ninja-clang-windows", "configuration": "Debug" } + ], + "testPresets": [ + { + "name": "default-vs-msvc-windows", + "configurePreset": "default-vs-msvc-windows", + "output": { + "outputOnFailure": true + } + }, + { + "name": "default-ninja-clang-windows", + "configurePreset": "default-ninja-clang-windows", + "output": { + "outputOnFailure": true + } + } ] } \ No newline at end of file