summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d30411c8..d60f935a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,6 +88,10 @@ if(MSVC)
# it is not a good idea to disable them, but we do this to duplicate the
# behavior of GCC, which is less strict.
add_definitions(-wd4244 -wd4267 -wd4800 -wd4996)
+
+ # Avoid linker warning when doing Debug build if dependent libraries are
+ # linked with the Release version of the static C library.
+ set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:LIBCMT")
endif()
# Minimum version is Windows 2000 (5.0)