diff --git a/CMakeLists.txt b/CMakeLists.txt index 722d944e..01518aa0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,9 @@ set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +if(${CMAKE_CXX_COMPILER} NOT STREQUAL "") + set(CMAKE_CXX_STANDARD 17) +endif(${CMAKE_CXX_COMPILER} NOT STREQUAL "") if(CMAKE_GENERATOR MATCHES "Unix Makefiles|Ninja") # some LSP servers expect compile_commands.json in the project root