diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7654ed0..f4c3762 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,21 @@ 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() |
