From 275247e5f49b20a9a24ab09f73a4f6227b4e09a2 Mon Sep 17 00:00:00 2001 From: Raphael Riebl Date: Mon, 15 Jan 2024 17:03:46 +0100 Subject: [PATCH] socktap: Protobuf v22.0 and later seem to require C++17 --- tools/socktap/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/socktap/CMakeLists.txt b/tools/socktap/CMakeLists.txt index 2ee60a825..e7ff76b15 100644 --- a/tools/socktap/CMakeLists.txt +++ b/tools/socktap/CMakeLists.txt @@ -37,7 +37,10 @@ if (SOCKTAP_WITH_CUBE_EVK) target_sources(socktap PRIVATE nfiniity_cube_evk_link.cpp nfiniity_cube_evk.cpp) target_include_directories(socktap PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(socktap PUBLIC protobuf::libprotobuf) - set_property(TARGET socktap PROPERTY CXX_STANDARD 17) + + if (Protobuf_VERSION VERSION_GREATER_EQUAL "22.0") + set_property(TARGET socktap PROPERTY CXX_STANDARD 17) + endif() endif() option(SOCKTAP_WITH_AUTOTALKS "Use Autotalks API for socktap" OFF) # Both Secton and Craton devices