aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-21 13:06:35 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-21 13:06:35 +0200
commit9b4cbc6ba3f8059278a20a4893780717851ce8e4 (patch)
treebb089d306639e1c3ef27c9b8f3fc90e8742f4117 /CMakeLists.txt
parent3441e7e164d8e5e8413a1eb47e3e9f3c824ed2d0 (diff)
downloadteachos-9b4cbc6ba3f8059278a20a4893780717851ce8e4.tar.xz
teachos-9b4cbc6ba3f8059278a20a4893780717851ce8e4.zip
build: clean up configuration
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 7 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 002ab0c..972422c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,8 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules")
include("ElfTransformations")
include("GenerateBootableIso")
+include("CTest")
+include("EnableCoverage")
#[============================================================================[
# External Dependencies
@@ -18,7 +20,7 @@ include("GenerateBootableIso")
include("FetchContent")
-if (NOT CMAKE_CROSSCOMPILING)
+if (BUILD_TESTING)
FetchContent_Declare(
"Catch2"
URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.7.1.tar.gz"
@@ -28,6 +30,9 @@ if (NOT CMAKE_CROSSCOMPILING)
)
FetchContent_MakeAvailable("Catch2")
+
+ find_package("Catch2")
+ include("Catch")
endif()
#[============================================================================[
@@ -92,13 +97,7 @@ endif()
# Build Host Testing
#]============================================================================]
-if(NOT CMAKE_CROSSCOMPILING)
- include("EnableCoverage")
-
- enable_testing()
- find_package("Catch2")
- include("Catch")
-
+if(BUILD_TESTING)
if(TARGET "Catch2" AND TARGET "Catch2WithMain")
set_target_properties("Catch2" "Catch2WithMain" PROPERTIES
C_CLANG_TIDY ""