summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Add explicit preprocessing step for FortranBrad King2016-09-223-0/+9
| | | | | | | | | | All Fortran sources need to be preprocessed before any source may be compiled so that module dependencies can be (later) extracted. Factor out an explicit preprocessing step preceding compilation. Use Ninja depfile dependencies on the preprocessing step and then compile the already-preprocessed source with a separate build statement that depends explicitly only on the preprocessor output. Later we will insert dynamic discovery of module dependencies between these steps.
* Features: Record features for VS 15 Preview 4Brad King2016-09-061-0/+3
|
* issues: update references to the CMake issue trackerBen Boeckel2016-08-151-2/+3
| | | | | References to specific comments are left as-is since comments were not migrated.
* NAG: Use -PIC for Fortran position-independent executable codeNeil Carlson2016-08-091-0/+1
| | | | | | | | | The Numerical Algorithms Group (NAG) Fortran compiler documents -PIC for position-independent code and does not have a separate option for PIE. We added `-PIC` for PIC in commit v2.8.11~174^2 (NAG: Use -PIC for Fortran position-independent code, 2013-02-18). Follow up for PIE. Closes: #16236
* Merge topic 'update-cle-version-info'Brad King2016-08-081-0/+2
|\ | | | | | | | | e52302d6 CrayLinuxEnvironment: Add alternative methods to get version info
| * CrayLinuxEnvironment: Add alternative methods to get version infoChuck Atkins2016-08-051-0/+2
| | | | | | | | Closes: #16229
* | Merge topic 'gcc-fvisibility-version'Brad King2016-08-031-1/+1
|\ \ | | | | | | | | | | | | 85e03142 GNU: Use -fvisibility on GCC 4.0 and 4.1 too
| * | GNU: Use -fvisibility on GCC 4.0 and 4.1 tooBrad King2016-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | This flag is needed for the `<LANG>_VISIBILITY_PRESET` target property. It has been supported since GCC 4.0, not 4.2 as we previously recorded. Fixes #16222.
* | | Merge topic 'intel-gnu11-support'Brad King2016-08-031-4/+4
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 088f14eb Intel-C: standard flags are also supported in 12.0 27a3ca15 Intel-C: support gnu89 and gnu99 extension flags cc223e1e Intel-C: declare support for gnu11
| * | Intel-C: standard flags are also supported in 12.0Ben Boeckel2016-08-021-1/+1
| | |
| * | Intel-C: support gnu89 and gnu99 extension flagsBen Boeckel2016-08-021-2/+2
| | |
| * | Intel-C: declare support for gnu11Ben Boeckel2016-08-021-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Without extensions, functions like `strdup` are not available since they are actually controlled by feature flags such as _SVID_SOURCE and _BSD_SOURCE. When using `-std=c11` on Intel, none of these flags are set, so the functions are not declared properly leading to compile errors. Reported-by: Adam J. Stewart <ajstewart426@gmail.com> Closes: #16226
* | Use string(APPEND) in ModulesDaniel Pfeifer2016-07-271-1/+1
| | | | | | | | | | | | | | 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'
* | Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain filesBrad King2016-07-0626-103/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document these variables. Change our convention for setting these variables from: set(CMAKE_C_FLAGS_INIT "...") to string(APPEND CMAKE_C_FLAGS_INIT " ...") so that any value previously set by a toolchain file will be used. Automate the conversion with: sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \ Modules/Compiler/*.cmake Modules/Platform/*.cmake and follow up with some manual fixes (e.g. to cases that already meant to append). Also revert the automated changes to contexts that are not protected from running multiple times.
* | Intel: Do not use GNU-like flags on WindowsBrad King2016-07-055-24/+54
|/ | | | | | | | | | | Refactor options out of `Modules/Compiler/Intel-{ASM,C,CXX,Fortran}.cmake` into a common helper in `Modules/Compiler/Intel.cmake`. Condition them to be used only on non-Windows hosts where the Intel compiler is GNU-like instead of MSVC-like. Previously this worked only because the options were later overridden by `Modules/Platform/Windows-Intel*.cmake`, but it is cleaner to not set the options in the first place.
* Compiler/TI: Pass libraries as last part to linkerAlexander Stein2016-06-021-1/+1
| | | | | | | | | If e.g. libc.a is passed before any objects the linker raises the follwing warning: cannot resolve archive libc.a to a compatible library, as no input files have been encountered In the end the library is skipped and missing symbols occur. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
* GHS: Use shorter object file names on collisionGeoff Viola2016-05-182-0/+2
|
* Features: Record features for VS 2015 Update 2Brad King2016-04-281-1/+4
|
* Features: Record standard flags for Intel C/C++ on WindowsBrad King2016-04-282-32/+44
| | | | | Select the `-std=` or `-Qstd=` flag based on whether Intel is GNU-like or MSVC-like, respectively.
* Features: Record standards and features for Intel C on UNIXRobert Maynard2016-04-282-0/+73
| | | | | Record features for Intel C 12.1 and above. Skip this for now on Windows (where Intel C simulates MSVC).
* Features: Specify minimum version Intel C++ 12.1Robert Maynard2016-04-281-22/+18
| | | | | | Versions below 12.1 do not provide enough information to properly detect if compiling with c++98 or c++0x enabled so remove them from the supported list.
* Features: Record standards and features for Intel C++ on UNIXLevi Morrison2016-04-282-0/+158
| | | | Skip this for now on Windows (where Intel C++ simulates MSVC).
* Merge topic 'asm-includes'Brad King2016-03-291-1/+1
|\ | | | | | | | | 9408a7a8 ASM: Add missing <INCLUDES> placeholder for "compile" rules
| * ASM: Add missing <INCLUDES> placeholder for "compile" rulesGregor Jasny2016-03-291-1/+1
| | | | | | | | | | | | | | | | This placeholder was added to the compilation rules for other languages by commit v3.4.0-rc1~342^2 (Factor an <INCLUDES> placeholder out of <FLAGS> in rule variables, 2015-07-13) but ASM was incorrectly left out. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* | GHS: Implement link flags and dirs for non-target groups (#16029)Geoff Viola2016-03-281-0/+2
| |
* | GHS: Factor out compiler information shared among languagesGeoff Viola2016-03-283-4/+10
|/ | | | | Move common information in `Modules/Compiler/GHS-*.cmake` over to a common `Modules/Compiler/GHS.cmake` and include it.
* Merge topic 'ghs-try_compile'Brad King2016-03-222-0/+4
|\ | | | | | | | | bf3e76d2 GHS: Fix try_compile (#15975)
| * GHS: Fix try_compile (#15975)Geoff Viola2016-03-212-0/+4
| |
* | Add support for Bruce C Compiler (BCC)Paweł Stankowski2016-03-212-0/+8
|/ | | | Revise C compiler detection code to be K&R compatible.
* Ninja: Add dependencies on system-provided header files (#14914)Brad King2016-03-154-4/+4
| | | | | | | | When system-provided packages are upgraded we must re-compile sources depending on their headers. Use `-MD` instead of `-MMD` so that the generated depfiles do not exclude system headers. Suggested-by: Jussi Judin
* Features: Clang has no cxx_decltype_incomplete_return_type in MSVC sim modeMariusz Pluciński2016-03-101-1/+3
|
* Apple: Enable -isystem for GNU Compiler >= 4 (#15953)Gregor Jasny2016-02-071-1/+1
| | | | | | | | Due to #4662 -isystem support was disabled for all GNU Compilers on Apple platforms. But the change was probably a just work around for a broken compiler on Tiger (see 10837#c27206). So we tighten the condition to only kick in for GCC versions earlier than 4. That should ensure sane behavior for Xcode 3.2 and later.
* IAR: Add support for using this compiler with the Ninja generatorJuhani Simola2016-02-032-1/+5
| | | | | | The dependency flags require recent versions of `iccarm` and `iccavr`. The multi-rule dependency generated with `--dependencies=m` does not work well with Ninja, so use `--dependencies=ns` instead.
* Record compile features for MinGW Clang on Windows (#15897)Brad King2016-01-111-2/+2
| | | | | | Drop the 'UNIX' condition on Clang compiler features. This enables use of compile features with MinGW Clang, though additional work may be needed for clang-cl.
* CrayPrgEnv: Cleanup binaries from implicit compile flag detectionChuck Atkins2015-12-291-2/+5
|
* CrayPrgEnv: Don't use absolute paths for imlicit librariesChuck Atkins2015-12-181-6/+11
| | | | | | | When parsing implicit include dirs, link dirs, and link libs, all arguments are resolved to absolute paths instead of relative paths. This is correct for link and include directories but link libraries should only include the library name, not it's path.
* Merge topic 'detect-cray-wrappers'Brad King2015-12-0916-0/+200
|\ | | | | | | | | | | | | a7ef0225 Cray: Refactor the Cray platform files to use compiler wrapper checks 0763a836 Cray: Add macro tests to detect the Cray compiler wrappers 5eaac0c9 Compiler: Add infrastructure for detecting compiler wrappers
| * Cray: Refactor the Cray platform files to use compiler wrapper checksChuck Atkins2015-12-0916-0/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | This is an extensive refactoring of the Cray compiler wrapper usage. Using the new compiler wrapper checks, the CrayPrgEnv info files have been moved from Platform/ to Compiler/. The adjusted naming convention allows the compiler-wrapper information files to be loaded for both the CrayLinuxEnvironment platform when cross-compiling and the Linux platform if building natively on the Cray compute nodes. It also creates a separation of common arguments for compiler id and language information used to perform the appropriate introspection of implicit arguments and libraries used by the compiler wrappers based on the loaded module environment.
* | Embarcadero: Fix erroneous interpretation of __CODEGEARC_VERSION__.James Johnston2015-12-031-1/+1
|/ | | | | | | | | | | | | As per the following link: http://docwiki.embarcadero.com/RADStudio/Seattle/en/Example_of_CODEGEARC_VERSION_Macro The major/minor versions must be decoded as a hex string, while the patch version must be decoded as a normal decimal string. As an example, C++ Builder XE 8.1's bcc32.exe sets this macro to 0x070189C9. The file version of bcc32.exe is 7.1.5570.35273. Therefore, the correct interpretation to COMPILER_VERSION would be 7.1.35273.
* Merge topic 'fix-forced-toolchain-dialect'Brad King2015-11-207-0/+29
|\ | | | | | | | | 441dba80 Project: Guess default standard dialect if compiler was forced (#15852)
| * Project: Guess default standard dialect if compiler was forced (#15852)Brad King2015-11-197-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to commit v3.4.0-rc1~71^2 (Project: Determine default language dialect for the compiler, 2015-09-15) we always guessed the default language standard dialect based on the compiler version. This was not reliable so that commit switched to computing the default language standard dialect while detecting the compiler id. When a toolchain file uses CMakeForceCompiler to set the compiler id then the detection does not occur. Therefore commit v3.4.0-rc1~54^2 (Project: Don't require computed default dialect if compiler was forced, 2015-09-22) made the lack of detection an error only if the compiler was not forced. However, this means that projects using CMakeForceCompiler no longer even get the guess that we had before so <LANG>_COMPILER does not work. Due to the sophistication of CMake's compiler detection logic projects should be ported away from using CMakeForceCompiler. In the meantime, restore a guess of the default language standard dialect when the compiler is forced.
* | Add support for the ARM Compiler (arm.com)Joakim Andersson2015-11-025-0/+63
| | | | | | | | | | | | | | | | 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
* | Revert topic 'compiler-features-solaris'Brad King2015-10-081-19/+13
| | | | | | | | | | | | | | | | Revert commit v3.4.0-rc1~10^2~2 (Features: Disable support for Oracle SolarisStudio on non-Linux, 2015-09-29) and two follow-up commits. The support of compile features and language standards on Orcale SolarisStudio needs more investigation so for CMake 3.4 we should just act as 3.3 did.
* | Features: Fix C++98 flags on Oracle SolarisStudio 12.4 on LinuxBrad King2015-09-301-0/+2
| |
* | Features: Disable support for Oracle SolarisStudio on non-LinuxBrad King2015-09-291-13/+17
| | | | | | | | | | | | On SunOS the -std=c++11 flag must be used for linking as well as compiling. Until we implement support for this we cannot support the CXX_STANDARD property except on Linux (where it was tested).
* | Replace http://www.cmake.org URLs with https://cmake.orgBrad King2015-09-251-2/+2
|/ | | | | | | The latter is now the preferred URL for visiting cmake.org with a browser. Convert using the shell code: git ls-files -z | xargs -0 sed -i 's|http://www\.cmake|https://cmake|g'
* Project: Don't require computed default dialect if compiler was forced.Stephen Kelly2015-09-227-21/+35
| | | | | | | | | | | | | | | | Commit 7235334a (Project: Determine default language dialect for the compiler., 2015-09-15) introduced a mechanism to determine the default dialect used for the running compiler. If conditions in the <CompilerId>-<Lang>.cmake file are such that compile features for that version of the compiler should be supported, the _DEFAULT_STANDARD is set to the computed value. However, the CMakeForceCompiler module allows users to bypass execution of the compiler by CMake. In that case, do not set the _DEFAULT_STANDARD variable at all, which effectively disables the compile-features where the module is used. No compile features have ever been recorded where the module is used so no functionality is lost.
* Project: Determine default language dialect for the compiler.Stephen Kelly2015-09-187-15/+34
| | | | | | Use the __cplusplus and __STDC_VERSION__ macros to automatically determine the default dialect for the compiler while determining its id and version.
* Record compile features for GNU C on Windows (#15727)Brad King2015-09-091-2/+2
| | | | Drop the 'UNIX' condition on GNU C compiler features.
* GNU-DetermineCompiler: Add support for very old versions of GCCKars de Jong2015-08-131-1/+3
| | | | | | Very old versions of gcc (2.3.1) do not define __GNUC_MINOR__. Signed-off-by: Kars de Jong <kars.dejong@locamation.nl>