From 8cd9dcb8c17766d9e96c1136ed4565d6b6fe1ebd Mon Sep 17 00:00:00 2001 From: Mika Pi Date: Sun, 15 Dec 2024 00:43:30 -0800 Subject: [PATCH] Fix compilation on Pop!_OS 22.04 LTS CUDA Downgrade the C++ version from 17 to 14, and also update the code to remove compilation warnings. --- ggml/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ggml/CMakeLists.txt b/ggml/CMakeLists.txt index 61fe15a15f..8ebb0c781b 100644 --- a/ggml/CMakeLists.txt +++ b/ggml/CMakeLists.txt @@ -219,7 +219,11 @@ option(GGML_BUILD_EXAMPLES "ggml: build examples" ${GGML_STANDALONE}) set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED true) -set(CMAKE_CXX_STANDARD 17) +if (GGML_SYCL) + set(CMAKE_CXX_STANDARD 17) +else() + set(CMAKE_CXX_STANDARD 14) +endif() set(CMAKE_CXX_STANDARD_REQUIRED true) set(THREADS_PREFER_PTHREAD_FLAG ON)