142 Commits

Author SHA1 Message Date
Stephen Kelly
7b3e8a0534 Features: Add cxx_right_angle_brackets. 2014-04-08 11:05:57 +02:00
Stephen Kelly
9a49fd21be Features: Add cxx_decltype_incomplete_return_types. 2014-04-08 11:05:57 +02:00
Stephen Kelly
1889045ca6 Features: Add cxx_sizeof_member. 2014-04-08 11:05:57 +02:00
Stephen Kelly
ab455ebafd Features: Add cxx_thread_local. 2014-04-08 11:05:57 +02:00
Stephen Kelly
300ce2481e Features: Add cxx_inline_namespaces. 2014-04-08 11:05:57 +02:00
Stephen Kelly
f9d04a96b5 Features: Add cxx_variadic_macros. 2014-04-08 11:05:57 +02:00
Stephen Kelly
3d76656fb3 Features: Add cxx_uniform_initialization. 2014-04-08 11:05:56 +02:00
Stephen Kelly
e74b216c90 Features: Add cxx_generalized_initializers. 2014-04-08 11:05:56 +02:00
Stephen Kelly
ff80c3b420 Features: Add cxx_attributes. 2014-04-08 11:05:56 +02:00
Stephen Kelly
7605fee593 Features: Add cxx_alignof. 2014-04-08 11:05:56 +02:00
Stephen Kelly
e7d6e1f44f Features: Add cxx_alignas.
cxx_alignof will be a separate feature known to CMake, because
both can be implemented with separate backward compatibility
versions.
2014-04-08 11:05:56 +02:00
Stephen Kelly
32c2acd65c Features: Add cxx_extern_templates. 2014-04-08 11:05:56 +02:00
Stephen Kelly
9064f78b0c Features: Add cxx_unrestricted_unions. 2014-04-08 11:05:56 +02:00
Stephen Kelly
3322b393a2 Features: Add cxx_unicode_literals. 2014-04-08 11:05:56 +02:00
Stephen Kelly
04c5b99f38 Features: Add cxx_user_literals. 2014-04-08 11:05:56 +02:00
Stephen Kelly
e1e292cd06 Features: Add cxx_alias_templates. 2014-04-08 11:05:56 +02:00
Stephen Kelly
3300f78310 Features: Add cxx_rvalue_references. 2014-04-08 11:05:55 +02:00
Stephen Kelly
b1c5bd5314 Features: Add cxx_reference_qualified_functions. 2014-04-08 11:05:55 +02:00
Stephen Kelly
ea9c445f06 Features: Add cxx_raw_string_literals. 2014-04-08 11:05:55 +02:00
Stephen Kelly
735adf2c94 Features: Add cxx_range_for. 2014-04-08 11:05:55 +02:00
Stephen Kelly
0fa9bbf1fa Features: Add cxx_nullptr. 2014-04-08 11:05:55 +02:00
Stephen Kelly
8149fc909f Features: Add cxx_noexcept. 2014-04-08 11:05:55 +02:00
Stephen Kelly
bd2a025eb0 Features: Add cxx_nonstatic_member_init. 2014-04-08 11:05:55 +02:00
Stephen Kelly
15cdf6f51d Features: Add cxx_lambdas. 2014-04-08 11:05:55 +02:00
Stephen Kelly
a579a0aab4 Features: Add cxx_inheriting_constructors. 2014-04-08 11:05:55 +02:00
Stephen Kelly
ebab2015f9 Features: Add cxx_explicit_conversions. 2014-04-08 11:05:55 +02:00
Stephen Kelly
ac3a1b14c0 Features: Add cxx_deleted_functions. 2014-04-08 11:05:55 +02:00
Stephen Kelly
91f3699000 Features: Add cxx_defaulted_functions. 2014-04-08 11:05:54 +02:00
Stephen Kelly
7e748417bc Features: Add cxx_decltype. 2014-04-08 11:05:54 +02:00
Stephen Kelly
8d3467636c Features: Add cxx_strong_enums. 2014-04-08 11:05:54 +02:00
Stephen Kelly
0caf08e43e Features: Add cxx_auto_function. 2014-04-08 11:05:54 +02:00
Stephen Kelly
0685ac6edc Features: Add cxx_override. 2014-04-08 11:05:54 +02:00
Stephen Kelly
57ac6a905c Features: Add cxx_final. 2014-04-08 11:05:54 +02:00
Stephen Kelly
88542a6101 Features: Add cxx_static_assert. 2014-04-08 11:05:54 +02:00
Stephen Kelly
91289312fa Features: Add cxx_constexpr. 2014-04-08 11:05:54 +02:00
Stephen Kelly
10f33eee1d Features: Add cxx_variadic_templates.
Expect cxx_variadic_templates to implement N2555.

