From a4af9851433481575798e7bbb505c9d22bdf699a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 18 Mar 2026 06:41:16 +0000 Subject: build: install clang tidy in devcontainer --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2343c77..7654ed0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,10 @@ add_compile_options( # Global Linting Configuration #]============================================================================] -find_program(CLANG_TIDY_EXE "clang-tidy") +find_program(CLANG_TIDY_EXE NAMES + "clang-tidy-21" + "clang-tidy" +) if(CLANG_TIDY_EXE AND TEACHOS_ENABLE_LINTING) set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_EXE}") -- cgit v1.2.3 From 754012dd458985a6a4953c99204c6651318892b2 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 23 Mar 2026 08:10:49 +0100 Subject: testing: enable build-host testing --- CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7654ed0..f4c3762 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,21 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules") include("ElfTransformations") include("GenerateBootableIso") +#[============================================================================[ +# External Dependencies +#]============================================================================] + +include("FetchContent") + +FetchContent_Declare( + "Catch2" + GIT_REPOSITORY "https://github.com/catchorg/Catch2.git" + GIT_TAG "v3.13.0" + FIND_PACKAGE_ARGS +) + +FetchContent_MakeAvailable("Catch2") + #[============================================================================[ # Global Build System Options #]============================================================================] @@ -70,7 +85,20 @@ endif() # Global Targets #]============================================================================] -add_subdirectory("arch/${CMAKE_SYSTEM_PROCESSOR}") -add_subdirectory("kapi") -add_subdirectory("libs") -add_subdirectory("kernel") \ No newline at end of file +if(CMAKE_CROSSCOMPILING) + add_subdirectory("arch/${CMAKE_SYSTEM_PROCESSOR}") + add_subdirectory("kernel") + add_subdirectory("kapi") + add_subdirectory("libs") +else() + enable_testing() + find_package("Catch2") + include("Catch") + + set_target_properties("Catch2" "Catch2WithMain" PROPERTIES + C_CLANG_TIDY "" + CXX_CLANG_TIDY "" + ) + + add_subdirectory("libs") +endif() -- cgit v1.2.3 From 48a2c33d205397adeaad385aebc1d1e008915b3e Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 23 Mar 2026 10:32:15 +0100 Subject: ci: enable test builds --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f4c3762..71e4fef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,9 @@ include("FetchContent") FetchContent_Declare( "Catch2" - GIT_REPOSITORY "https://github.com/catchorg/Catch2.git" - GIT_TAG "v3.13.0" + URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.7.1.tar.gz" + URL_HASH "SHA256=c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c" + EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS ) @@ -91,6 +92,8 @@ if(CMAKE_CROSSCOMPILING) add_subdirectory("kapi") add_subdirectory("libs") else() + include("EnableCoverage") + enable_testing() find_package("Catch2") include("Catch") -- cgit v1.2.3 From 730a1b83fe02e6249c20cbdd24b0c097c7c57b49 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 23 Mar 2026 10:37:41 +0100 Subject: deps: disable clang-tidy when not preinstalled --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 71e4fef..febcf0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,10 +98,12 @@ else() find_package("Catch2") include("Catch") - set_target_properties("Catch2" "Catch2WithMain" PROPERTIES - C_CLANG_TIDY "" - CXX_CLANG_TIDY "" - ) + if(TARGET "Catch2" AND TARGET "Catch2WithMain") + set_target_properties("Catch2" "Catch2WithMain" PROPERTIES + C_CLANG_TIDY "" + CXX_CLANG_TIDY "" + ) + endif() add_subdirectory("libs") endif() -- cgit v1.2.3 From a2834cc22b096e848448bb681ab7b517ecbe70b9 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 26 Mar 2026 16:54:07 +0100 Subject: build: simplify header scanning --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index febcf0e..d785d4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,10 @@ option(TEACHOS_GENERATE_DOCS "Generate documentation during build" ON) # Global Build System Configuration #]============================================================================] +if(POLICY CMP0209) + cmake_policy(SET CMP0209 NEW) +endif() + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib") set(CMAKE_INTERPROCEDURAL_OPTIMIZATION YES) -- cgit v1.2.3 From 11c6d57e013832983bcd9bb965d470bf4c282ab6 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 26 Mar 2026 18:40:39 +0100 Subject: kstd/vector: implement range erase --- CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d785d4e..6cc8a2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,15 +18,17 @@ include("GenerateBootableIso") include("FetchContent") -FetchContent_Declare( - "Catch2" - URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.7.1.tar.gz" - URL_HASH "SHA256=c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c" - EXCLUDE_FROM_ALL - FIND_PACKAGE_ARGS -) +if (NOT CMAKE_CROSSCOMPILING) + FetchContent_Declare( + "Catch2" + URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.7.1.tar.gz" + URL_HASH "SHA256=c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c" + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS + ) -FetchContent_MakeAvailable("Catch2") + FetchContent_MakeAvailable("Catch2") +endif() #[============================================================================[ # Global Build System Options -- cgit v1.2.3 From 9b80bd2ca528a376c2bb6831020b3d78e4b252d6 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 1 Apr 2026 08:10:10 +0200 Subject: build: fix kernel+arch build --- CMakeLists.txt | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cc8a2f..002ab0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,15 +89,10 @@ if(Doxygen_FOUND AND TEACHOS_GENERATE_DOCS) endif() #[============================================================================[ -# Global Targets +# Build Host Testing #]============================================================================] -if(CMAKE_CROSSCOMPILING) - add_subdirectory("arch/${CMAKE_SYSTEM_PROCESSOR}") - add_subdirectory("kernel") - add_subdirectory("kapi") - add_subdirectory("libs") -else() +if(NOT CMAKE_CROSSCOMPILING) include("EnableCoverage") enable_testing() @@ -110,6 +105,16 @@ else() CXX_CLANG_TIDY "" ) endif() +endif() - add_subdirectory("libs") +#[============================================================================[ +# Global Targets +#]============================================================================] + +if(CMAKE_CROSSCOMPILING) + add_subdirectory("arch/${CMAKE_SYSTEM_PROCESSOR}") endif() + +add_subdirectory("kapi") +add_subdirectory("kernel") +add_subdirectory("libs") -- cgit v1.2.3 From 9b4cbc6ba3f8059278a20a4893780717851ce8e4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 21 Apr 2026 13:06:35 +0200 Subject: build: clean up configuration --- CMakeLists.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'CMakeLists.txt') 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 "" -- cgit v1.2.3 From e0c43cf62221d859b52d8a7cd3c78559de3bac8a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 5 May 2026 11:03:17 +0000 Subject: ide: fix container configuration --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 972422c..8d48a13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,8 @@ add_compile_options( #]============================================================================] find_program(CLANG_TIDY_EXE NAMES + "clang-tidy-23" + "clang-tidy-22" "clang-tidy-21" "clang-tidy" ) -- cgit v1.2.3 From 24232fa7db160b4e7b702345e0892906dcccd8cd Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 18 May 2026 14:08:13 +0200 Subject: bht: improve catch2 configuration --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d48a13..fb5b101 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,8 @@ if (BUILD_TESTING) find_package("Catch2") include("Catch") + + add_compile_definitions("CATCH_CONFIG_NO_COUNTER") endif() #[============================================================================[ -- cgit v1.2.3 From a50d6cfcea67b11f6689ec825afc2e2b33252714 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 18 May 2026 15:21:39 +0200 Subject: ci: enable jUnit style test reports --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fb5b101..8118e0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ if (BUILD_TESTING) include("Catch") add_compile_definitions("CATCH_CONFIG_NO_COUNTER") + set(CATCH_TEST_ARGS "EXTRA_ARGS" "--reporter" "junit::out=junit.xml" "--reporter" "console::out=-::colour-mode=ansi") endif() #[============================================================================[ -- cgit v1.2.3 From 033ecf6714089d2ce331152f5e120567f8d546cf Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 19 May 2026 12:48:08 +0200 Subject: build: clean up dependencies --- CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8118e0f..f7c7fe8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,9 +31,6 @@ if (BUILD_TESTING) FetchContent_MakeAvailable("Catch2") - find_package("Catch2") - include("Catch") - add_compile_definitions("CATCH_CONFIG_NO_COUNTER") set(CATCH_TEST_ARGS "EXTRA_ARGS" "--reporter" "junit::out=junit.xml" "--reporter" "console::out=-::colour-mode=ansi") endif() -- cgit v1.2.3