From 028b643208d19966f3d0dd3c98cb8659a46fd3c2 Mon Sep 17 00:00:00 2001 From: Ye ShanShan Date: Thu, 23 Jan 2025 15:00:18 +0800 Subject: [PATCH] chore: disable ut by default to be consistent with other dtk projects. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a5d47d7..88dc76ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,6 @@ project( LANGUAGES CXX C ) -option(BUILD_TESTS "Build tests" ON) option(ENABLE_COV "Enable code coverage" OFF) if(PROJECT_VERSION_MAJOR EQUAL 6) @@ -49,6 +48,7 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) if(CMAKE_BUILD_TYPE_LOWER STREQUAL release) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL debug) + set(BUILD_TESTING ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g") endif() @@ -131,6 +131,6 @@ add_subdirectory(styleplugins) if(CMAKE_BUILD_TYPE_LOWER STREQUAL debug) add_subdirectory(styles) endif() -if(BUILD_TESTS AND NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "loongarch") +if(BUILD_TESTING) add_subdirectory(tests) endif()