Add secondary libstdc++ 4.8 and 5.1 detection mechanisms
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Thu, 7 Mar 2019 21:28:33 +0000 (21:28 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Thu, 7 Mar 2019 21:28:33 +0000 (21:28 +0000)
commit51dcfdbba334fbd6c84fdf652023106d6714c73b
treef61365bf7604a65e9d95c54b86f27714157ebce5
parent29e8754172031ed217d25e3de0bc4047192a3453
Add secondary libstdc++ 4.8 and 5.1 detection mechanisms

Summary:
The date-based approach to detecting unsupported versions of libstdc++
does not handle bug fix releases of older versions. As an example, the
`__GLIBCXX__` value associated with version 5.1, `20150422`, is less
than the values associated with versions 4.8.5 and 4.9.3.

This patch adds secondary checks based on certain properties in
sufficiently new versions of libstdc++.

Reviewers: jfb, tstellar, rnk, sfertile, nemanjai

Reviewed By: jfb

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58682

llvm-svn: 355638
llvm/cmake/modules/CheckCompilerVersion.cmake