Skip to content

Commit

Permalink
rework Cmake list to properly discover all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
felixschurk committed Dec 20, 2023
1 parent 2b955bb commit 118f721
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.16)
SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

PROJECT(sisc-lab
project(sisc-lab
LANGUAGES CXX
)

Expand All @@ -10,7 +10,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(FetchContent)

ADD_SUBDIRECTORY(src)
add_subdirectory(src)

FetchContent_Declare(
googletest
Expand Down
6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
enable_testing()
include(GoogleTest)

add_library(libutilities
utilities.cpp
Expand All @@ -21,6 +22,7 @@ target_link_libraries(utilities.test
libutilities
GTest::gtest_main
)
gtest_discover_tests(utilities.test)

add_executable(SimpleConfigFile.test
SimpleConfigFile.test.cpp)
Expand All @@ -29,7 +31,5 @@ target_link_libraries(SimpleConfigFile.test
libutilities
GTest::gtest_main
)
gtest_discover_tests(SimpleConfigFile.test)

include(GoogleTest)
gtest_discover_tests(utilities.test
SimpleConfigFile.test)

0 comments on commit 118f721

Please sign in to comment.