[flang-commits] [flang] [clang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

Martin Storsjö via flang-commits flang-commits at lists.llvm.org
Wed Nov 1 02:23:53 PDT 2023


================
@@ -53,3 +53,26 @@ add_flang_library(FortranDecimal INSTALL_WITH_TOOLCHAIN
   binary-to-decimal.cpp
   decimal-to-binary.cpp
 )
+
+if (DEFINED MSVC)
+  set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
----------------
mstorsjo wrote:

Instead of redefining `CMAKE_MSVC_RUNTIME_LIBRARY` repeatedly, if you really want to set it specifically for one library, it's better to set the `MSVC_RUNTIME_LIBRARY` target property instead - see https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html.

https://github.com/llvm/llvm-project/pull/70833


More information about the flang-commits mailing list