[libcxx-commits] [PATCH] D155561: [libcxx] Respect CMAKE_MSVC_RUNTIME_LIBRARY wrt whether to use the debug CRT

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 2 03:42:26 PDT 2023


mstorsjo updated this revision to Diff 546392.
mstorsjo added a comment.

Rebased to place this on top of the deduplication.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155561/new/

https://reviews.llvm.org/D155561

Files:
  libcxx/CMakeLists.txt
  libcxx/test/CMakeLists.txt


Index: libcxx/test/CMakeLists.txt
===================================================================
--- libcxx/test/CMakeLists.txt
+++ libcxx/test/CMakeLists.txt
@@ -59,7 +59,8 @@
     set(cxx_lib "libcpmt")
   endif()
 
-  if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+  if ((NOT CMAKE_MSVC_RUNTIME_LIBRARY AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+      OR (CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "Debug"))
     set(dbg_include " -include set_windows_crt_report_mode.h")
     set(crt_lib "${crt_lib}d")
     set(cxx_lib "${cxx_lib}d")
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -682,7 +682,8 @@
   endif()
 
   if (MSVC)
-    if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+    if ((NOT CMAKE_MSVC_RUNTIME_LIBRARY AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+        OR (CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "Debug"))
       set(LIB_SUFFIX "d")
     else()
       set(LIB_SUFFIX "")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155561.546392.patch
Type: text/x-patch
Size: 1009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230802/29dc7388/attachment.bin>


More information about the libcxx-commits mailing list