]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/fmt/support/cmake/cxx14.cmake
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / fmt / support / cmake / cxx14.cmake
index 1866cdcc5f2c5df23a7492c99a8c5a03e52c7c35..16ff57541b18c005ade84d0c9fe87e0676c3f35c 100644 (file)
@@ -48,43 +48,6 @@ endif ()
 
 set(CMAKE_REQUIRED_FLAGS ${CXX_STANDARD_FLAG})
 
-# Check if variadic templates are working and not affected by GCC bug 39653:
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39653
-check_cxx_source_compiles("
-  template <class T, class ...Types>
-  struct S { typedef typename S<Types...>::type type; };
-  int main() {}" SUPPORTS_VARIADIC_TEMPLATES)
-if (NOT SUPPORTS_VARIADIC_TEMPLATES)
-  set (SUPPORTS_VARIADIC_TEMPLATES OFF)
-endif ()
-
-# Check if initializer lists are supported.
-check_cxx_source_compiles("
-  #include <initializer_list>
-  int main() {}" SUPPORTS_INITIALIZER_LIST)
-if (NOT SUPPORTS_INITIALIZER_LIST)
-  set (SUPPORTS_INITIALIZER_LIST OFF)
-endif ()
-
-# Check if enum bases are available
-check_cxx_source_compiles("
-  enum C : char {A};
-  int main() {}"
-  SUPPORTS_ENUM_BASE)
-if (NOT SUPPORTS_ENUM_BASE)
-  set (SUPPORTS_ENUM_BASE OFF)
-endif ()
-
-# Check if type traits are available
-check_cxx_source_compiles("
-  #include <type_traits>
-  class C { void operator=(const C&); };
-  int main() { static_assert(!std::is_copy_assignable<C>::value, \"\"); }"
-  SUPPORTS_TYPE_TRAITS)
-if (NOT SUPPORTS_TYPE_TRAITS)
-  set (SUPPORTS_TYPE_TRAITS OFF)
-endif ()
-
 # Check if user-defined literals are available
 check_cxx_source_compiles("
   void operator\"\" _udl(long double);
@@ -94,4 +57,14 @@ if (NOT SUPPORTS_USER_DEFINED_LITERALS)
   set (SUPPORTS_USER_DEFINED_LITERALS OFF)
 endif ()
 
+# Check if <variant> is available
+set(CMAKE_REQUIRED_FLAGS -std=c++1z)
+check_cxx_source_compiles("
+  #include <variant>
+  int main() {}"
+  FMT_HAS_VARIANT)
+if (NOT FMT_HAS_VARIANT)
+  set (FMT_HAS_VARIANT OFF)
+endif ()
+
 set(CMAKE_REQUIRED_FLAGS )