From 1286da2179124295d620c30f3c7c0fc089050493 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Fri, 4 Sep 2020 06:11:35 +0100 Subject: [PATCH] Updated test to use gtest instead of Catch2 --- src/CMakeLists.txt | 8 +++++++- src/Tensor.cpp | 4 ++-- test/CMakeLists.txt | 5 ++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d3df76d85..8367bedfe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,10 @@ -find_package(spdlog REQUIRED) + +if(KOMPUTE_OPT_ENABLE_SPDLOG) + find_package(spdlog REQUIRED) + find_package(fmt REQUIRED) +endif() + find_package(Vulkan REQUIRED) # In production builds all shaders are compiled into cpp files @@ -30,6 +35,7 @@ target_link_libraries( if(KOMPUTE_OPT_ENABLE_SPDLOG) target_link_libraries( kompute + fmt::fmt spdlog::spdlog ) endif() diff --git a/src/Tensor.cpp b/src/Tensor.cpp index e46b697c0..167b9aaab 100644 --- a/src/Tensor.cpp +++ b/src/Tensor.cpp @@ -1,8 +1,8 @@ #if DEBUG -#if KOMPUTE_SPDLOG_ENABLED +#if KOMPUTE_ENABLE_SPDLOG // Only enabled if spdlog is enabled -#include +#include #endif #endif diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3b11a7b18..923c04fb5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,9 +16,8 @@ target_include_directories( target_link_libraries(test_kompute PRIVATE GTest::gtest - GTest::gtest_main - GTest::gmock - GTest::gmock_main) + GTest::gtest_main) + target_link_libraries(test_kompute PRIVATE kompute) add_test(NAME test_kompute COMMAND test_kompute)