CMake 3.10.0: Clang 5 with -std=gnu++1z problem
It seems like some versions of clang 5 (with libc++) have problem with
#include <unordered_map> when
-std=gnu++1z option has been given. In such case, compiler fails with:
/usr/include/c++/__hash_table:1134:43: error: conflicting types for '__hash_table<_Tp, _Hash, _Equal, _Alloc>'
To fix it, fall back to older C++ standards. The following patch fixes the problem:
--- bootstrap.orig +++ bootstrap @@ -1056,6 +1056,7 @@ TMPFILE=`cmake_tmp_file` echo ' #include <iostream> #include <memory> +#include <unordered_map> #if __cplusplus < 201103L #error "Compiler is not in a mode aware of C++11."
I incorporated the fix in
cmake package for PkgSrc.org: [http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/devel/cmake/patches/patch-bootstrap?rev=1.1&content-type=text/plain&only_with_tag=MAIN]