[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-1885-gb494d7b
Stephen Kelly
steveire at gmail.com
Fri Apr 4 08:54:04 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via b494d7b38a304d281fac3572626c48f9d6a8b7f7 (commit)
via 172167656938b876fed0d685f14b9c2e099420e0 (commit)
via fc3a066a8d2b3b848eedb63bc51e8d07d37f8f47 (commit)
from 75b59b4d73cf144326f0297e63411d22e713b5ab (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b494d7b38a304d281fac3572626c48f9d6a8b7f7
commit b494d7b38a304d281fac3572626c48f9d6a8b7f7
Merge: 75b59b4 1721676
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Apr 4 08:54:02 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 4 08:54:02 2014 -0400
Merge topic 'cxx11-features' into next
17216765 Features: Add cxx_uniform_initialization.
fc3a066a Features: Add cxx_generalized_initializers.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=172167656938b876fed0d685f14b9c2e099420e0
commit 172167656938b876fed0d685f14b9c2e099420e0
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Apr 4 14:53:25 2014 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Apr 4 14:53:25 2014 +0200
Features: Add cxx_uniform_initialization.
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
index 680807b..c45f8ad 100644
--- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -166,3 +166,8 @@ The features known to this version of CMake are:
Initializer lists, as defined in N2672_.
.. _N2672: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
+
+``cxx_uniform_initialization``
+ Uniform intialization, as defined in N2640_.
+
+.. _N2640: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2640.pdf
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 511b82a..eaa40ce 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -39,6 +39,7 @@ set(_cmake_feature_test_cxx_deleted_functions "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_extern_templates "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_generalized_initializers "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_uniform_initialization "${GNU44_CXX11}")
# TODO: Should be supported by GNU 4.3
set(GNU43_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 85dac5f..5b0a8f6 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -72,7 +72,8 @@
F(cxx_alignas) \
F(cxx_alignof) \
F(cxx_attributes) \
- F(cxx_generalized_initializers)
+ F(cxx_generalized_initializers) \
+ F(cxx_uniform_initialization)
class cmMakefile::Internals
{
diff --git a/Tests/CompileFeatures/cxx_uniform_initialization.cpp b/Tests/CompileFeatures/cxx_uniform_initialization.cpp
new file mode 100644
index 0000000..82c76e2
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_uniform_initialization.cpp
@@ -0,0 +1,9 @@
+struct A {};
+struct B {
+ B(A) {}
+};
+
+void Func()
+{
+ B b{A{}};
+}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc3a066a8d2b3b848eedb63bc51e8d07d37f8f47
commit fc3a066a8d2b3b848eedb63bc51e8d07d37f8f47
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Apr 4 14:52:48 2014 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Apr 4 14:52:48 2014 +0200
Features: Add cxx_generalized_initializers.
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
index c6ac7d7..680807b 100644
--- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -161,3 +161,8 @@ The features known to this version of CMake are:
Generic attributes, as defined in N2761_.
.. _N2761: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf
+
+``cxx_generalized_initializers``
+ Initializer lists, as defined in N2672_.
+
+.. _N2672: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index c09efe5..511b82a 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -38,6 +38,7 @@ set(_cmake_feature_test_cxx_defaulted_functions "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_deleted_functions "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}")
set(_cmake_feature_test_cxx_extern_templates "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_generalized_initializers "${GNU44_CXX11}")
# TODO: Should be supported by GNU 4.3
set(GNU43_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c1191e8..85dac5f 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -71,7 +71,8 @@
F(cxx_extern_templates) \
F(cxx_alignas) \
F(cxx_alignof) \
- F(cxx_attributes)
+ F(cxx_attributes) \
+ F(cxx_generalized_initializers)
class cmMakefile::Internals
{
diff --git a/Tests/CompileFeatures/cxx_generalized_initializers.cpp b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
new file mode 100644
index 0000000..f4cd999
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
@@ -0,0 +1,23 @@
+
+// Dummy implementation. Test only the compiler feature.
+namespace std {
+ typedef decltype(sizeof(int)) size_t;
+ template <class _E>
+ class initializer_list
+ {
+ const _E* __begin_;
+ size_t __size_;
+
+ };
+}
+
+template <typename T>
+struct A
+{
+ A(std::initializer_list<T>) {}
+};
+
+int someFunc()
+{
+ A<int> as = { 1, 2, 3, 4 };
+}
-----------------------------------------------------------------------
Summary of changes:
Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst | 10 +++++++++
Modules/Compiler/GNU-CXX-FeatureTests.cmake | 2 ++
Source/cmMakefile.cxx | 4 +++-
.../cxx_generalized_initializers.cpp | 23 ++++++++++++++++++++
.../CompileFeatures/cxx_uniform_initialization.cpp | 9 ++++++++
5 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 Tests/CompileFeatures/cxx_generalized_initializers.cpp
create mode 100644 Tests/CompileFeatures/cxx_uniform_initialization.cpp
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list