Commit Graph

6 Commits

Author SHA1 Message Date
Roland Kaufmann
aa4b7979a7 Recognize Clang to be a GCC-compatible compiler
Clang aims to be compatible with GCC when it comes to command-line
parameters. Where we enable functionality based on the presence of
a GCC-compiler, we can use the same functionality with Clang.

This patch introduces a new variable CXX_COMPAT_GCC which is true if
the compiler handles the same options as GCC, and this variable is
subsequently used in tests instead of CMAKE_COMPILER_IS_GNUCXX (which
remains if we need to test if we really have GCC, e.g. for version)
2013-08-06 23:06:09 +02:00
Roland Kaufmann
56d3e1f8a4 Parse RHEL5 linker strings better 2013-07-05 13:18:53 +02:00
Roland Kaufmann
357db6c5e0 Add function to detect linker version
The linker that is used (ld vs. gold for instance) is often hidden
when using the compiler as a front-end (to include the correct
runtime libraries).

These functions enables us to probe the linker version and reports
its finding in the log.
2013-07-05 12:44:04 +02:00
Roland Kaufmann
c81bd58c3f Update regular expression to handle more variants
Older CentOS versions returns the version string on this format:

    gcc (aaa) x.y.z yyyymmdd (bbb)
2013-03-07 12:29:23 +01:00
Roland Kaufmann
bc4057a0d4 Provide function that identifies compiler to patch-level
Some distributions modify -dumpversion so that it only returns major
and minor numbers, not the patch level. This is usually OK for
determining features, but when debugging the output log, we really
want the full number.
2013-03-07 11:22:32 +01:00
Roland Kaufmann
be3f3385ad Provide compiler version as a separate macro 2013-02-11 23:08:29 +01:00