N2555 is essentially a bugfix and predates most compiler releases which
aimed to experimentally support variadic templates.
2014-04-08 11:05:54 +02:00
Stephen Kelly
750dfee29c Features: Add cxx_delegating_constructors. 2014-04-08 11:05:54 +02:00
Stephen Kelly
8ed59fc207 Add target_compile_features command.
This can be used to set the compiler features required by particular
targets. An error is issued at CMake time if the compiler does not
support the required feature. If a language dialect flag is required
by the features used, that will be added automatically.

Base the target_compile_features command on cmTargetPropCommandBase. This
gives us 'free' handling of IMPORTED, ALIAS, INTERFACE, non-compilable
and missing targets.
2014-04-07 18:11:18 +02:00
Stephen Kelly
5412deded1 cmTarget: Transitively evaluate compiler features.
Extend the interface of the target_compile_features command with
PUBLIC and INTERFACE keywords. Populate the INTERFACE_COMPILER_FEATURES
target property if they are set. Consume the INTERFACE_COMPILER_FEATURES
target property from linked dependent targets to determine the final
required compiler features and the compile flag, if needed.

Use the same pattern of origin-debugging which is used for other
build properties.
2014-04-07 18:11:18 +02:00
Stephen Kelly
f97bf4370c Features: Add cxx_auto_type.
Record the availability of this feature for GNU 4.8 on (UNIX AND
NOT APPLE) only.  In the future, availability can be recorded for
earlier GNU, for other platforms and for other compilers. Initially
the affected configurations are as restricted as possible to allow
for easy testing while extending the features vector in only one
dimension.

The error message when using the set_property API directly is not
very good, but follow up commits will provide origin debugging of
the property and a target_compile_features command which will
provide a configure-time backtrace when possible.
2014-04-07 18:11:18 +02:00
Stephen Kelly
faeddf64f2 project: Add infrastructure for recording CXX compiler features
Add a feature test using the compiler macros and the preprocessor to
determine available features.

Add a CMAKE_CXX_COMPILE_FEATURES variable which contains all features
known to the loaded compiler, and a CMAKE_CXX_KNOWN_FEATURES variable
containing all features known to CMake.  Add language standard specific
variables for internal use to determine the standard-specific compile
flags to use.

This will be extended to other languages in the future.  Follow-up
commits will add features which will be recorded by the feature test.
2014-04-07 16:48:44 +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
Brad King
5376151aa1 Merge topic 'target-transitive-sources'
9407174b target_sources: New command to add sources to target.
81ad69e0 Make the SOURCES target property writable.
6e636f2e cmTarget: Make the SOURCES origin tracable.
3676fb49 cmTarget: Allow transitive evaluation of SOURCES property.
e6971df6 cmTarget: Make the source files depend on the config.
df753df9 cmGeneratorTarget: Don't add computed sources to the target.
869328aa cmComputeTargetDepends: Use valid config to compute target depends.
2014-04-03 12:51:53 -04:00
Stephen Kelly
6e636f2eba cmTarget: Make the SOURCES origin tracable. 2014-04-02 23:14:02 +02:00
Brad King
8018fcca6e Merge branch 'master' into revise-compiler-id-policies 2014-04-02 14:44:35 -04:00
Brad King
a41c0a9dcb Do not warn by default when policy CMP0025 or CMP0047 is not set
These policies are triggered by the use of a particular compiler rather
than outdated CMake code in a project.  Avoid warning in every project
that enables a language by not displaying the policy warning by default.
Add variable CMAKE_POLICY_WARNING_CMP<NNNN> to control the warning
explicitly; otherwise enable the warning with --debug-output or --trace.

This breaks with strict policy convention because it does not provide
developers with any warning about the behavior change by default.
Existing projects will continue to build without a warning or change in
behavior.  When a developer changes the minimum required version of
CMake in a project to a sufficiently high value (3.0), the project will
suddenly get the new compiler id and may break, but at least the
breakage comes with a change to the project rather than the version of
CMake used to build it.

Breaking strict policy convention is worthwhile in this case because
very few projects will be affected by the behavior change but every
project would have to see the warning if it were enabled by default.
2014-04-02 14:43:54 -04:00
Brad King
e21ffaf8fe Merge topic 'doc-osx-path-variables'
764e977a Help: Document variables CMAKE_APPBUNDLE_PATH and CMAKE_FRAMEWORK_PATH
2014-03-10 10:35:32 -04:00
Brad King
29d4f6b03b Merge branch 'doc-osx-path-variables' into release 2014-03-10 10:24:16 -04:00
Brad King
764e977ad7 Help: Document variables CMAKE_APPBUNDLE_PATH and CMAKE_FRAMEWORK_PATH 2014-03-10 10:23:42 -04:00
Jiri Malak
06986afc4b Help: Update CMAKE_SYSTEM* and CMAKE_HOST_SYSTEM* documentation
Update to documentation for HOST/TARGET system related variables to be
consistent with current functionality.
2014-03-04 10:01:26 -05:00