summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-compile-features.7.rst
Commit message (Collapse)AuthorAgeFilesLines
* Place language standard flags just after CMAKE_<LANG>_FLAGSBrad King2022-11-181-0/+22
| | | | | | | | | | | | | | | | Previously we added the language standard flag near the end of all options, even after those added by `add_compile_options` and friends. However, on some compilers such as MSVC, the `-std` flag may reset defaults for flags that precede it on the command line. Move the language standard flag to before all other flags that CMake adds for other abstractions, and before those added by `add_compile_options`. `CMAKE_<LANG>_FLAGS` should still precede the language flags though, because they are meant to be treated as language-wide modifications to the compiler defaults, similar to `$CC $CFLAGS`. Fixes: #23860 Fixes: #24170
* Help: Document explicitly that 'cxx_std_##' features may not add a flagBrad King2022-03-071-0/+2
| | | | | This is commonly reported incorrectly as a bug, so call out this behavior explicitly in the documentation.
* Help: Better explain CMAKE_<LANG>_EXTENSIONS_DEFAULTRaul Tambre2021-11-021-3/+3
| | | | | | | | | | | | | | | | Explain that this represents the compiler's default and mustn't be modified by the user. Clarify when it's used as the default. Additionally: * Add a reference to it in cmake-compile-features in text explaining the feature. * Add explanations for the default initialization by `CMAKE_<LANG>_EXTENSIONS_DEFAULT` to all `<LANG>_EXTENSIONS` pages and references to CMP0128. * Slightly reduce the wordiness of the default initialization explanations by removing an unnecessary "it is". Fixes #22828.
* cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logicRaul Tambre2021-09-291-6/+5
| | | | | | | | | | | | | | | | | | The changes are part of CMP0128. When the standard level is unset: * Flags are added if extension mode doesn't match the compiler's default. Previously logic only worked if LANG_EXTENSIONS was ON. Fixes #22224. * The full flag is used. Previously CMAKE_LANG_EXTENSION_COMPILE_OPTION was used. This was only supported for IAR. Otherwise: * Avoid adding flags if not necessary per the detected compiler defaults. * Fixed check for when the requested standard is older. It now matches the nearby comments. I reworded the fallback comment as its logic was a bit difficult to wrap my head around.
* Merge topic 'doc-compile-features-wcdh'Brad King2021-04-261-115/+17
|\ | | | | | | | | | | | | | | 1f4ec3f4a7 Help: Do not recommend WCDH in cmake-compile-features(7) 1cc63f2cd5 Help: Fix typos in cmake-compile-features(7) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6037
| * Help: Do not recommend WCDH in cmake-compile-features(7)Brad King2021-04-231-114/+16
| | | | | | | | | | | | | | | | | | Since commit da7ad7997e (WriteCompilerDetectionHeader: Add policy to remove module, 2020-12-04, v3.20.0-rc1~350^2), the WCDH module is deprecated. Update the `cmake-compile-features(7)` manual section that previously recommended WCDH to make such detection the project's responsibility instead. Move the old content of the section over to the WCDH module to preserve it.
| * Help: Fix typos in cmake-compile-features(7)Brad King2021-04-231-6/+6
| |
* | Fujitsu: Add support for the Fujitsu compiler in Trad modeChuck Atkins2021-03-301-0/+1
|/ | | | Co-Author: Yuichiro Utsumi <utsumi.yuichiro@jp.fujitsu.com>
* HELP: Update compile-features documentation with missing compilersRobert Maynard2021-02-241-0/+2
|
* WriteCompilerDetectionHeader: Add policy to remove moduleBrad King2020-12-051-0/+2
| | | | | | See justification in the policy documentation. Closes: #17842
* Compiler/TI: Add std options for C++98Josef Angstenberger2020-09-201-1/+1
| | | | | | | | The TI compiler does not support C++98, only C++03 (based on manual of current version). This change sets the C++98 option to C++03 based on the fact that it is done this way for the SunPro compiler already.
* CUDA: Add cuda meta-features (e.g. ``cuda_std_11``) supportRobert Maynard2019-12-101-6/+7
|
* Help: Clarify compile features handling for OBJC and OBJCXXCraig Scott2019-11-171-1/+6
|
* Merge branch 'clarify_compile_features_documentation' into release-3.16Brad King2019-11-051-7/+7
|\ | | | | | | Merge-request: !3988
| * Help: Clarify what 'aware' means as it relates to C++ standardsRobert Maynard2019-11-041-7/+7
| |
* | Help: Remove out of date bounds on compile feature supported versionsRobert Maynard2019-11-011-11/+11
|/ | | | | | The upper limits on what compiler CMake supports is always changing, and the values inside cmake-compile-feature is always out of date. So lets remove it.
* TI: Add support for C language standardsArnaud Gelas2018-06-041-0/+1
| | | | | | Set C90 and C99 compile options for TI compiler. Fixes: #18061
* Help: Update compiler versions in cmake-compile-features.7.rstBrad King2018-03-271-5/+5
|
* Features: Record for SunPro 5.15Brad King2018-03-201-1/+1
| | | | Oracle Developer Studio 12.6 adds support for more C++ 11 features.
* Help: Document that VS 2017 compile features are recordedBrad King2017-06-151-1/+1
| | | | | | | They were recorded by commit v3.7.0-rc1~156^2~2 (Features: Record features for VS 15 Preview 4, 2016-09-05). Fixes: #16974
* Help: Fix typo in Cray/PGI/XL compile features docsBrad King2017-06-151-2/+2
| | | | Reported-by: Rolf Eike Beer <eike@sf-mail.de>
* Help: Add docs for new compilers supporting language standards.Chuck Atkins2017-06-141-1/+17
|
* Features: Record standards and features for SunPro 5.14Brad King2017-05-031-1/+1
| | | | | Oracle Studio 12.5 adds support for C 11 and associated standard flags. It also adds a few more C++ 11 features.
* GNU C: record that C99 is available since at least 3.4Rolf Eike Beer2017-02-021-0/+8
|
* Help: Fix language standard link text in cmake-compile-features(7)Brad King2017-02-021-2/+2
| | | | | Include each language name in the text of the link to its standards property.
* Help: Document CUDA_STANDARD and related propertiesRobert Maynard2016-12-091-0/+6
|
* Help: Document language standard meta-featuresBrad King2016-11-021-0/+27
|
* Features: Record features for Intel Compiler on WindowsBrad King2016-10-271-1/+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
* Features: Specify minimum version Intel C++ 12.1Robert Maynard2016-04-281-0/+1
| | | | | | 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.
* Revert topic 'compiler-features-solaris'Brad King2015-10-081-1/+1
| | | | | | | | 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: Disable support for Oracle SolarisStudio on non-LinuxBrad King2015-09-291-1/+1
| | | | | | 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).
* Help: Fix typo in cmake-compile-features(7) manual (#15594)Erik Sjölund2015-05-291-1/+1
| | | | | | | target_link_libraries() is being used in the example code but target_include_directories() was probably meant to be used. The sentence that starts with "Consuming code then" indicates that the example is about using the appropriate include directory.
* Help: Document supported compilers in cmake-compile-features.7Robert Maynard2015-04-071-0/+14
| | | | | | | Extend sentences in other documentation linking to this manual to say that it has a list of supported compilers. Co-Author: Brad King <brad.king@kitware.com>
* Help: Fix typo in cmake-compile-features(7) manualDavid Demelier2014-12-021-1/+1
| | | | Fix spelling 'execptions' => 'exceptions'.
* Help: Drop TOC from latex manualsBrad King2014-11-061-1/+1
| | | | A latex document can have its own TOC.
* Help/manual: Avoid long lines in code blocksBrad King2014-10-221-2/+5
| | | | | | Update the wording of some examples to avoid long lines in code blocks. Otherwise the formatted documentation can exceed certain column width limitations.
* WCDH: Remove noise from generated defines.Stephen Kelly2014-06-131-5/+5
| | | | | | The DECL part is redundant, and the language part is not needed. The source language and context already determines the language, so there is no need to repeat it in the define name.
* Features: Enable compiler extensions by default.Stephen Kelly2014-05-311-14/+11
| | | | | | | | | | | Compilers enable their extensions by default, and disabling them implicitly can lead to results which are surprising or non-obvious to debug. http://public.kitware.com/pipermail/cmake-developers/2014-May/010575.html http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10214 https://www.mail-archive.com/cmake-developers@cmake.org/msg10116.html (Compiler feature extensions by default, 29 May 2014)
* Help: Add a manual for compiler feature control.Stephen Kelly2014-05-271-0/+297
Link to it from the documentation of related properties, variables and commands. Extend the cmake-developer(7) documentation with notes on extending feature support for compilers.