[PATCH 117/144] drop the "clangxx works" check from the vecmathlib age
authorAndreas Beckmann <anbe@debian.org>
Wed, 8 Dec 2021 23:35:56 +0000 (00:35 +0100)
committerAndreas Beckmann <anbe@debian.org>
Fri, 7 Jan 2022 23:55:22 +0000 (23:55 +0000)
Gbp-Pq: Name 0117-drop-the-clangxx-works-check-from-the-vecmathlib-age.patch

cmake/LLVM.cmake

index 79801af9b50a8edbcc08afa0674f81d3c4852587..a634fbdf0e2d7f7c3b36e996c7e63b726fb30b3d 100644 (file)
@@ -554,51 +554,6 @@ ${TYPEDEF}" "typedef struct { char x; ${TYPE} y; } ac__type_alignof_;
 
 endmacro()
 
-####################################################################
-#
-# clangxx works check 
-#
-
-# TODO clang + vecmathlib doesn't work on Windows yet...
-if(CLANGXX AND (NOT WIN32) AND ENABLE_HOST_CPU_DEVICES)
-
-  message(STATUS "Checking if clang++ works (required by vecmathlib)")
-
-  set(CXX_WORKS 0)
-  set(CXX_STDLIB "")
-
-  if(NOT DEFINED CLANGXX_WORKS)
-
-    custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream> \n  #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-std=c++11")
-
-    if(NOT _STATUS_FAIL)
-      set(CXX_WORKS 1)
-    else()
-      custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream> \n  #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libstdc++" "-std=c++11")
-      if (NOT _STATUS_FAIL)
-        set(CXX_STDLIB "-stdlib=libstdc++")
-        set(CXX_WORKS 1)
-      else()
-        custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream> \n  #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libc++" "-std=c++11")
-        if(NOT _STATUS_FAIL)
-          set(CXX_STDLIB "-stdlib=libc++")
-          set(CXX_WORKS 1)
-        endif()
-      endif()
-    endif()
-
-    set(CLANGXX_WORKS ${CXX_WORKS} CACHE INTERNAL "Clang++ ")
-    set(CLANGXX_STDLIB ${CXX_STDLIB} CACHE INTERNAL "Clang++ stdlib")
-  endif()
-
-
-endif()
-
-if(CLANGXX_STDLIB AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
-  set(LLVM_CXXFLAGS "${CLANGXX_STDLIB} ${LLVM_CXXFLAGS}")
-  set(LLVM_LDFLAGS "${CLANGXX_STDLIB} ${LLVM_LDFLAGS}")
-endif()
-
 ####################################################################
 #
 # - '-DNDEBUG' is a work-around for llvm bug 18253