[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
Fri Aug 4 05:55:49 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9b02e8d4a0ab: [libcxx] Respect CMAKE_MSVC_RUNTIME_LIBRARY wrt whether to use the debug CRT (authored by mstorsjo).

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 " -D_DEBUG -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.547180.patch
Type: text/x-patch
Size: 1018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230804/b6be6690/attachment-0001.bin>


More information about the libcxx-commits mailing list