]> gitweb.hhaalo.de Git - discspan.git/commitdiff
change tests only in debug mode
authorBastian Dehn <hhaalo@arcor.de>
Thu, 18 Sep 2025 06:58:56 +0000 (08:58 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 18 Sep 2025 06:58:56 +0000 (08:58 +0200)
CMakeLists.txt
readme.md

index 205eca7d3d426f5bd2d1a2f2da2a5f5bbd9f937a..6b8c41ad7bf9e631515283581e7304810bcf7989 100644 (file)
@@ -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)
index 1b080a4ed4167275d53134109911557bd86923e2..f3544368f46c80d158bb3c278b835b978c58b1e2 100644 (file)
--- 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