Browse Source

Merge pull request #88 from paulsapps/fix_85

Fix gcc warning by setting the C lang version
Alberto Demichelis 8 years ago
parent
commit
4df9f90385
1 changed files with 3 additions and 0 deletions
  1. 3 0
      sq/CMakeLists.txt

+ 3 - 0
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)