diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-04 13:05:10 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-08 09:05:57 (GMT) |
commit | f9d04a96b57ad5f68259b978983289043ae22716 (patch) | |
tree | b428a2248c6ba0bef5fb86a64f7af646bf797e91 | |
parent | 3d76656fb3db56f364bbf7a7655ab1433b72d284 (diff) | |
download | CMake-f9d04a96b57ad5f68259b978983289043ae22716.zip CMake-f9d04a96b57ad5f68259b978983289043ae22716.tar.gz CMake-f9d04a96b57ad5f68259b978983289043ae22716.tar.bz2 |
Features: Add cxx_variadic_macros.
-rw-r--r-- | Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst | 5 | ||||
-rw-r--r-- | Modules/Compiler/GNU-CXX-FeatureTests.cmake | 2 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 1 | ||||
-rw-r--r-- | Tests/CompileFeatures/cxx_variadic_macros.cpp | 12 |
4 files changed, 20 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst index 55521d9..7b94560 100644 --- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst +++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst @@ -167,6 +167,11 @@ The features known to this version of CMake are: .. _N2765: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf +``cxx_variadic_macros`` + Variadic macros, as defined in N1653_. + + .. _N1653: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm + ``cxx_variadic_templates`` Variadic templates, as defined in N2242_. diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake index a3b4339..df34b7a 100644 --- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake +++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake @@ -60,4 +60,6 @@ set(_cmake_feature_test_cxx_rvalue_references "${GNU43_CXX11}") set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}") # TODO: Should be supported since GNU 3.4? set(_cmake_feature_test_cxx_extern_templates "${_oldestSupported} && __cplusplus >= 201103L") +# TODO: Should be supported forever? +set(_cmake_feature_test_cxx_variadic_macros "${_oldestSupported} && __cplusplus >= 201103L") set(_oldestSupported) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 65f9594..a5a76c8 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -73,6 +73,7 @@ F(cxx_uniform_initialization) \ F(cxx_unrestricted_unions) \ F(cxx_user_literals) \ + F(cxx_variadic_macros) \ F(cxx_variadic_templates) class cmMakefile::Internals diff --git a/Tests/CompileFeatures/cxx_variadic_macros.cpp b/Tests/CompileFeatures/cxx_variadic_macros.cpp new file mode 100644 index 0000000..4d007a5 --- /dev/null +++ b/Tests/CompileFeatures/cxx_variadic_macros.cpp @@ -0,0 +1,12 @@ + +int someFunc(int, char, int) +{ + return 0; +} + +#define FUNC_WRAPPER(...) someFunc(__VA_ARGS__) + +void otherFunc() +{ + FUNC_WRAPPER(42, 'a', 7); +} |