aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-04-29 20:00:50 +0200
committerHampusM <hampus@hampusmat.com>2022-04-29 20:00:50 +0200
commit609e5933a5aee9faf3ede9898840c6745c469b26 (patch)
tree2eacbd66b1b62fe90a10df00ade6d13060137edf
parent9fce9dd2c3cd1c0a75a5cfe74ea0484186247cc3 (diff)
build: add variables for including tests & examples
-rw-r--r--CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
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()