From 609e5933a5aee9faf3ede9898840c6745c469b26 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 29 Apr 2022 20:00:50 +0200 Subject: build: add variables for including tests & examples --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4aa6d34..673c25f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,5 +45,10 @@ target_include_directories(${PROJECT_NAME} add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) -add_subdirectory(test) -add_subdirectory(examples/basic) +if(test) + add_subdirectory(test) +endif() + +if(examples) + add_subdirectory(examples/basic) +endif() -- cgit v1.2.3-18-g5258