AlexanderSaydakov commented on code in PR #478:
URL: https://github.com/apache/datasketches-cpp/pull/478#discussion_r2760733422
##########
common/test/CMakeLists.txt:
##########
@@ -75,12 +75,28 @@ target_sources(common_test
# now the integration test part
add_executable(integration_test)
-target_link_libraries(integration_test count cpc density fi hll kll req
sampling theta tuple common_test_lib)
-
-set_target_properties(integration_test PROPERTIES
- CXX_STANDARD 11
- CXX_STANDARD_REQUIRED YES
-)
+target_link_libraries(integration_test count cpc density fi hll kll req
sampling theta tuple quantiles common_test_lib)
+
+# Use C++17 if CMAKE_CXX_STANDARD is set to 17+, otherwise C++11
+# This allows hardening tests to use std::optional with libc++ hardening
+if(DEFINED CMAKE_CXX_STANDARD)
+ if(CMAKE_CXX_STANDARD MATCHES "17|20|23")
Review Comment:
this seems overcomplicated
CXX_STANDARD is set to ${CMAKE_CXX_STANDARD} if defined, otherwise to 11
CXX_STANDARD_REQUIRED YES - this is set in any case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]