зеркало из https://github.com/microsoft/msquic.git
Statically link the C runtime on Windows (#106)
This commit is contained in:
Родитель
acacb15e2c
Коммит
154ee7e4eb
|
@ -29,6 +29,7 @@ option(QUIC_BUILD_TOOLS "Builds the tools code" ON)
|
|||
option(QUIC_BUILD_TEST "Builds the test code" ON)
|
||||
option(QUIC_ENABLE_LOGGING "Enables logging" ON)
|
||||
option(QUIC_SANITIZE_ADDRESS "Enables address sanitizer" OFF)
|
||||
option(QUIC_STATIC_LINK_CRT "Statically links the C runtime" ON)
|
||||
|
||||
if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
|
||||
set(QUIC_PLATFORM "windows")
|
||||
|
@ -88,6 +89,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
|||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
|
||||
if(QUIC_STATIC_LINK_CRT)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
else()
|
||||
# Custom build flags.
|
||||
set(QUIC_COMMON_FLAGS "-DQUIC_PLATFORM_LINUX -fms-extensions -fPIC -Wall -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-value -pthread")
|
||||
|
|
Загрузка…
Ссылка в новой задаче