Skip to content

Commit

Permalink
Fix options for CMAKE_MSVC_RUNTIME_LIBRARY
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Jul 4, 2020
1 parent b23b26c commit 36f9031
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion project/cmake/CompilerOption.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ if(NOT DEFINED __COMPILER_OPTION_LOADED)
endif()
endif()
else()
if(NOT CMAKE_MSVC_RUNTIME)
if (NOT CMAKE_MSVC_RUNTIME AND NOT CMAKE_MSVC_RUNTIME_LIBRARY)
set(CMAKE_MSVC_RUNTIME "MD")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
add_compiler_flags_to_var(CMAKE_CXX_FLAGS_DEBUG /Od /${CMAKE_MSVC_RUNTIME}d)
add_compiler_flags_to_var(CMAKE_CXX_FLAGS_RELEASE /O2 /${CMAKE_MSVC_RUNTIME} /D NDEBUG)
Expand Down

0 comments on commit 36f9031

Please sign in to comment.