Skip to content

Commit

Permalink
Revert "CMakeLists: use static runtime library"
Browse files Browse the repository at this point in the history
This reverts commit 26a3c63.
  • Loading branch information
rajendra-desai-ni committed Sep 2, 2024
1 parent ed1463e commit c9e828a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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$<$<CONFIG:Debug>: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()

Expand Down

0 comments on commit c9e828a

Please sign in to comment.