[PATCH] CMake/Autoconf : perform a sanity check on the compiler support for C++11

Arnaud Allard de Grandmaison arnaud.adegm at gmail.com
Wed Nov 27 02:45:43 PST 2013


Hi All,

For now, llvm is not built in C++11 by default. This can hovever be
activated with each one's favorite configuration tool :

> configure --enable-cxx11 ...
or
> cmake -DLLVM_ENABLE_CXX11:BOOL=ON ...

The attached patch adds some sanity check on the compiler revision to both
cmake and configure, so that we fail early (i.e. configure time) and
clearly when the compiler's revision is known not to fit our requirements
for C++11 support. The revisions have been extracted from the thread
initiated by Chandler on cfe-dev/llvm-dev:
 - g++ >= 4.7.1
 - clang++ >= 3.1
 - VS >= 2012

If the user's compiler is not in the above troika, then we simply trust the
user knows what he does...

Although I did my best to handle the windows case, I do not have such a
platform handy, and could not test it : I would appreciate comments/tests
on the windows related part.

The logical follow-up to this patch would be to make the sanity check
unconditionnal once we have decided to switch to C++11. Until then, the
checks can be validated in the different environments and tuned accordingly.

Cheers,
--
Arnaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131127/ef5a3768/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-CMake-Autoconf-perform-a-sanity-check-on-the-compile.patch
Type: text/x-patch
Size: 18629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131127/ef5a3768/attachment.bin>


More information about the llvm-commits mailing list