mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
CMake: Remove duplicate MSVC check
As of this commit, L98 of winconf.cmake already checks for MSVC before winconf-msvc calls this macro, so we are guaranteed to be satisfy the check.
This commit is contained in:
parent
9f9868bd79
commit
b7f2122c06
@ -1,38 +1,36 @@
|
|||||||
macro(configure_msvc_runtime)
|
macro(configure_msvc_runtime)
|
||||||
if(MSVC)
|
# Default to statically-linked runtime.
|
||||||
# Default to statically-linked runtime.
|
if("${MSVC_RUNTIME}" STREQUAL "")
|
||||||
if("${MSVC_RUNTIME}" STREQUAL "")
|
set(MSVC_RUNTIME "static")
|
||||||
set(MSVC_RUNTIME "static")
|
endif()
|
||||||
endif()
|
# Set compiler options.
|
||||||
# Set compiler options.
|
set(variables
|
||||||
set(variables
|
CMAKE_C_FLAGS_DEBUG
|
||||||
CMAKE_C_FLAGS_DEBUG
|
CMAKE_C_FLAGS_MINSIZEREL
|
||||||
CMAKE_C_FLAGS_MINSIZEREL
|
CMAKE_C_FLAGS_RELEASE
|
||||||
CMAKE_C_FLAGS_RELEASE
|
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
CMAKE_CXX_FLAGS_DEBUG
|
||||||
CMAKE_CXX_FLAGS_DEBUG
|
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
CMAKE_CXX_FLAGS_RELEASE
|
||||||
CMAKE_CXX_FLAGS_RELEASE
|
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
)
|
||||||
|
if(${MSVC_RUNTIME} STREQUAL "static")
|
||||||
|
message(STATUS
|
||||||
|
"MSVC -> forcing use of statically-linked runtime."
|
||||||
)
|
)
|
||||||
if(${MSVC_RUNTIME} STREQUAL "static")
|
foreach(variable ${variables})
|
||||||
message(STATUS
|
if(${variable} MATCHES "/MD")
|
||||||
"MSVC -> forcing use of statically-linked runtime."
|
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
|
||||||
)
|
endif()
|
||||||
foreach(variable ${variables})
|
endforeach()
|
||||||
if(${variable} MATCHES "/MD")
|
else()
|
||||||
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
|
message(STATUS
|
||||||
endif()
|
"MSVC -> forcing use of dynamically-linked runtime."
|
||||||
endforeach()
|
)
|
||||||
else()
|
foreach(variable ${variables})
|
||||||
message(STATUS
|
if(${variable} MATCHES "/MT")
|
||||||
"MSVC -> forcing use of dynamically-linked runtime."
|
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
|
||||||
)
|
endif()
|
||||||
foreach(variable ${variables})
|
endforeach()
|
||||||
if(${variable} MATCHES "/MT")
|
|
||||||
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user