Skip to content

Commit

Permalink
Merge pull request #52 from camio/apply-directory-tests
Browse files Browse the repository at this point in the history
Apply [DIRECTORY.TESTS] and [FILE.TEST_NAMES]
  • Loading branch information
camio authored Oct 22, 2024
2 parents b0e3a3a + 32a2d8d commit 727a5c6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ endif()

add_subdirectory(src/beman/exemplar)

if(BUILD_TESTING)
add_subdirectory(tests/beman/exemplar)
endif()

add_subdirectory(examples)
13 changes: 0 additions & 13 deletions src/beman/exemplar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,3 @@ install(
RUNTIME DESTINATION $<$<CONFIG:Debug>:debug/>${CMAKE_INSTALL_BINDIR}
FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

if(BUILD_TESTING)
include(GoogleTest)

add_executable(beman.exemplar.tests)
target_sources(beman.exemplar.tests PRIVATE identity.t.cpp)
target_link_libraries(
beman.exemplar.tests
PRIVATE beman::exemplar GTest::gtest GTest::gtest_main
)

gtest_add_tests(beman.exemplar.tests "" AUTO)
endif()
12 changes: 12 additions & 0 deletions tests/beman/exemplar/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

include(GoogleTest)

add_executable(beman.exemplar.tests.identity)
target_sources(beman.exemplar.tests.identity PRIVATE identity.test.cpp)
target_link_libraries(
beman.exemplar.tests.identity
PRIVATE beman::exemplar GTest::gtest GTest::gtest_main
)

gtest_add_tests(beman.exemplar.tests.identity "" AUTO)
File renamed without changes.

0 comments on commit 727a5c6

Please sign in to comment.