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

NAKAMURA Takumi geek4civic at gmail.com
Wed Nov 7 16:29:51 PST 2012


Dmitri,

I rethought it might be simpler to tweak the global property,
CMAKE_C_FLAGS=-std=c89 (with gcc and clang).
Then Support/regex and libprofile_rt can be affected. It should be better.

I'll propose when I had a chance, later.

...Takumi



2012/11/7 Dmitri Gribenko <gribozavr at gmail.com>

> 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
>    )
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121107/424b844d/attachment.html>


More information about the cfe-commits mailing list