Browse Source

COMP: Need to enable ansi C features.

Brad King 18 năm trước cách đây
mục cha
commit
b3a05f57dd
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      Tests/Plugin/CMakeLists.txt

+ 5 - 0
Tests/Plugin/CMakeLists.txt

@@ -5,6 +5,11 @@ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/bin)
 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/plugin)
 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/plugin)
 SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/static)
 SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/static)
 
 
+# We need ansi C support.
+IF(CMAKE_ANSI_CFLAGS)
+  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
+ENDIF(CMAKE_ANSI_CFLAGS)
+
 # We need the dynamic loader support from KWSys to load the plugin in
 # We need the dynamic loader support from KWSys to load the plugin in
 # the executable.
 # the executable.
 SET(KWSYS_NAMESPACE kwsys)
 SET(KWSYS_NAMESPACE kwsys)