From 6954f5179310f9a1e219bdbc7d59c903e494209c Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 24 Jun 2024 15:09:12 -0400 Subject: [PATCH] Fix CMakeLists.txt to propagate dependencies --- CMakeLists.txt | 6 ++++-- include/jtest/jtest.hpp | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bb04e9..9bbbe9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,8 +35,6 @@ CPMAddPackage( URL https://git.redacted.cc/josh/jlog/archive/Prerelease-5.zip ) -include_directories(${Event_SOURCE_DIR}/include) -include_directories(${jlog_SOURCE_DIR}/include) if (UNIX) add_library(jtest SHARED ${jtest_SRC}) @@ -46,6 +44,10 @@ if (WIN32) add_library(jtest STATIC ${jtest_SRC}) endif() +target_include_directories(jtest PUBLIC ${Event_SOURCE_DIR}/include) +target_include_directories(jtest PUBLIC ${jlog_SOURCE_DIR}/include) + + target_include_directories(jtest PUBLIC ${PROJECT_SOURCE_DIR}/include) diff --git a/include/jtest/jtest.hpp b/include/jtest/jtest.hpp index 59a0346..662fbdf 100644 --- a/include/jtest/jtest.hpp +++ b/include/jtest/jtest.hpp @@ -33,6 +33,9 @@ namespace jtest { testlist.push_back(testdef(testname, callback, file, line)); } + // TODO: Implement check variants + // TODO: implement streaming a custom failure message with << operator + // i.e. : check(my_cond) << "The condition is not true!" bool check(bool condition) { if (!condition) throw std::runtime_error("Test check failed!!");