Look for ext/hash_map and unordered_map instead of checking gcc's version.

Authored by rakuco on May 28 2012, 6:30 PM.

Description

Look for ext/hash_map and unordered_map instead of checking gcc's version.

Follow-up to commits 3455de70d45a260607e1a4aa992a507ab979cd48 and
321e7c40bfbe838eb0a8354ff388cd88689166f9. The decision of whether to
include <ext/hash_map> or <unordered_map> for gcc/clang was based on
whether gcc > 4.3 was installed or whether clang was being used. The
latter implicitly assumed a recent enough libstdc++ version (ie. >=
4.3) was being used, which might not be the case on systems such as
FreeBSD and possibly OS X.

Instead of checking for compiler versions, we now look for these
headers: CMake first detects whether <unordered_map> is present and,
in case it is not, it looks for <ext/hash_map>. The checks in
language/editor/modificationrevision.cpp have been updated as
well. This should cover all the cases being previously detected, as
well as fix the checks for FreeBSD and other systems where the build
was failing before with clang.

Reviewed-by: Millian Wolff
REVIEW: 105066

Details

Committed
rakucoMay 28 2012, 6:30 PM
Parents
R32:57abc9df0c35: Add missing include to fix the build with recent GCCs.
Branches
Unknown
Tags
Unknown