summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/mac/clang-cxx-language-standard
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/gyp/test/mac/clang-cxx-language-standard')
-rw-r--r--third_party/python/gyp/test/mac/clang-cxx-language-standard/c++11.cc8
-rw-r--r--third_party/python/gyp/test/mac/clang-cxx-language-standard/c++98.cc24
-rw-r--r--third_party/python/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp30
3 files changed, 62 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++11.cc b/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++11.cc
new file mode 100644
index 0000000000..756dc1c7e6
--- /dev/null
+++ b/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++11.cc
@@ -0,0 +1,8 @@
+// Copyright (c) 2013 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+static_assert(__cplusplus == 201103L, "wrong c++ standard version");
+
+int main() { return 0; }
+
diff --git a/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++98.cc b/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++98.cc
new file mode 100644
index 0000000000..a6a00c70f4
--- /dev/null
+++ b/third_party/python/gyp/test/mac/clang-cxx-language-standard/c++98.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2013 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#if __cplusplus != 199711L
+#error wrong c++ standard version
+#endif
+
+enum cxx11_keywords {
+ alignas,
+ alignof,
+ char16_t,
+ char32_t,
+ constexpr,
+ decltype,
+ noexcept,
+ nullptr,
+ override,
+ static_assert,
+ thread_local,
+};
+
+int main() { return 0; }
+
diff --git a/third_party/python/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp b/third_party/python/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp
new file mode 100644
index 0000000000..eb60bbd0e8
--- /dev/null
+++ b/third_party/python/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp
@@ -0,0 +1,30 @@
+# Copyright (c) 2013 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'make_global_settings': [
+ ['CC', '/usr/bin/clang'],
+ ['CXX', '/usr/bin/clang++'],
+ ],
+ 'targets': [
+ {
+ 'target_name': 'c++98',
+ 'type': 'executable',
+ 'sources': [ 'c++98.cc', ],
+ 'xcode_settings': {
+ 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
+ 'CLANG_CXX_LANGUAGE_STANDARD': 'c++98',
+ },
+ },
+ {
+ 'target_name': 'c++11',
+ 'type': 'executable',
+ 'sources': [ 'c++11.cc', ],
+ 'xcode_settings': {
+ 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
+ 'CLANG_CXX_LANGUAGE_STANDARD': 'c++0x',
+ },
+ },
+ ],
+}
+