From c9e828a87397d22bcdb7e8209c8a88f7c373cee8 Mon Sep 17 00:00:00 2001 From: Rajendra Desai Date: Mon, 2 Sep 2024 14:02:25 +0530 Subject: [PATCH] Revert "CMakeLists: use static runtime library" This reverts commit 26a3c63d05e64b326c18cbe778f0d14e886433ab. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c1041b09..8d347619b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,13 +15,13 @@ endif() # Enforce consistent runtime library settings in case of MSVC if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if (POLICY CMP0091) - message("Policy CMP0091 available, setting compiler flags automatically") cmake_policy(SET CMP0091 NEW) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + message("Setting policy CMP0091 and runtime library") else() - message("Policy CMP0091 not available, setting compiler flags manually") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + message("Using dynamic runtime library") endif() endif()