From b0d2a6a3720cbba90696c01beb9b44abf7583578 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 11 Jul 2024 23:35:20 -0700 Subject: [PATCH] Add -std=c99 for C-Hashmap and FAudio GCC on CentOS will default to C90, it seems. This means it needs C99 explicitly specified for C-Hashmap and FAudio, or it will fail on them using C99 features (variable declaration in a `for`-loop and the `restrict` keyword, respectively). --- desktop_version/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop_version/CMakeLists.txt b/desktop_version/CMakeLists.txt index ebc72bb9..ad619344 100644 --- a/desktop_version/CMakeLists.txt +++ b/desktop_version/CMakeLists.txt @@ -318,6 +318,10 @@ else() # Disable RTTI string(REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set_source_files_properties(${VVV_CXX_SRC} PROPERTIES COMPILE_FLAGS -fno-rtti) + + # Dependencies (as needed) + set_source_files_properties(${FAUDIO_SRC} PROPERTIES COMPILE_FLAGS -std=c99) + set_source_files_properties(${CHM_SRC} PROPERTIES COMPILE_FLAGS -std=c99) endif() # Unfortunately, it doesn't seem like distros package LodePNG