summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Intel-CXX.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Compile with explicit language flag when source LANGUAGE property is setBrad King2020-12-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change was originally made by commit 74b1c9fc8e (Explicitly specify language flag when source LANGUAGE property is set, 2020-06-01, v3.19.0-rc1~722^2), but it was reverted by commit 30aa715fac (Revert "specify language flag when source LANGUAGE property is set", 2020-11-19) to restore compatibility with pre-3.19 behavior. Implement the change again, but add policy CMP0119 to make this change while preserving compatibility with existing projects. Note that the `Compiler/{Clang,Intel,MSVC}-CXX` modules do not need to specify `-TP` for their MSVC-like variants because we already use the flag in `CMAKE_CXX_COMPILE_OBJECT`. Similarly for `Compiler/XL-CXX` and `Platform/Windows-Embarcadero`. Note also that this does not seem possible to implement for XL C. Even with `-qsourcetype=c`, `xlc` complains about an unknown suffix: `1501-218 (W) file /.../AltExtC.zzz contains an incorrect file suffix`. It returns non-zero even with `-qsuppress=1501-218`. Co-Author: Robert Maynard <robert.maynard@kitware.com> Fixes: #14516, #20716
* Makefiles Generators: use compiler for dependencies generationMarc Chevrier2020-11-291-0/+6
| | | | | | | | | | | Each source compilation generates a dependencies file. These dependencies files are consolidated in one file per target. This consolidation is done as part of command 'cmake -E cmake_depends` launched before evaluation of makefile dependency graph. The consolidation uses the same approach as `CMake` dependencies management. Fixes: #21321
* Refactoring: Introduce place-holder for dependency target.Marc Chevrier2020-11-281-1/+1
| | | | | | | | These changes are in preparation of compiler generated dependencies support for Makefiles generators * compiler output and dependency target can be different for Makefiles generators * resolve inconsistency naming for dependency file place-holder
* Revert "specify language flag when source LANGUAGE property is set"Brad King2020-11-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 74b1c9fc8e (Explicitly specify language flag when source LANGUAGE property is set, 2020-06-01, v3.19.0-rc1~722^2) and the lookup tables from its two immediate ancestors. The purpose of that change was to convert an explicit `LANGUAGE` source file property into an explicit language specification compiler flag like `-x c`. This seems reasonable since the property is documented as meaning "indicate what programming language the source file is". It is also needed to help compilers deal with non-standard source file extensions they don't recognize. However, some projects have been setting `LANGUAGE C` on `.S` assembler source files to mean "use the C compiler". Passing `-x c` for them breaks the build because the `.S` sources are not written in C. These projects should be updated to use `enable_language(ASM)`, for which CMake often chooses the C compiler as the assembler when using toolchains that support it (which would have to be the case for projects using the approach). Revert the change for now to preserve the old behavior for such projects. We can re-introduce it with a policy in a future version of CMake. Fixes: #21469 Issue: #14516, #20716
* Merge branch 'backport-intel-c++20' into intel-c++20Brad King2020-06-261-0/+10
|\
| * Intel: Add flags for C++20Brad King2020-06-261-0/+10
| | | | | | | | | | Patch-by: Matheus Izvekov Fixes: #20880
* | CXX: Compile when possible with explicit `Cxx` language flag setRobert Maynard2020-06-091-0/+2
|/ | | | Issue: #14516, #20716
* clang-tidy: Add driver mode argumentHanjiang Yu2020-01-271-0/+2
| | | | | | | `clang-tidy` does not infer driver mode if it is not provided with a JSON compilation database. This is exactly the way cmake launches it. Hence clang-tidy will only use the default driver mode. Add an explicit driver mode argument to avoid this.
* CompileFeatures: Record when Intel gained full CXX14 supportRobert Maynard2019-05-131-7/+1
| | | | | | | Use the infrastructure added by commit 646fb1a646 (CompileFeatures: memoize C++ compilers with full language level support, 2019-03-27) to avoid using a `try_compile` to check for C++14 feature support when the running compiler is known to have all features.
* CompileFeatures: Record when compilers gained full CXX14 supportRobert Maynard2019-05-021-0/+10
| | | | | | | Use the infrastructure added by commit 646fb1a646 (CompileFeatures: memoize C++ compilers with full language level support, 2019-03-27) to avoid using a `try_compile` to check for C++14 feature support when the running compiler is known to have all features.
* CompileFeatures: Record when compilers gained full CXX11 supportRobert Maynard2019-04-291-0/+4
| | | | | | | Use the infrastructure added by commit 646fb1a646 (CompileFeatures: memoize C++ compilers with full language level support, 2019-03-27) to avoid using a `try_compile` to check for C++11 feature support when the running compiler is known to have all features.
* CompileFeatures: Record when CXX compilers have gained full support for 98Robert Maynard2019-04-111-0/+2
| | | | | | | Use the infrastructure added by commit 646fb1a646 (CompileFeatures: memoize C++ compilers with full language level support, 2019-03-27) to avoid using a `try_compile` to check for C++98 feature support when the running compiler is known to have all features.
* Intel: Fix incorrectly documented extension flagsChristian Pfeiffer2018-07-121-6/+9
| | | | Fixes: #18166
* Intel: Add C++17 compiler optionsChristian Pfeiffer2018-01-271-0/+11
| | | | | | | Since Intel C++ 18.0, some C++17 features are supported if the flags -std=c++17, respectively /Qstd=c++17 are given. Fixes: #17687
* Compilers: Port to use default cmake_record_lang_compile_features macrosChuck Atkins2017-05-301-18/+0
|
* Intel: avoid variables in language standard flagsDaniel Pfeifer2017-05-261-23/+27
| | | | | | In the bootstrap script, we want to be able to extract language standard flags using sed. Make sure the content of the flag varianbles can be passed unmodified to the compiler.
* Intel: Use common compiler macros for language standard defaultChuck Atkins2017-05-021-13/+2
|
* Features: Make feature recording conditions more consistentBrad King2016-12-021-3/+4
| | | | | | | | | 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).
* Features: Fix standards and features for Intel 15 on WindowsBrad King2016-11-101-11/+17
| | | | | The Intel 15 compiler for Windows does not support the same set of standards and features as the same version for other platforms.
* Features: Centralize per-compiler recording macrosBrad King2016-11-021-7/+3
| | | | | Simplify and de-duplicate per-compiler feature recording macros and convert to a centralized per-language macro.
* Features: Record features for Intel Compiler on WindowsBrad King2016-10-271-2/+1
| | | | | | | | | | | | | 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
* 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
* Intel: Fix compiler extension flags on WindowsBrad King2016-10-241-3/+6
| | | | | | | | | 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
* Intel: Do not use GNU-like flags on WindowsBrad King2016-07-051-6/+5
| | | | | | | | | | | 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.
* Features: Record standard flags for Intel C/C++ on WindowsBrad King2016-04-281-21/+27
| | | | | 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 UNIXLevi Morrison2016-04-281-0/+58
| | | | Skip this for now on Windows (where Intel C++ simulates MSVC).
* Ninja: Add dependencies on system-provided header files (#14914)Brad King2016-03-151-1/+1
| | | | | | | | 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
* Factor an <INCLUDES> placeholder out of <FLAGS> in rule variablesBrad King2015-07-131-2/+2
| | | | | | | | | | | Teach the Makefile and Ninja generators to substitute for an <INCLUDES> placeholder instead of putting -I in <FLAGS>. Update our values for CMAKE_<LANG>_COMPILE_OBJECT, CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE to place <INCLUDES> just before <FLAGS>.
* Visibility: the Intel compiler does not support -fvisibility on windowsNils Gladitz2014-02-071-4/+0
|
* Ninja: add depfile support for Intel's compilerPeter Kümmel2013-11-041-0/+2
|
* Introduce target property <LANG>_VISIBILITY_PRESETStephen Kelly2013-06-021-0/+4
| | | | | | This is initialized by CMAKE_<LANG>_VISIBILITY_PRESET. The target property is used as the operand to the -fvisibility= compile option with GNU compilers and clang.
* Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it.Clinton Stimpson2012-08-161-1/+1
| | | | | | Previously, it was inconsistent in that some platforms/compilers had this flag for the RelWithDebInfo configuration and some didn't. This fixes issue #11366.
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-8/+8
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* The preprocessing and assembly rules also need the <DEFINES>, otherwise ↵Alexander Neundorf2009-09-191-2/+2
| | | | | | different reults are created. Alex
* Use Intel for Linux flags only on LinuxBrad King2009-09-011-7/+0
| | | | | | The commit "Split Intel compiler information files" moved some Linux specific flags into the platform-independent Intel compiler info files. This moves them back.
* Split Intel compiler information filesBrad King2009-08-211-0/+16
| | | | | | This moves platform-independent Intel compiler flags into separate "Compiler/Intel-<lang>.cmake" modules. Platform-specific flags are left untouched.
* Set CMAKE_<LANG>_VERBOSE_FLAG variables for IntelBrad King2009-07-291-0/+1
We set the variables to contain "-v", the verbose front-end output option for Intel compilers. This enables detection of implicit link libraries and directories for these compilers.