Skip to content

Commit 2490035

Browse files
committed
fix(CMake): wrong default policy
1 parent aff4398 commit 2490035

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

cmake/SuperBuild.cmake

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,8 @@ if(NOT CPACK_PACKAGE_VERSION)
2222
set(CPACK_PACKAGE_VERSION "master")
2323
endif()
2424

25-
if(WIN32)
26-
if(CMAKE_C_FLAGS_DEBUG)
27-
string(REPLACE "/MDd" "/MD" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
28-
endif()
29-
if(CMAKE_CXX_FLAGS_DEBUG)
30-
string(REPLACE "/MDd" "/MD" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
31-
endif()
32-
endif()
25+
cmake_policy(CMP0091 NEW)
26+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
3327

3428
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
3529
message(STATUS "Setting build type to 'Release' as none was specified.")

cmake/utils.cmake

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,8 @@ if(NOT BUILD_SHARED_LIBS)
5656
)
5757
endif()
5858

59-
if(WIN32)
60-
if(CMAKE_C_FLAGS_DEBUG)
61-
string(REPLACE "/MDd" "/MD" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
62-
endif()
63-
if(CMAKE_CXX_FLAGS_DEBUG)
64-
string(REPLACE "/MDd" "/MD" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
65-
endif()
66-
endif()
59+
cmake_policy(CMP0091 NEW)
60+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
6761

6862
#------------------------------------------------------------------------------------------------
6963
# Install configuration

0 commit comments

Comments
 (0)