Skip to content

Commit 39953e7

Browse files
committed
Apply the Beman Standard: CMAKE.TARGET_NAMES
1 parent fb6f50c commit 39953e7

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

examples/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@ set(EXAMPLES sample)
88

99
foreach(example ${EXAMPLES})
1010
# Add example executable.
11-
add_executable(${example} "")
11+
add_executable(beman.iterator_interface.examples.${example} "")
1212

1313
# Add example source file.
14-
target_sources(${example} PRIVATE ${example}.cpp)
14+
target_sources(beman.iterator_interface.examples.${example}
15+
PRIVATE ${example}.cpp)
1516

1617
# Link example with the library.
17-
target_link_libraries(${example} beman::iterator_interface)
18+
target_link_libraries(beman.iterator_interface.examples.${example}
19+
beman::iterator_interface)
1820

1921
# Install.
2022
install(
21-
TARGETS ${example}
22-
COMPONENT beman_iterator_interface_examples
23+
TARGETS beman.iterator_interface.examples.${example}
24+
COMPONENT beman.iterator_interface.examples
2325
DESTINATION ${CMAKE_INSTALL_BINDIR})
2426
endforeach()

tests/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,22 @@
55

66
include(GoogleTest)
77

8-
# Tests
9-
add_executable(beman_iterator_interface_test)
8+
add_executable(beman.iterator_interface.tests)
109

11-
target_sources(beman_iterator_interface_test
10+
target_sources(beman.iterator_interface.tests
1211
PRIVATE iterator_interface.test.cpp)
1312

1413
target_sources(
15-
beman_iterator_interface_test
14+
beman.iterator_interface.tests
1615
PRIVATE FILE_SET beman_iterator_interface_test_headers TYPE HEADERS)
1716

1817
target_link_libraries(
19-
beman_iterator_interface_test PRIVATE beman::iterator_interface GTest::gtest
20-
GTest::gtest_main)
18+
beman.iterator_interface.tests PRIVATE beman::iterator_interface GTest::gtest
19+
GTest::gtest_main)
2120

2221
# Issue #32: Re-enable ASAN run CI/clang-19.
2322
#
2423
# Note: clang-19 + gtest_discover_tests + Asan setup causes errors on some
2524
# platforms. Temporary switch to gtest_add_tests and skip some Asan checks.
2625
# Change also applied for CI flows.
27-
gtest_add_tests(TARGET beman_iterator_interface_test "" AUTO)
26+
gtest_add_tests(TARGET beman.iterator_interface.tests "" AUTO)

tests/iterator_interface.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/beman/iterator_interface/iterator_interface.y.cpp -*-C++-*-
1+
// tests/iterator_interfaces.test.cpp -*-C++-*-
22
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
33

44
#include <beman/iterator_interface/iterator_interface.hpp>

0 commit comments

Comments
 (0)