From df655e13b0a77ec29cac3a8ccb2d48984e3c091d Mon Sep 17 00:00:00 2001 From: jakeg00dwin Date: Wed, 6 Mar 2024 21:46:41 -0800 Subject: [PATCH] updated with new section for unit testing stuff --- CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49c7499..b32ab69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) # Use the fancy version substitution -project(cmake-cmocka-template +project(cmake-cpputest-template VERSION 1.0 DESCRIPTION "template for cmake + cpputest" LANGUAGES C CXX @@ -32,9 +32,20 @@ else() add_definitions(-DUNIX) endif() -add_subdirectory(src) +# ####################################### +# TESTING STUFF +# ####################################### + +# find_library() + + +if (UNIT_TESTING) + message(STATUS "CPPUTEST_LIB: ${CPPUTEST_LIB}") + add_subdirectory(tests) +endif() # ####################################### # PROJECT SPECIFIC # ####################################### +add_subdirectory(src)