Browse Source

Merge topic 'cxxmodules-nolibcxx-import-std-reason'

c0385a6b9c Modules/Compiler/Clang: add a reason for non-`libc++` compilations

Acked-by: Kitware Robot <[email protected]>
Merge-request: !9504
Brad King 1 year ago
parent
commit
3bb51964bd
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Modules/Compiler/Clang-CXX-CXXImportStd.cmake

+ 3 - 0
Modules/Compiler/Clang-CXX-CXXImportStd.cmake

@@ -1,5 +1,8 @@
 function (_cmake_cxx_import_std std variable)
   if (NOT CMAKE_CXX_STANDARD_LIBRARY STREQUAL "libc++")
+    set("${variable}"
+      "set(CMAKE_CXX${std}_COMPILER_IMPORT_STD_NOT_FOUND_MESSAGE \"Only `libc++` is supported\")\n"
+      PARENT_SCOPE)
     return ()
   endif ()