Skip to content

Commit 0391340

Browse files
author
Oleh Kulykov
committed
1722248828
1 parent 55412f6 commit 0391340

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,21 @@ if (MSVC)
119119
endif()
120120
if (LIBPLZMA_OPT_MSVC_MULTITHREAD_STATIC)
121121
if (CMAKE_BUILD_TYPE MATCHES Debug)
122+
message("Using Multithreaded Run-Time Debug Library(LIBCMTD.lib)")
122123
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MTd")
123124
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MTd")
124125
else()
126+
message("Using Multithreaded Run-Time Library(LIBCMT.lib)")
125127
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MT")
126128
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MT")
127129
endif()
128130
else()
129131
if (CMAKE_BUILD_TYPE MATCHES Debug)
132+
message("Using Multithreaded Run-Time Debug DLL Library(MSVCRTD.lib)")
130133
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MDd")
131134
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MDd")
132135
else()
136+
message("Using Multithreaded Run-Time DLL Library(MSVCRT.lib)")
133137
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MD")
134138
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD")
135139
endif()

src/plzma.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,17 +260,22 @@ const char * LIBPLZMA_NONNULL plzma_version(void) {
260260
// Causes the application to use the multithread-specific and DLL-specific version of the run-time library.
261261
// Defines _MT and _DLL and causes the compiler to place the library name MSVCRT.lib into the .obj file.
262262
// /MD (MSVCRT.lib) | /MDd (MSVCRTD.lib)
263-
" : run-time multithreaded DLL"
264-
# else
263+
# if defined(_DEBUG)
264+
" : multithreaded run-time debug DLL"
265+
# else
266+
" : multithreaded run-time DLL"
267+
# endif // _DEBUG
268+
# else // !_DLL
265269
// Causes the application to use the multithread, static version of the run-time library.
266270
// Defines _MT and causes the compiler to place the library name LIBCMT.lib into the .obj file
267271
// so that the linker will use LIBCMT.lib to resolve external symbols.
268272
// /MT (LIBCMT.lib) | /MTd (LIBCMTD.lib)
269-
" : run-time multithreaded static"
273+
# if defined(_DEBUG)
274+
" : multithreaded run-time debug"
275+
# else
276+
" : multithreaded run-time"
277+
# endif // _DEBUG
270278
# endif // _DLL
271-
# if defined(_DEBUG)
272-
"(debug)"
273-
# endif // _DEBUG
274279
# endif // _MT && _MT > 0
275280
#endif
276281

0 commit comments

Comments
 (0)