[cfe-commits] r167561 - /cfe/trunk/tools/c-index-test/CMakeLists.txt

Dmitri Gribenko gribozavr at gmail.com
Wed Nov 7 15:52:26 PST 2012


Author: gribozavr
Date: Wed Nov  7 17:52:25 2012
New Revision: 167561

URL: http://llvm.org/viewvc/llvm-project?rev=167561&view=rev
Log:
Force C89 for c-index-test.c

MSVC supports only C89, so it is important to keep c-index-test.c
buildable with C89.  However, Clang defaults to C99, so while building
Clang with Clang one can introduce C99 constructs into c-index-test.c
without noticing.

Thanks to Nakamura Takumi for helping with MSVC bits.

Modified:
    cfe/trunk/tools/c-index-test/CMakeLists.txt

Modified: cfe/trunk/tools/c-index-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/CMakeLists.txt?rev=167561&r1=167560&r2=167561&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/c-index-test/CMakeLists.txt Wed Nov  7 17:52:25 2012
@@ -7,6 +7,13 @@
   c-index-test.c
   )
 
+if(NOT MSVC)
+  set_property(
+    SOURCE c-index-test.c
+    PROPERTY COMPILE_FLAGS "-std=c89"
+    )
+endif()
+
 target_link_libraries(c-index-test
   libclang
   )





More information about the cfe-commits mailing list