CMake - set C++17 as the minimum required version (34676a567)

Currently IfcOpenShell doesn't compile for C++14 (it stumbles upon `invoke_result_t` in XmlSerializer.cpp) and I'm not sure if it's needed.
This commit is contained in:
Andrej730
2025-06-17 14:38:15 +05:00
parent 9282ccabb3
commit a733f36576
+6
View File
@@ -18,6 +18,12 @@
################################################################################
cmake_minimum_required(VERSION 3.21)
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
if (CMAKE_CXX_STANDARD LESS 17)
message(FATAL_ERROR "C++17 or newer is required.")
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON) # not necessary, but encouraged
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)