From 8c2ab7f853c1b5bcc7866babdce55b5db1302384 Mon Sep 17 00:00:00 2001 From: Florian Becker Date: Fri, 16 Feb 2024 17:45:31 +0100 Subject: [PATCH] Fix windows clang build --- cmake/env.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/env.cmake b/cmake/env.cmake index 76eac56..6a4ea58 100644 --- a/cmake/env.cmake +++ b/cmake/env.cmake @@ -54,7 +54,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" OR CMAKE_C_SIMULATE_ID STREQUAL "MSVC") check_c_compiler_flag(/std:c23 HAVE_FLAG_STD_C23) check_c_compiler_flag(/std:c17 HAVE_FLAG_STD_C17) # Visual Studio 2019 will have clang-12, Visual Studio will have clang-15, but cmake do not know how to set the standard for that. - if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_VERSION VERSION_LESS 16.0) + if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0) set(HAVE_FLAG_STD_C23 OFF) endif() else()