fix: Fix broken GCC 16 build (enforce C11/C++17 compile ) (#1478)

This commit is contained in:
cphlipot 2026-05-16 01:10:16 -07:00 committed by GitHub
parent 686856edca
commit db08b84607
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,6 +69,12 @@ option(SD_BUILD_SHARED_GGML_LIB "sd: build ggml as a separate shared lib" O
option(SD_USE_SYSTEM_GGML "sd: use system-installed GGML library" OFF)
#option(SD_BUILD_SERVER "sd: build server example" ON)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED true)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED true)
if(SD_CUDA)
message("-- Use CUDA as backend stable-diffusion")
set(GGML_CUDA ON)