mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
add option to enable linking with static C runtime when compiling with MSVC, #214
This commit is contained in:
parent
81812d6e29
commit
f27df9732c
|
@ -14,7 +14,9 @@ option(BENCHMARKS "Set to ON to build performance benchmarks (in ./benchmarks)"
|
|||
option(PYTHON "Set to ON to build Arrow conversion functions (in ./python)" OFF)
|
||||
|
||||
# Platform specific options
|
||||
if(NOT MSVC)
|
||||
if(MSVC)
|
||||
option(STATIC_CRT "Link with the static version of MSVCRT (/MD[d])" OFF)
|
||||
else()
|
||||
option(COVERAGE "Generate coverage data using gcov" OFF)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@ if(NOT COMBINED_PROJECT)
|
|||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../source ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||
endif()
|
||||
|
||||
if(MSVC AND STATIC)
|
||||
# Link with static C runtime
|
||||
if(STATIC_CRT)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/ucm.cmake)
|
||||
ucm_set_runtime(STATIC)
|
||||
endif()
|
||||
|
|
|
@ -10,8 +10,7 @@ if(NOT COMBINED_PROJECT)
|
|||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../source ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||
endif()
|
||||
|
||||
if(MSVC AND STATIC)
|
||||
# Link with static C runtime
|
||||
if(STATIC_CRT)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/ucm.cmake)
|
||||
ucm_set_runtime(STATIC)
|
||||
endif()
|
||||
|
|
|
@ -45,8 +45,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas") # ignore Windows and GCC pragmas
|
||||
endif()
|
||||
|
||||
if(MSVC AND STATIC)
|
||||
# Link with static C runtime
|
||||
if(STATIC_CRT)
|
||||
include(${XLNT_ROOT_DIR}/cmake/ucm.cmake)
|
||||
ucm_set_runtime(STATIC)
|
||||
endif()
|
||||
|
|
|
@ -9,8 +9,7 @@ if(NOT COMBINED_PROJECT)
|
|||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../source ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||
endif()
|
||||
|
||||
if(MSVC AND STATIC)
|
||||
# Link with static C runtime
|
||||
if(STATIC_CRT)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/ucm.cmake)
|
||||
ucm_set_runtime(STATIC)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue
Block a user