From dce90a460c9fe105ec16d01fd34f526a3c915efb Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Thu, 18 Sep 2025 08:58:56 +0200 Subject: [PATCH] change tests only in debug mode --- CMakeLists.txt | 7 +++++-- readme.md | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 205eca7..6b8c41a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.13.4) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type [Debug|Release]") -message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") +message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") set(CMAKE_C_FLAGS "-Wall -std=c99 -g -fsanitize=address -fprofile-arcs -ftest-coverage") @@ -30,7 +30,10 @@ message(VERBOSE "Include directory: libs/spandisc/include") include_directories(libs/spandisc/src) message(STATUS "Include subproject spandisc: libs/spandisc") add_subdirectory(libs/spandisc/src) -add_subdirectory(libs/spandisc/tests) + +if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + add_subdirectory(libs/spandisc/tests) +endif() # create target from source file(GLOB SOURCES src/*.c) diff --git a/readme.md b/readme.md index 1b080a4..f354436 100644 --- a/readme.md +++ b/readme.md @@ -12,7 +12,7 @@ Files to big for a media is in output file with number zero. mkdir build cd build -cmake .. +cmake -DCMAKE_BUILD_TYPE=Release .. make make install -- 2.47.3