[PATCH] Check the consistency of the C and C++ compilers picked-up by cmake

Reid Kleckner rnk at google.com
Thu Jun 13 13:58:23 PDT 2013


The only usage of CMAKE_C(XX)_COMPILER_ID is for -fcolor-diagnostics.  Why
not use the feature testing macro add_flag_if_supported() used elsewhere in
the file?  I actually don't like those kinds of compiler tests because they
make configuration slow, but that's the dominant style for all the other
flag checking.


On Thu, Jun 13, 2013 at 4:42 PM, Arnaud A. de Grandmaison <
arnaud.adegm at gmail.com> wrote:

> From time to time, it happens that cmake picks up inconsistent C and C++
> compilers, especially for new comers or people not (yet) familiar with
> their
> development environment.
>
> This patch checks that both C and C++ compilers have the same ID (in cmake
> parlance) : Gnu, clang, ... This would catch gross mistakes at an early
> stage
> (configuration) instead of failing way later during compilation.
>
> I am wondering though if we have some environment where such a mismatch is
> expected. Any thoughts ?
>
> Cheers,
> --
> Arnaud A. de Grandmaison
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130613/0cec5f4d/attachment.html>


More information about the llvm-commits mailing list