Commit Graph

26 Commits

Author SHA1 Message Date
Brad King
12cf0a8e48 Merge topic 'armcc-compiler-id'
8f8d056051 ARMCC: Fix identification of ARM compiler when it defines GNU macros

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3127
2019-03-21 09:40:09 -04:00
Brad King
8f8d056051 ARMCC: Fix identification of ARM compiler when it defines GNU macros
According to ARMCC 5.06 documentation:

    http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359125007083.html

the compiler may define `__GNUC__` in addition to `__ARMCC_VERSION`.
Re-order our preprocessor checks to consider the ARM-specific macro
first so that the ARM compiler is not mistaken for a GNU compiler.

Fixes: #19065
2019-03-20 11:20:39 -04:00
Brad King
9a5fe96f4f Merge topic 'drop-MIPSpro'
e21bae378d WCDH: Restore definition for <prefix>_COMPILER_IS_MIPSpro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3043
2019-03-01 08:51:50 -05:00
Brad King
e21bae378d WCDH: Restore definition for <prefix>_COMPILER_IS_MIPSpro
Code removed for MIPSpro by commit 214fcefa52 (Remove now-unused code
once used for MIPSpro on IRIX, 2019-02-21) actually changed a
public-facing API by dropping the `<prefix>_COMPILER_IS_MIPSpro`
definition from the generated compiler detection header.  Restore the
definition hard-coded to `0` since the compiler will never be MIPSpro.

Reported-by: Hans Johnson <hans-johnson@uiowa.edu>
2019-02-28 11:34:36 -05:00
Chuck Atkins
90c6156aa8 XLClang: Add a new compiler ID for the clang-based XL compiler 2019-02-25 08:24:28 -05:00
Brad King
214fcefa52 Remove now-unused code once used for MIPSpro on IRIX
In commit beb991110d (Remove now-unused code once used on IRIX,
2019-01-11, v3.14.0-rc1~167^2) we removed remnants of IRIX support.
Also remove remnants of MIPSpro compiler support.
2019-02-21 11:12:51 -05:00
Fred Baksik
72e0c115b7 GHS: Add Compiler ID detection
-- Detect GHS compiler and version
   Detect ARCHITECTURE_ID for PPC / ARM / 86 targets
   Detect PLATFORM_ID for Integrity and Integrity178 platforms
   Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86
-- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator
   Works around issue with some GHS compilers not setting __ghs__ compiler define
-- Tweak Compiler ID checking so major id of 002017 is not replaced with 217
-- Prefer try_compile() library targets when testing for working GHS compilers
-- Avoid CMake errors if reading past end of file for checking if file is PE executable
2019-01-16 10:42:04 -05:00
Brad King
beb991110d Remove now-unused code once used on IRIX
We dropped support for IRIX as a host platform long ago.
Remove some leftover code.
2019-01-11 13:50:46 -05:00
Daniel Pfeifer
9e24af0137 Use string(APPEND) in Modules
Automate with:

find Modules -type f -print0 | xargs -0 perl -i -0pe \
  's/set\(([a-zA-Z0-9_\$\{\}]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
2017-05-17 11:26:11 -06:00
Daniel Pfeifer
d6877e6c40 Don't include CMakeParseArguments
The cmake_parse_arguments command is builtin with version 3.5.
The CMakeParseArguments module is empty and exists for backwards
compatibility with CMake 3.4 and lower.

Remove the includes of CMakeParseArguments from CMake's modules.
The modules are always used with the current version of CMake.

Leave the includes in the tests, as the tests may be run with an older
version of CMake.
2017-01-11 13:14:57 +01:00
Michael Stürmer
5c6c0344d3 C# support: add compiler detection for MSVC 2016-12-15 09:16:30 -05:00
Robert Maynard
4f5155f6ab CUDA: We now properly perform CUDA compiler identification. 2016-11-14 11:36:43 -05:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Daniel Pfeifer
5d0d980d99 Use string(APPEND) in Modules
Automate with:

find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
2016-07-28 00:41:13 +02:00
Paweł Stankowski
53c0dc2dd2 Add support for Bruce C Compiler (BCC)
Revise C compiler detection code to be K&R compatible.
2016-03-21 10:51:50 -04:00
Joakim Andersson
035a658f4f Add support for the ARM Compiler (arm.com)
Create an `ARMCC` compiler id corresponding to compilers identified and
versioned by the `__ARMCC_VERSION` predefined macro.  See documentation
for the compilers at

 http://infocenter.arm.com/help/topic/com.arm.doc.set.swdev/index.html
2015-11-02 13:45:24 -05:00
Erik Lindahl
0578c283e8 Add Fujitsu compiler detection
The Fujitsu C/C++ compilers are the default ones for K computer.
Detect both native and cross compilers by looking for the __FUJITSU
preprocessor definition.
2014-08-11 10:31:06 -04:00
Stephen Kelly
627ad96bd3 Project: Detect other compilers before detecting Clang.
Commit v2.8.10.1~5^2 (Fix PathScale compiler id for Clang-based
upstream, 2012-11-05) re-ordered the detection logic for PathScale.

Other compiler vendors are also producing Clang-based frontends, so
detect "actual" Clang as one of the last compilers to allow for others
doing the same.

    http://llvm.org/devmtg/2014-04/PDFs/Posters/ClangIntel.pdf
    http://docwiki.embarcadero.com/RADStudio/XE5/en/Clang-based_C%2B%2B_Compilers
2014-06-13 18:50:10 +02:00
Stephen Kelly
b70295760c Project: Add configurable name for version computation macros. 2014-06-05 14:02:52 +02:00
Stephen Kelly
78acaafebe Project: Separate simulated compiler id from version detection. 2014-06-05 14:02:52 +02:00
Stephen Kelly
3b59f8b7c6 Project: Refactor C compiler determination into multiple files. 2014-05-07 14:28:36 +02:00
Stephen Kelly
8896501b23 CompilerId: Allow specifying a prefix for preprocessor defines. 2014-05-07 14:00:01 +02:00
Stephen Kelly
23f451bb33 CompilerId: Guard the platform-default compiler code with a parameter. 2014-05-07 14:00:00 +02:00
Stephen Kelly
30a99f5c06 CompilerId: Add option to generate compiler-id-specific defines. 2014-05-07 14:00:00 +02:00
Stephen Kelly
36ed589484 CompilerId: Allow specifying the compiler-specific components to generate. 2014-05-07 14:00:00 +02:00
Stephen Kelly
9a083bce83 Project: Split the compiler id detection into a separate function.
This can be extended with parameters to control the output and re-used
in other contexts.
2014-05-07 14:00:00 +02:00