File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,12 @@ project(
10
10
VERSION 0.0.0
11
11
LANGUAGES CXX)
12
12
13
- cmake_policy(VERSION 3.27)
14
-
15
- set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets)
16
-
17
13
# Includes
18
14
include (CTest)
19
15
include (FetchContent)
20
16
17
+ set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets)
18
+
21
19
# Build the tests only if enabled via the CLI flag: BUILD_TESTING.
22
20
if(BUILD_TESTING)
23
21
# Fetch GoogleTest
Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
4
# cmake-format: on
5
5
6
- add_library(beman_optional26 STATIC "")
7
-
8
- target_sources(beman_optional26 PRIVATE optional.cpp detail/iterator.cpp)
6
+ add_library(beman_optional26 STATIC
7
+ optional.cpp
8
+ detail/iterator.cpp
9
+ )
9
10
10
11
include (GNUInstallDirs)
11
12
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
Original file line number Diff line number Diff line change @@ -15,9 +15,16 @@ add_executable(optional_test
15
15
detail/iterator.t.cpp
16
16
)
17
17
18
- target_link_libraries(optional_test beman_optional26 GTest ::gtest GTest::gtest_main)
18
+ target_link_libraries(optional_test
19
+ beman_optional26
20
+ GTest ::gtest
21
+ GTest ::gtest_main
22
+ )
19
23
20
24
# Issue #32: Re-enable ASAN run CI/clang-19
21
25
# Note: clang-19 + gtest_discover_tests + Asan setup causes errors on some platforms.
22
26
# Temporary switch to gtest_add_tests and skip some Asan checks. Change also applied for CI flows.
23
- gtest_add_tests(optional_test "" AUTO)
27
+ gtest_add_tests(TARGET optional_test
28
+ ""
29
+ AUTO
30
+ )
You can’t perform that action at this time.
0 commit comments