Skip to content

Commit

Permalink
Add -std=c99 for C-Hashmap
Browse files Browse the repository at this point in the history
GCC on CentOS will default to C90, it seems. This means it needs C99
explicitly specified for C-Hashmap, or it will fail on using a variable
declaration in a for-loop.
  • Loading branch information
InfoTeddy committed Jul 12, 2024
1 parent 70ecac4 commit b929d65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions desktop_version/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ 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(${CHM_SRC} PROPERTIES COMPILE_FLAGS -std=c99)
endif()

# Unfortunately, it doesn't seem like distros package LodePNG
Expand Down

0 comments on commit b929d65

Please sign in to comment.