Fix CMakeLists.txt to propagate dependencies

This commit is contained in:
2024-06-24 15:09:12 -04:00
parent 7412ce3f65
commit 6954f51793
2 changed files with 7 additions and 2 deletions

View File

@@ -35,8 +35,6 @@ CPMAddPackage(
URL https://git.redacted.cc/josh/jlog/archive/Prerelease-5.zip 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) if (UNIX)
add_library(jtest SHARED ${jtest_SRC}) add_library(jtest SHARED ${jtest_SRC})
@@ -46,6 +44,10 @@ if (WIN32)
add_library(jtest STATIC ${jtest_SRC}) add_library(jtest STATIC ${jtest_SRC})
endif() 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) target_include_directories(jtest PUBLIC ${PROJECT_SOURCE_DIR}/include)

View File

@@ -33,6 +33,9 @@ namespace jtest {
testlist.push_back(testdef(testname, callback, file, line)); 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) { bool check(bool condition) {
if (!condition) if (!condition)
throw std::runtime_error("Test check failed!!"); throw std::runtime_error("Test check failed!!");