From 9f4e2cce920e915ea3d80da243ad6db26028b5d7 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Wed, 4 Jan 2023 22:40:59 +0700
Subject: [PATCH 2/3] tests/CMakeLists.txt: require C++17

---
 tests/CMakeLists.txt | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index baf1200..007d586 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -21,13 +21,28 @@ add_executable(${PROJECT_NAME}
         main.cpp
 )
 
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
 target_compile_features(${PROJECT_NAME}
         PRIVATE
             cxx_std_17
 )
 
-if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+    target_compile_options(${PROJECT_NAME}
+            PRIVATE
+                -std=gnu++17
+    )
+else()
     target_compile_options(${PROJECT_NAME}
+            PRIVATE
+                -std=c++17
+    )
+endif()
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+    add_compile_options(${PROJECT_NAME}
             PRIVATE
                 -Wall -Wextra -Werror -ansi -pedantic
     )
-- 
2.39.0

