Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply [DIRECTORY.TESTS] and [FILE.TEST_NAMES] #52

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)