| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This is commonly reported incorrectly as a bug, so call out this
behavior explicitly in the documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/
|
|
| |
Co-Author: Yuichiro Utsumi <utsumi.yuichiro@jp.fujitsu.com>
|
| |
|
|
|
|
|
|
| |
See justification in the policy documentation.
Closes: #17842
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|\
| |
| |
| | |
Merge-request: !3988
|
| | |
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Set C90 and C99 compile options for TI compiler.
Fixes: #18061
|
| |
|
|
|
|
| |
Oracle Developer Studio 12.6 adds support for more C++ 11 features.
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Reported-by: Rolf Eike Beer <eike@sf-mail.de>
|
| |
|
|
|
|
|
| |
Oracle Studio 12.5 adds support for C 11 and associated standard flags.
It also adds a few more C++ 11 features.
|
| |
|
|
|
|
|
| |
Include each language name in the text of the link to its standards
property.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Fix spelling 'execptions' => 'exceptions'.
|
|
|
|
| |
A latex document can have its own TOC.
|
|
|
|
|
|
| |
Update the wording of some examples to avoid long lines in code blocks.
Otherwise the formatted documentation can exceed certain column width
limitations.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
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.
|