Skip to content

Commit

Permalink
Fixed statically linking runtime under Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Jul 17, 2024
1 parent cde7bd1 commit 7f2a70e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ elseif(WIN32)
libs/utf8_console/utf8_console.cpp
)

add_compile_options(/GR- /W1 /permissive- /Zc:hiddenFriend-)
set(MSVC_SHARED_RUNTIME OFF)
add_compile_options(/GR- /GL /Os /MP /W3 /wd4100)
add_link_options($<$<CONFIG:RELEASE>:/LTCG>)
add_compile_options($<$<CONFIG:RELEASE>:/MT>)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
endif()

include_directories(.)
Expand Down
2 changes: 1 addition & 1 deletion src/output_texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace {
}
return true;
}
catch (const std::exception& ex) {
catch ([[maybe_unused]] const std::exception& ex) {
#if defined(NDEBUG)
throw;
#else
Expand Down

0 comments on commit 7f2a70e

Please sign in to comment.