Skip to content

Commit 3ef7d64

Browse files
author
Mahesh Pai
committed
Review comments
1 parent ba2aa69 commit 3ef7d64

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

common/test/CMakeLists.txt

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,26 +77,15 @@ add_executable(integration_test)
7777

7878
target_link_libraries(integration_test count cpc density fi hll kll req sampling theta tuple quantiles common_test_lib)
7979

80-
# Use C++17 if CMAKE_CXX_STANDARD is set to 17+, otherwise C++11
81-
# This allows hardening tests to use std::optional with libc++ hardening
80+
# Use CMAKE_CXX_STANDARD if defined, otherwise C++11
81+
set(_integration_cxx_standard 11)
8282
if(DEFINED CMAKE_CXX_STANDARD)
83-
if(CMAKE_CXX_STANDARD MATCHES "17|20|23")
84-
set_target_properties(integration_test PROPERTIES
85-
CXX_STANDARD ${CMAKE_CXX_STANDARD}
86-
CXX_STANDARD_REQUIRED YES
87-
)
88-
else()
89-
set_target_properties(integration_test PROPERTIES
90-
CXX_STANDARD 11
91-
CXX_STANDARD_REQUIRED YES
92-
)
93-
endif()
94-
else()
95-
set_target_properties(integration_test PROPERTIES
96-
CXX_STANDARD 11
97-
CXX_STANDARD_REQUIRED YES
98-
)
83+
set(_integration_cxx_standard ${CMAKE_CXX_STANDARD})
9984
endif()
85+
set_target_properties(integration_test PROPERTIES
86+
CXX_STANDARD ${_integration_cxx_standard}
87+
CXX_STANDARD_REQUIRED YES
88+
)
10089

10190
add_test(
10291
NAME integration_test

0 commit comments

Comments
 (0)