From bd1c9e598a59b66b81e852206f4b16e647a60212 Mon Sep 17 00:00:00 2001 From: 10km <10km0811@sohu.com> Date: Wed, 5 Jan 2022 11:10:50 +0800 Subject: [PATCH] Update CMakeLists.txt remove '-MD' in ADD_DEFINITIONS command. why add the -MD? this -MD forcible control MSVC generate code with /MD option if user want to compile with /MT by set option -DCMAKE_USER_MAKE_RULES_OVERRIDE=compiler_flag_overrides.cmake in command line, the '-MD' definition cause it not work; --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8bfd7db..cf0fd68b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ STRING(TIMESTAMP BUILD_TIMESTAMP UTC) MESSAGE(STATUS "Timestamp is ${BUILD_TIMESTAMP}") IF(WIN32) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN) ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") ADD_DEFINITIONS(-DOSX) ENDIF()