From a04251083005261f8008b83d36f106821371a592 Mon Sep 17 00:00:00 2001 From: Piotr Spieker Date: Wed, 6 Nov 2024 15:02:52 +0100 Subject: [PATCH] Support CTest --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ac5faf..dfb46a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,12 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) # Allow clangd and others to properly understand this C++ project set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + + # Testing only available if this is the main project + # Note this needs to be done in the main CMakeLists + # since it calls enable_testing, which must be in the + # main CMakeLists. + include(CTest) endif()