From dcefc5409373c2e7f03907da1f7234e3bde0d408 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Fri, 28 Apr 2023 16:51:09 +0200 Subject: [PATCH] add some tooling for tests --- CI/before_script.linux.sh | 2 ++ CMakeLists.txt | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CI/before_script.linux.sh b/CI/before_script.linux.sh index 806135a16a..293d8d1a55 100755 --- a/CI/before_script.linux.sh +++ b/CI/before_script.linux.sh @@ -50,6 +50,7 @@ if [[ $CI_CLANG_TIDY ]]; then -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--warnings-as-errors=*" -DBUILD_UNITTESTS=ON -DBUILD_OPENCS_TESTS=ON + -DBUILD_TOOL_TESTS=ON -DBUILD_BENCHMARKS=ON ) fi @@ -106,6 +107,7 @@ if [[ "${BUILD_TESTS_ONLY}" ]]; then -DBUILD_NIFTEST=OFF \ -DBUILD_UNITTESTS=${BUILD_UNITTESTS} \ -DBUILD_OPENCS_TESTS=${BUILD_UNITTESTS} \ + -DBUILD_TOOL_TESTS=${BUILD_UNITTESTS} \ -DBUILD_BENCHMARKS=${BUILD_BENCHMARKS} \ .. else diff --git a/CMakeLists.txt b/CMakeLists.txt index 4adce72811..1b22e501c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,7 @@ option(BUILD_BENCHMARKS "Build benchmarks with Google Benchmark" OFF) option(BUILD_NAVMESHTOOL "Build navmesh tool" ON) option(BUILD_BULLETOBJECTTOOL "Build Bullet object tool" ON) option(BUILD_OPENCS_TESTS "Build OpenMW Construction Set tests" OFF) +option(BUILD_TOOL_TESTS "Build OpenMW related tool tests" OFF) set(OpenGL_GL_PREFERENCE LEGACY) # Use LEGACY as we use GL2; GLNVD is for GL3 and up. @@ -661,7 +662,7 @@ if (BUILD_LAUNCHER) add_subdirectory( apps/launcher ) endif() -if (BUILD_MWINIIMPORTER) +if (BUILD_MWINIIMPORTER OR BUILD_TOOL_TESTS) add_subdirectory( apps/mwiniimporter ) endif() @@ -684,7 +685,6 @@ endif(BUILD_NIFTEST) # UnitTests if (BUILD_UNITTESTS) add_subdirectory( apps/openmw_test_suite ) - add_subdirectory( apps/mwiniimporter_tests ) endif() if (BUILD_BENCHMARKS) @@ -703,6 +703,10 @@ if (BUILD_OPENCS_TESTS) add_subdirectory(apps/opencs_tests) endif() +if (BUILD_TOOL_TESTS) + add_subdirectory( apps/mwiniimporter_tests ) +endif() + if (WIN32) if (MSVC) foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )