Stephen Kelly
a3d0ae1758
Features: Fix the default C dialect for Clang and GNU.
...
Clang 3.4 uses C99 by default, and Clang 3.6 uses C11 by default:
http://thread.gmane.org/gmane.comp.compilers.clang.devel/39379
GNU 4.9 uses C90 by default, and GNU 5.0 uses C11 by default:
https://gcc.gnu.org/gcc-5/changes.html
Test that the default compiler settings result in the expected dialect
macros being defined for both C and CXX. Remove the unused main.c
file from the CompileFeatures unit test.
2014-11-20 18:24:59 +01:00
Stephen Kelly
7565ab2cd1
Features: Test the CXX compiler only if it has features.
...
If using different C and CXX compilers, we might not have a
feature-full CXX compiler at this point.
2014-11-19 00:42:35 +01:00
Stephen Kelly
dd043c3f21
Features: Add support for C++14 features.
...
Record the features implemented by GNU 4.9 and Clang 3.4.
2014-05-22 18:01:23 +02:00
Stephen Kelly
0dfe395e3c
Features: Add COMPILE_FEATURES generator expression.
...
Allow setting build properties based on the features available
for a target. The availability of features is determined at
generate-time by evaluating the link implementation.
Ensure that the <LANG>_STANDARD determined while evaluating
COMPILE_FEATURES in the link implementation is not lower than that
provided by the INTERFACE of the link implementation. This is
similar to handling of transitive properties such as
POSITION_INDEPENDENT_CODE.
2014-05-21 17:22:32 +02:00
Stephen Kelly
e0890d03a4
Features: Extend concept to C language.
...
Add properties and variables corresponding to CXX equivalents.
Add features for c_function_prototypes (C90), c_restrict (C99),
c_variadic_macros (C99) and c_static_assert (C11). This feature
set can be extended later.
Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader
to conditionally represent the c_restrict feature.
2014-05-15 00:15:18 +02:00
Stephen Kelly
6a9fdbeb48
Test: Parameterize the language in the CompileFeature test.
2014-05-09 17:29:05 +02:00
Stephen Kelly
f5bf9d4311
Tests: Make CompileFeature tests use highest standard known.
...
Remove the use of check_cxx_source_compiles which is now just getting in
the way.
Blacklist the cxx_alignof feature in the test with GNU 4.7. The test
file compiles, but it is documented as available first in GNU 4.8.
2014-05-09 14:39:30 +02:00
Brad King
f1d504d6cd
Merge topic 'GNU-4.7-features'
...
9cbc63e4
Features: Record for GNU 4.7.
2014-05-08 11:28:03 -04:00
Stephen Kelly
9cbc63e40c
Features: Record for GNU 4.7.
...
Update the CompileFeatures test to verify that unsupported features
do not work.
2014-05-07 22:02:02 +02:00
Stephen Kelly
205215fb8a
cmTarget: Add CXX_STANDARD_REQUIRED to control decay.
2014-05-07 12:17:49 +02:00
Stephen Kelly
3fdfa5d3fc
Features: Make CMAKE_CXX_KNOWN_FEATURES a property.
...
As a 'built-in' variable it imposes a cost on all variable lookups
and it is expected to be rarely used.
2014-05-02 10:18:16 +02:00
Brad King
8535d4cf5d
Merge topic 'cxx98-features'
...
a36b957f
Features: Add cxx_template_template_parameters.
2014-04-30 09:42:00 -04:00
Stephen Kelly
447fbb3fac
Tests: Execute compile features tests unconditionally.
...
Conditionally create a dummy test if there are no known features.
2014-04-17 16:20:50 +02:00
Stephen Kelly
a36b957fc4
Features: Add cxx_template_template_parameters.
...
Extend the existing feature infrastructure as needed to support
both C++11 and C++98 features.
2014-04-16 15:16:23 +02:00
Stephen Kelly
60c0d2dd81
Features: Add cxx_defaulted_move_initializers.
2014-04-08 11:05:58 +02:00
Stephen Kelly
c4e672358c
Features: Add cxx_long_long_type.
2014-04-08 11:05:58 +02:00
Stephen Kelly
dcaafada0e
Features: Add cxx_func_identifier.
2014-04-08 11:05:57 +02:00
Stephen Kelly
251a1f02a0
Features: Add cxx_local_type_template_args.
2014-04-08 11:05:57 +02:00
Stephen Kelly
53fe7773e6
Features: Add cxx_extended_friend_declarations.
2014-04-08 11:05:57 +02:00
Stephen Kelly
16603f7cdb
Features: Add cxx_enum_forward_declarations.
2014-04-08 11:05:57 +02:00
Stephen Kelly
adf22f611e
Features: Add cxx_default_function_template_args.
2014-04-08 11:05:57 +02:00
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