Skip to content

Commit b51ed34

Browse files
committed
Prevent undefined cmake values
1 parent 73699b1 commit b51ed34

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ target_compile_features(
6565
)
6666

6767
# export cmake config package
68-
6968
set(TARGET_NAME inplace_vector)
7069
set(TARGET_NAMESPACE beman)
71-
set(TARGET_ALIAS ${TARGET_NAMESPACE}::${TARGET_LIBRARY})
72-
set(TARGET_PREFIX ${TARGET_NAMESPACE}.${TARGET_NAME})
70+
set(TARGET_ALIAS ${TARGET_NAMESPACE}::${TARGET_NAME})
71+
set(TARGET_PREFIX ${TARGET_NAMESPACE}.${TARGET_NAME}) # -> PROJECT_NAME?
7372
set(TARGET_PACKAGE_NAME ${TARGET_NAME}-config)
7473
set(TARGETS_EXPORT_NAME ${TARGET_NAME}-targets)
7574
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET_NAME})

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.25...3.31)
55
project(beman_inplace_vector_example LANGUAGES CXX)
66

77
if(PROJECT_IS_TOP_LEVEL)
8-
find_package(beman_inplace_vector 1.0.0 EXACT REQUIRED)
8+
find_package(inplace_vector 1.0.0 EXACT REQUIRED)
99
enable_testing()
1010
endif()
1111

tests/beman/inplace_vector/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ add_test(NAME beman.inplace_vector.test COMMAND beman.inplace_vector.test)
1414
# NOTE: For an INTERFACE library and multi config generators, we may always use
1515
# the -C Debug config type instead of $<CONFIG> to prevent problems! CK
1616
if(CMAKE_BUILD_TYPE STREQUAL Debug)
17+
if(NOT DEFINED CMAKE_CXX_STANDARD)
18+
set(CMAKE_CXX_STANDARD 20)
19+
endif()
20+
if(NOT DEFINED CMAKE_PREFIX_PATH)
21+
set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
22+
endif()
1723
add_test(
1824
NAME find-package-test
1925
COMMAND

0 commit comments

Comments
 (0)