summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* PGI: Add support for Fortran with the Ninja generatorDaniel Carrera2016-12-161-0/+3
| | | | | | | The PGI documentation says that `-Mpreprocess` "instructs the compiler to perform cpp-like preprocessing on assembly and Fortran input source files". The `-E` flag causes the compiler to spit the result to stdout instead of saving it to a file.
* CUDA: Fix default compiler flag initializationBrad King2016-12-091-5/+5
| | | | | | | Since commit v3.7.0-rc1~392^2 (Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files, 2016-07-05) our convention is to initialize compiler flag variables via `string(APPEND)` rather than `set()`. Fix the convention for `CMAKE_CUDA_FLAGS[_<CONFIG>]_INIT`.
* Features: Activate C++ 17 support for AppleClang 6.1+Brad King2016-12-021-0/+8
|
* Features: Activate C++ 17 support for Clang 3.5+Brad King2016-12-021-0/+8
|
* Features: Activate C++ 17 support for GNU 5.1+Brad King2016-12-021-0/+8
|
* Features: Add infrastructure for C++ 17 language standardBrad King2016-12-021-0/+1
| | | | Issue: #16468
* Features: Make feature recording conditions more consistentBrad King2016-12-029-16/+24
| | | | | | | | | Condition all calls to `_record_compiler_features_{c,cxx}` on `_result EQUAL 0` so that adding new language standards later does not need to update them. Avoid some duplicate compiler version checks by conditioning C11 and CXX14 feature recording on the existence of `CMAKE_{C11,CXX14}_STANDARD_COMPILE_OPTION` (whose setting already used the version check).
* Merge topic 'initial_cuda_language_support'Brad King2016-11-292-0/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4cc601f2 Help: Add release note for CUDA support 7b9131da CUDA: Add tests to verify CUDA compiler works properly. 9cf5b98d CUDA: Prefer environment variables CUDACXX and CUDAHOSTCXX. a5e806b3 CUDA: Add support for CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY d038559e CUDA: Add separable compilation support to the makefile generator. 43ce4414 CUDA: Add separable compilation support to the ninja generator. 4b316097 CUDA: Add support for the CUDA_SEPARABLE_COMPILATION target property ae05fcc6 CUDA: Add LinkLineComputer that computes cuda dlink lines. 115269a8 CUDA: Refactor cmLinkLineComputer to allow for better derived children. 5dec4031 CUDA: Refactor CMakeCUDAInformation to prepare for separable compilation. 5b20d0ab CUDA: C++ compile features now enable cuda c++11 support. 489c52ce CUDA: Use the host compiler for linking CUDA executables and shared libs. bbaf2434 CUDA: add support for specifying an explicit host compiler. a92f8d96 CUDA: Enable header dependency scanning. ec6ce623 CUDA: State that cuda has preprocessor output and can generate assembly. 4f5155f6 CUDA: We now properly perform CUDA compiler identification. ...
| * CUDA: Refactor CMakeCUDAInformation to prepare for separable compilation.Robert Maynard2016-11-141-0/+5
| |
| * CUDA: Use the host compiler for linking CUDA executables and shared libs.Robert Maynard2016-11-141-2/+4
| |
| * CUDA: We now properly perform CUDA compiler identification.Robert Maynard2016-11-141-1/+1
| |
| * CUDA: Add support language levels (98/11)Robert Maynard2016-11-141-6/+7
| |
| * CUDA: Add basic CUDA language support for *NIX systems.Robert Maynard2016-11-142-0/+23
| |
* | Merge topic 'armcc-response-file-flag'Brad King2016-11-161-0/+1
|\ \ | |/ |/| | | | | d608e85c ARMCC: Fix flag used for response files
| * ARMCC: Fix flag used for response filesBen Boeckel2016-11-151-0/+1
| | | | | | | | | | | | | | | | | | ARMCC does not use the `@` sigil to indicate response files, but instead the `--via=` flag. See the documentation here: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491h/CHDCIEGC.html Fixes: #16425
* | Merge topic 'intel-compile-features'Brad King2016-11-111-1/+1
|\ \ | | | | | | | | | | | | | | | 5e428389 Features: Detect Intel C++14 mode more reliably 1f848031 Features: Suppress c_static_assert test coverage on Intel <= 15
| * | Features: Detect Intel C++14 mode more reliablyBrad King2016-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `__cplusplus` macro is not defined to the language level reliably. When simulating MSVC it is always set to `1`. When simulating GCC it is set to the lower value of the current language level and the maximum level supported by the simulated version of GCC (from observation). For MSVC we already used a combination of `__INTEL_CXX11_MODE__` and `__cpp_aggregate_nsdmi` to detect C++14 mode. Extend this for general use by removing the condition on `_MSC_VER`.
* | | Features: Fix standards and features for Intel 15 on WindowsBrad King2016-11-102-13/+19
|/ / | | | | | | | | The Intel 15 compiler for Windows does not support the same set of standards and features as the same version for other platforms.
* | Merge topic 'compile-features-for-language-standards'Brad King2016-11-0310-63/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9a8d758c Help: Document language standard meta-features df252db1 Features: Test cycle diagnostic with language standard meta-feature 6d5fb0e0 Features: Test feature propagation with language standard meta-feature a34b98a8 WCDH: Ignore language standard meta-features b0996a3f Features: Add meta-features requesting awareness of a particular standard 8b6cc251 Features: Centralize per-compiler recording macros 2d23f7b2 Features: Do not record features on MSVC < 2010
| * | Features: Add meta-features requesting awareness of a particular standardBrad King2016-11-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common use case of `target_compile_features` is simply to specify that the compiler should be run in a mode that is aware of e.g. C++11. Some projects simply specify a particular C++11-only feature to request this. Provide a first-class way to do this by naming features after the corresponding language standard. Record them as always available in the corresponding standard level so that requesting them always ensures that standard (or higher) is used.
| * | Features: Centralize per-compiler recording macrosBrad King2016-11-0210-63/+29
| | | | | | | | | | | | | | | Simplify and de-duplicate per-compiler feature recording macros and convert to a centralized per-language macro.
| * | Features: Do not record features on MSVC < 2010Brad King2016-11-021-1/+3
| | | | | | | | | | | | | | | | | | | | | We have no feature tests for versions of VS older than 2010, so do not even call `record_compiler_features` for such versions. This is consistent with other compilers where we call this macro only for versions for which we have recorded features.
* | | Features: Fix Intel cxx_attributes existence conditionBrad King2016-11-031-1/+1
|/ / | | | | | | | | | | This condition needs to follow the same pattern added in note `[1]` by commit a5a3642f (Features: Port Intel CXX features to test macros where possible, 2016-10-26). It was accidentally left out of that commit.
* | Features: Record features for Intel Compiler on WindowsBrad King2016-10-274-18/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Since this compiler always defines `__cplusplus` to `1` we need to use `_MSC_VER`, `__INTEL_CXX11_MODE__`, and the feature test macro named `__cpp_aggregate_nsdmi` to detect C++11 and C++14 modes. With no `-Qstd=` flag this compiler defaults to C++98 plus a subset of C++11/C++14 features needed to be compatible with MSVC. We pretend it is plain C++98 and add a `-Qstd=` flag whenever needed for C++11 or above features even if they would happen to be available in MSVC-mode. Closes: #16384
* | Features: Port Intel CXX features to test macros where possibleBrad King2016-10-271-18/+31
| | | | | | | | | | | | The Intel 16 and 17 compilers define feature test macros of the form `__cpp_<feature>`. Use them where possible to detect corresponding features.
* | Features: Unset Intel CXX feature temporariesBrad King2016-10-271-0/+10
| |
* | Intel: Remove incorrect C++98 standard compiler flag on WindowsBrad King2016-10-271-5/+6
| | | | | | | | | | | | | | | | | | | | The change in commit 05e05cd2 (Intel: Fix compiler C++98 standard flag on Windows, 2016-10-26) was wrong. The Intel C++ Compiler for Windows does not support either `-Qstd=c++98` or `-Qstd=gnu++98`. Simply remove both flags for this compiler and use no options at all to achieve this mode. Issue: #16384
* | Intel: Fix compiler C++98 standard flag on WindowsBrad King2016-10-261-1/+5
|/ | | | | | | The Intel C++ Compiler for Windows does not support the `-Qstd=c++98` flag but does support `-Qstd=gnu++98`. Issue: #16384
* Features: Record features for Intel C++ 17 on UNIXBrad King2016-10-261-3/+3
| | | | Issue: #16384
* Intel: Fix compiler extension flags on WindowsBrad King2016-10-242-6/+12
| | | | | | | | | The extension flags enabled by commit v3.6.0-rc1~120^2~1 (Features: Record standard flags for Intel C/C++ on Windows, 2016-04-18) of the form `-Qstd=gnu++11` are not supported by the Intel C/C++ Compiler for Windows. Fall back to using the non-extension form of the flags. Issue: #16384
* Simplify CMake per-source license noticesBrad King2016-09-278-96/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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.