From c62aacd250727bce6792d4ef800e9881d8207830 Mon Sep 17 00:00:00 2001 From: paulm Date: Wed, 29 Mar 2017 13:21:39 +0100 Subject: [PATCH] Fix gcc warning by setting the C lang version --- sq/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sq/CMakeLists.txt b/sq/CMakeLists.txt index 2ce35c3..daadb2d 100644 --- a/sq/CMakeLists.txt +++ b/sq/CMakeLists.txt @@ -1,4 +1,7 @@ if(NOT DEFINED DISABLE_DYNAMIC) + if(CMAKE_COMPILER_IS_GNUCXX) + set_source_files_properties(sq.c PROPERTIES COMPILE_FLAGS -std=c99) + endif() add_executable(sq sq.c) set_target_properties(sq PROPERTIES LINKER_LANGUAGE C) target_link_libraries(sq squirrel sqstdlib)