Skip to content

Commit

Permalink
disable constexpr test when C++ version < 20
Browse files Browse the repository at this point in the history
  • Loading branch information
wusatosi committed Nov 21, 2024
1 parent cc75d2a commit 8799d0b
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions tests/beman/inplace_vector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ target_link_libraries(beman.inplace_vector.test PRIVATE beman.inplace_vector)

add_test(NAME beman.inplace_vector.test COMMAND beman.inplace_vector.test)

# constexpr test
add_executable(beman.inplace_vector.constexpr_test constexpr.test.cpp)
target_link_libraries(
beman.inplace_vector.constexpr_test
PRIVATE beman.inplace_vector
)
add_test(
NAME beman.inplace_vector.constexpr_test
COMMAND beman.inplace_vector.constexpr_test
)
if(CMAKE_CXX_STANDARD GREATER_EQUAL 20)
# constexpr test
add_executable(beman.inplace_vector.constexpr_test constexpr.test.cpp)
target_link_libraries(
beman.inplace_vector.constexpr_test
PRIVATE beman.inplace_vector
)
add_test(
NAME beman.inplace_vector.constexpr_test
COMMAND beman.inplace_vector.constexpr_test
)
else()
message(WARNING "C++20 or later is not enabled, skipping constexpr test.")
endif()

0 comments on commit 8799d0b

Please sign in to comment.