| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In commit v3.4.0-rc1~71^2 (Project: Determine default language dialect
for the compiler, 2015-09-15) we added an "INFO:..." string to the
compiler id detection binary. The value can be optimized out of the
compiler id binary unless we force it to be included by making the
program behavior depend on it at runtime. Add references to the value
as we do for the other info strings already.
Gentoo-Issue: https://bugs.gentoo.org/show_bug.cgi?id=565744
|
|
|
|
|
|
| |
Use the __cplusplus and __STDC_VERSION__ macros to automatically
determine the default dialect for the compiler while determining its
id and version.
|
|
|
|
|
|
|
| |
In commit v3.1.0-rc1~113^2 (Use a more reliable regex for extracting
binary INFO strings, 2014-09-03) the matching of INFO: strings was made
more strict and no longer matches just "INFO:qnxnto". Use
"INFO:qnxnto[]" instead to conform to the new pattern.
|
|
|
|
|
|
| |
This will allow sharing of the logic of the order to test compilers in
and the preprocessor macros used to do that and to determine the
version components.
|
| |
|
|
|
|
|
|
| |
Distinguish "Open Watcom" from old "Watcom" by introducing a new
"OpenWatcom" compiler id. The __WATCOMC__ format is "VVRP" for Watcom
and "VVRP + 1100" for Open Watcom.
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the Intel release notes:
http://software.intel.com/sites/default/files/l-compiler-release-update.pdf
the __INTEL_COMPILER_UPDATE predefined macro was introduced to hold the
third version component.
Reported-by: Dirk Ribbrock <dirk.ribbrock@mathematik.uni-dortmund.de>
Co-Author: Rolf Eike Beer <kde@opensource.sf-tec.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce policy CMP0047 to control resetting the id for
compatibility.
De-duplicate content in the QNX platform file by including the GNU
one. QNX is a form of GNU platform.
Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables. They
are populated again later by the Compiler/GNU.cmake file anyway.
Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC
compiler id is in use, and the language is CXX. Use the QNX
recommended flag for QCC instead of the gcc compatible -x flag.
Populate new module files to handle system includes and depfiles
when using the QCC compiler.
Remove code which unsets the system include and depfiles related
variables. When a GNU driver is used instead of the QCC one, the
appropriate flags will be used. These variables were previously
cleared for lowest-common-denominator compatibility with both
drivers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All generators now support detection of the full path to the compiler, so
require it to be so. This will allow CMake<LANG>Information.cmake and
other logic to assume the full path to the compiler tool is available.
The Makefile generators already rejected CMAKE_<LANG>_COMPILER values
that did not name an existing compiler. Extend this error message to
all generators, make it occur as early as possible, and improve the
message with advice about how to set the compiler. If the full path to
the compiler is not known, finish enabling languages with a fatal error
so configuration does not continue.
For now, allow the RC language compiler to not be a full path. Later we
will need to detect the full path to "rc" under the VS IDE.
Add a RunCMake.CompilerNotFound test to cover failure cases.
Fix the RunCMake.CompilerChange test EmptyCompiler case to work
when configuration does not continue past enable_language.
|
|
|
|
|
|
|
|
|
| |
Teach CMake(C|CXX|Fortran)CompilerId* to report the MSVC version
simulated by the Intel compiler, if any. Refactor the Windows-Intel
platform information helper module to load Windows-MSVC instead of
duplicating the information. Teach Windows-MSVC to understand when
it is loaded as the simulated Fortran compiler (its preprocessor is
simulated).
|
|\
| |
| |
| |
| |
| |
| | |
1763c31 Set policy CMP0025 to NEW while building CMake itself
aa53ee5 Add policy CMP0025 for Apple Clang compiler id compatibility
ab65862 Clang: Add separate "AppleClang" compiler id
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apple distributes their own Clang build with their own version numbers
that differ from upstream Clang. Use the __apple_build_version__ symbol
to identify the Apple Clang compiler and report the Apple Build Version
as the fourth version component in CMAKE_<LANG>_COMPILER_VERSION. Add
Compiler/AppleClang-<lang> and Platform/Darwin-AppleClang-<lang> modules
that simply include the upstream equivalents.
Fix comparisons of CMAKE_<LANG>_COMPILER_ID to Clang in CMake's own
source and tests to account for AppleClang.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Teach the compiler identification preprocessor tests to report when
Clang simulates MSVC, and what version. If not MSVC, assume GNU.
Teach compiler information modules Clang-(C|CXX) to recognize when Clang
simulates MSVC and skip loading the GNU information.
Teach the Windows-MSVC platform information to recognize when it is
loaded as the simulated compiler and use that version information
instead of the real compiler's (different) version scheme.
Add platform modules Windows-Clang-(C|CXX) and support module
Windows-Clang to load either Windows-MSVC or Windows-GNU and wrap
the corresponding information macros.
|
|/
|
|
|
|
|
|
|
| |
Some compilers try to simulate other compilers as a drop-in replacement
supporting all the same command-line options and predefined preprocessor
macros. In such cases it will be useful to have CMake load the compiler
information files for the simulated compiler instead of duplicating the
information. Teach CMakeDetermineCompilerId to extract the simulated
compiler id and version when the compiler id detection provides it.
|
|
|
|
|
|
|
| |
With the AVR IAR compiler this can't be found, but it works e.g. for the
ARM AVR compiler.
Alex
|
|
|
|
|
|
| |
Additionally, look for a special ar and strip
Alex
|
|
|
|
|
| |
Set the entry point to mainACRTStartup to make sure that main()
can be found when linking the application to check the compiler.
|
|
|
|
|
|
| |
Add a dummy mainCRTStartup() function, since the linker searches for
it instead of main() and set the CMAKE_SYSTEM_* variables depending
on the MSVC_C_ARCHITECTURE_ID and CMAKE_VS_WINCE_VERSION variables.
|
|
|
|
|
|
|
| |
Upstream PathScale now uses Clang as its front-end. Test for __PATHCC__
before __clang__.
Reported-by: C. Bergström <cbergstrom@pathscale.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decode hex digits from __VISUALDSPVERSION__ to compute the version
number components. Note that the constant encodes decimal digits as hex
digits (never larger than 9). We represent them as decimal after
extraction. See documentation at:
http://download.analog.com/dsp/tools/VisualDSP_45_Update_6_Release_Note_v4.pdf
http://www.analog.com/static/imported-files/software_manuals/50_asm_man.rev3.1.pdf
Note that __VISUALDSPVERSION__ was introduced in version 4.5.6.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from
_RELEASE
_RELEASE_MINOR
to compute version number components. See documentation at:
http://docs.cray.com/books/S-2179-52/html-S-2179-52/zfixed5fvzxnxo.html
http://sourceforge.net/p/predef/wiki/Compilers/#cray-c
|
|
|
|
|
|
|
|
| |
Decode decimal digits from __COMO_VERSION__ to compute the version
number components. See documentation at:
http://www.comeaucomputing.com/4.0/docs/userman/predefs.html
http://sourceforge.net/p/predef/wiki/Compilers/#comeau-chttpenwikipediaorgwikicomeau_cc2b2b
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from __TI_COMPILER_VERSION__ to compute version
number components. See documentation at:
http://processors.wiki.ti.com/index.php/Refer_to_Compiler_Version_in_Your_Source
http://www.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=spru187o
http://sourceforge.net/p/predef/wiki/Compilers/#texas-instruments-cc-compiler
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from
__PATHCC__
__PATHCC_MINOR__
__PATHCC_PATCHLEVEL__
to compute version number components. See documentation at:
http://www.pathscale.com/docs/UserGuide.pdf
http://sourceforge.net/p/predef/wiki/Compilers/#ekopathhttpenwikipediaorgwikipathscale
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from __DECC_VER and __DECCXX_VER to compute
version number components. See documentation at:
http://www.openvms.compaq.com/commercial/c/docs/5492p024.html#decc_ver_sec
http://www.tru64unix.compaq.com/cplus/ugu_impl.html#predef_vernum
http://sourceforge.net/p/predef/wiki/Compilers/#compaq-cchttpwwwopenvmscompaqcomopenvmsbrochuresdeccplus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Borland compiler was re-branded as CodeGear during 2007-2009 and
since 2009 is the Embarcadero compiler. They offer predefined macros:
http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros
and distinguish themselves by __CODEGEARC__ and __CODEGEARC_VERSION__.
Version 6.30 (C++Builder XE) changed the meaning of some flags:
http://docwiki.embarcadero.com/RADStudio/en/C%2B%2B_Compiler_Option_Changes_for_XE
Teach Embarcadero compiler information files to generate build rules
with flags matching the compiler version. Leave the flags unchanged
for old Borland versions. Always set the BORLAND toolchain indicator
for compatibility with existing projects that test it. Also set the
EMBARCADERO indicator for newer toolchains.
|
|
|
|
|
|
|
| |
Decode decimal digits from _SGI_COMPILER_VERSION or _COMPILER_VERSION to
compute version number components. See documentation at:
http://predef.sourceforge.net/precomp.html
|
|
|
|
|
|
| |
The MSVC, HP, XL, SunPro, Watcom, Borland, and Intel compilers specify
their version number in components encoded in a single integer value.
Document the components that we use to compute version numbers.
|
|
|
|
|
|
|
|
| |
Decode decimal digits from __HP_cc and __HP_aCC to compute version
number components. See documentation at:
http://predef.sourceforge.net/precomp.html
http://g4u0420c.houston.hp.com/en/14487/preprocess.htm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decode hex digits from __SUNPRO_C and __SUNPRO_CC to compute the version
number components. Note that the constant encodes decimal digits as hex
digits (never larger than 9). We represent them as decimal after
extraction. See documentation at
http://predef.sourceforge.net/precomp.html
Although the documented version number format is
0xVRP where V = Version, R = Revision, P = Patch
it holds only though SunPro C/C++ version 5.9. Later versions have
a two-digit revision (minor) number so their format is 0xVRRP.
|
|
|
|
|
|
|
| |
Decode decimal digits from __WATCOMC__ to compute the version number
components. See documentation at:
http://predef.sourceforge.net/precomp.html
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from
__clang_major__
__clang_minor__
__clang_patchlevel__
to compute version number components. See documentation at:
http://clang.llvm.org/docs/LanguageExtensions.html#builtinmacros
http://predef.sourceforge.net/precomp.html
|
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from
__PGIC__
__PGIC_MINOR__
__PGIC_PATCHLEVEL__
to compute version number components.
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from __IBMC__ and __IBMCPP__ to compute version
number components. See documentation at:
http://predef.sourceforge.net/precomp.html
http://publib.boulder.ibm.com/infocenter/comphelp/v111v131/topic/com.ibm.xlc111.aix.doc/compiler_ref/xlmacros.html
http://publib.boulder.ibm.com/infocenter/comphelp/v111v131/topic/com.ibm.xlcpp111.aix.doc/compiler_ref/xlmacros.html
|
|
|
|
|
|
|
|
|
|
| |
Decode hex digits from __BORLANDC__ to compute the version number
components. Note that the constant encodes decimal digits as hex digits
(never larger than 9). We represent them as decimal after extraction.
See documentation at
http://predef.sourceforge.net/precomp.html
http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from
__INTEL_COMPILER
__INTEL_COMPILER_BUILD_DATE
to compute the version number components. See documentation at:
http://predef.sourceforge.net/precomp.html
http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/bldaps_for/common/bldaps_use_presym.htm
|
|
|
|
|
|
|
|
| |
Decode decimal digits from _MSC_VER, _MSC_FULL_VER, and _MSC_BUILD to
compute the version number components. See documentation at:
http://msdn.microsoft.com/en-us/library/b0084kay.aspx
http://predef.sourceforge.net/precomp.html
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Decode decimal digits from
__GNUC__
__GNUC_MINOR__
__GNUC_PATCHLEVEL__
to compute version components. See documentation at
http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
http://predef.sourceforge.net/precomp.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach CMakePlatformId.h to construct an "INFO:compiler_version[]" string
literal from macros COMPILER_VERSION_(MAJOR|MINOR|PATCH|TWEAK) to be
defined in CMake(C|CXX)CompilerId.(c|cpp) for each compiler. Provide
conversion macros DEC() and HEX() to decode decimal or hex digits from
integer values. Parse the version out of the compiler id binary along
with the other INFO values already present.
Store the result in variable CMAKE_<LANG>_COMPILER_VERSION in the format
"major[.minor[.patch[.tweak]]]". Save the value persistently in
CMake(C|CXX)Compiler.cmake in the build tree. Document the variable for
internal use since we do not set it everywhere yet.
Report the compiler version on the compiler id result line e.g.
The C compiler identification is GNU 4.5.2
Report CMAKE_(C|CXX)_COMPILER_(ID|VERSION) in SystemInformation test.
|
|
|
|
|
|
|
|
|
|
|
|
| |
These compilers define __SCO_VERSION__ as VvvYYYYMML:
V = major version
vv = minor version
YYYY = release year
MM = release month
http://osr600doc.sco.com/en/manCP/cc.CP.html
http://osr600doc.sco.com/en/manCP/CC.CP.html
|
|\
| |
| |
| |
| | |
dbc79bd Fix constness in compiler id detection
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit 70c2dc8a (Make compiler id detection more robust,
2008-03-10) we store compiler identification strings in test binaries
using the form
char* info = "info";
Use the const-correct
char const* info = "info";
form instead. This allows the C++ compiler identification to work with
"-Werror -Wall" or equivalent flags if the compiler would warn about
const-to-non-const conversion.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The TI DSP compiler predefines "__TI_COMPILER_VERSION__". Use this to
identify the C and C++ compilers. For assembler language the C compiler
executable is used:
$ cl6x -h
TMS320C6x C/C++ Compiler v6.1.11
Tools Copyright (c) 1996-2009 Texas Instruments Incorporated
Use this command-line option and output to recognize the assembler.
|
|/
|
|
|
|
| |
The Cray Fortran compiler needs "-em" to enable module output and also
"-J." to place the .mod files in the current working directory (instead
of next to the .o file).
|
|
|
|
|
|
|
| |
Map to the platform and compiler information for GNU because the
compilers are command-line compatible for common operations. Later we
can add Clang-specific features as necessary. We honor the preferred
capitalization is "Clang", not the common mis-spelling "CLang".
|
| |
|
|
|
|
|
|
|
| |
IBM rebranded its VisualAge compiler to XL starting at version 8.0. We
use the compiler id "XL" for newer versions and "VisualAge" for older
versions. We now also recognize the "z/OS" compiler, which is distinct
from XL.
|
|
|
|
|
|
| |
Some SGI compilers define _SGI_COMPILER_VERSION in addition to the old
_COMPILER_VERSION preprocessor symbol. It is more distinctive, so we
should check it in case the old one is ever removed.
|
|
|
|
|
|
|
|
|
|
|
| |
Compiler INFO strings built at preprocessing time encode information
that must appear as a string literal in the resulting binary. We must
make sure the strings appear in the final binary no matter what compiler
and flags are used. The previous implementation worked in most places
but failed with the GNU linker's --gc-sections option which managed to
discard the string. Instead we make the program return value depend on
an element of the string indexed by a runtime program parameter, which
absolutely requires the string to be present.
|