Skip to content

Commit 49dd45a

Browse files
committed
More tweaks for bulding
1 parent 03f85a4 commit 49dd45a

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ project(
1010
VERSION 0.0.0
1111
LANGUAGES CXX)
1212

13-
cmake_policy(VERSION 3.27)
14-
15-
set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets)
16-
1713
# Includes
1814
include(CTest)
1915
include(FetchContent)
2016

17+
set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets)
18+
2119
# Build the tests only if enabled via the CLI flag: BUILD_TESTING.
2220
if(BUILD_TESTING)
2321
# Fetch GoogleTest

src/Beman/Optional26/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
# cmake-format: on
55

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+
)
910

1011
include(GNUInstallDirs)
1112
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

src/Beman/Optional26/tests/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,16 @@ add_executable(optional_test
1515
detail/iterator.t.cpp
1616
)
1717

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+
)
1923

2024
# Issue #32: Re-enable ASAN run CI/clang-19
2125
# Note: clang-19 + gtest_discover_tests + Asan setup causes errors on some platforms.
2226
# 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+
)

0 commit comments

Comments
 (0)