diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-04 08:59:22 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-08 09:05:56 (GMT) |
commit | 3322b393a265747ae7c187d426f7f1676b478de4 (patch) | |
tree | 7a05f794a4fc52ef17d112cf1ff45fd9616788f3 | |
parent | 04c5b99f38aef9a5c9627c35659891aecd8ab41e (diff) | |
download | CMake-3322b393a265747ae7c187d426f7f1676b478de4.zip CMake-3322b393a265747ae7c187d426f7f1676b478de4.tar.gz CMake-3322b393a265747ae7c187d426f7f1676b478de4.tar.bz2 |
Features: Add cxx_unicode_literals.
-rw-r--r-- | Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst | 5 | ||||
-rw-r--r-- | Modules/Compiler/GNU-CXX-FeatureTests.cmake | 1 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 1 | ||||
-rw-r--r-- | Tests/CompileFeatures/cxx_unicode_literals.cpp | 3 |
4 files changed, 10 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst index 1ea3b68..07defb3 100644 --- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst +++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst @@ -122,6 +122,11 @@ The features known to this version of CMake are: .. _N2541: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm +``cxx_unicode_literals`` + Unicode string literals, as defined in N2442_. + + .. _N2442: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm + ``cxx_user_literals`` User-defined literals, as defined in N2765_. diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake index 12d2adc..44af004 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_strong_enums "${GNU44_CXX11}") set(_cmake_feature_test_cxx_trailing_return_types "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}") set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}") # TODO: If features are ever recorded for GNU 4.3, there should possibly # be a new feature added like cxx_variadic_template_template_parameters, diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index bcd192d..993dcce 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -64,6 +64,7 @@ F(cxx_static_assert) \ F(cxx_strong_enums) \ F(cxx_trailing_return_types) \ + F(cxx_unicode_literals) \ F(cxx_user_literals) \ F(cxx_variadic_templates) diff --git a/Tests/CompileFeatures/cxx_unicode_literals.cpp b/Tests/CompileFeatures/cxx_unicode_literals.cpp new file mode 100644 index 0000000..a7b7df0 --- /dev/null +++ b/Tests/CompileFeatures/cxx_unicode_literals.cpp @@ -0,0 +1,3 @@ + +const char16_t lit_16[] = u"\u00DA"; +const char32_t lit_32[] = U"\u00DA"; |