From: Dmitri Gribenko Date: Wed, 7 Nov 2012 23:52:25 +0000 (+0000) Subject: Force C89 for c-index-test.c X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fcad0947c984539f6284665faa3c5dffc4fb789;p=platform%2Fupstream%2Fllvm.git 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. llvm-svn: 167561 --- diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt index 6379194..6f28c54 100644 --- a/clang/tools/c-index-test/CMakeLists.txt +++ b/clang/tools/c-index-test/CMakeLists.txt @@ -7,6 +7,13 @@ add_clang_executable(c-index-test 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 )