Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ option(BUILD_MCMODELLARGE "Build the library linked with mcmodel=large flag, use
option(BUILD_LICCHECK_PRINT "Build libraries with licence check flag" OFF)
option(BUILD_DYNRT_LIBS "Build the libraries linked against the dynamic runtime (windows only)" OFF)
option(BUILD_MT_LIBS "Build the multithreaded library" OFF)
option(BUILD_WITH_DEFAULT_MSVC_RUNTIME_LIBRARY "If ON, do not manually set MSVC_RUNTIME_LIBRARY property" OFF)
mark_as_advanced(BUILD_WITH_DEFAULT_MSVC_RUNTIME_LIBRARY)
option(BUILD_CPP "Build the cpp interface" OFF)
option(BUILD_F2C "Build the f2c library" OFF)
if (${CMAKE_VERSION} VERSION_LESS "3.9.0")
Expand Down Expand Up @@ -346,14 +348,16 @@ macro(createSingleASL name sourcedir sources)
if(NOT WIN32)
target_link_libraries(${name} PRIVATE m)
endif()
if(MSVC)
if(MSVC AND NOT BUILD_WITH_DEFAULT_MSVC_RUNTIME_LIBRARY)
if(${name} MATCHES "dynrt")
set_property(TARGET ${name} PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
set_property(TARGET ${name} PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
endif()
if(MSVC)
target_compile_options(${name} PRIVATE
/wd4013 /wd4018 /wd4101 /wd4244 /wd4273 /wd4267 /wd4996)
else()
Expand Down
Loading