Commit Graph

9 Commits

Author SHA1 Message Date
Gregor Jasny c6a077d698 Help: Cross reference CXX_STANDARD and CXX_EXTENSIONS (#16162) 2016-06-28 09:14:00 -04:00
Robert Maynard 322cdc4825 Help: Document supported compilers in cmake-compile-features.7
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>
2015-04-07 15:01:18 -04:00
Brad King 3228fc5049 Features: Define meaning for no language standard default
Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that
the toolchain has no notion of lanuage standard levels.  In this case
the <LANG>_STANDARD[_REQUIRED] properties will have no effect.

Update the RunCMake.CompileFeatures test to exclude the
LinkImplementationFeatureCycle test when there is no standard default.
It can never fail because no use of specific features will adjust the
CXX_STANDARD level required for any target since the standard levels
have no meaning in this case.
2015-01-29 15:01:40 -05:00
Stephen Kelly 72a0d6df6d Help: Document valid 14 value for CXX_STANDARD. (#15339)
Support was added in commit v3.1.0-rc1~475^2 (Features: Add support
for C++14 features., 2014-05-06), but the documentation for this
property was not amended.
2015-01-08 19:55:29 +01:00
Stephen Kelly 60a981ea8e Features: Enable compiler extensions by default.
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)
2014-05-31 12:16:12 +02:00
Stephen Kelly ca5d990f02 Help: Add a manual for compiler feature control.
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.
2014-05-27 09:35:00 -04:00
Stephen Kelly 205215fb8a cmTarget: Add CXX_STANDARD_REQUIRED to control decay. 2014-05-07 12:17:49 +02:00
Stephen Kelly 1df2116bfa Features: Decay language flag if requested is not available.
Use the highest standard compile flags available if requested language
version is too new.

This supports use-cases like

 set(CMAKE_CXX_STANDARD 14)

 # Compiled with -std=c++11 with GNU 4.7, which has no -std=c++14
 # or equivalent flag
 add_executable(main main.cpp)

This can be used in combination with preprocessor defines which
communicate the availability of certain language features for
optional use.
2014-05-07 12:17:49 +02:00
Stephen Kelly 913394af24 cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties.
These are used to determine whether to add -std=c++11, -std=gnu++11
etc flags on the compile line.
2014-04-07 16:48:44 +02:00