diff --git a/test/common.cmake b/test/common.cmake index 625ae68..bea5897 100644 --- a/test/common.cmake +++ b/test/common.cmake @@ -42,7 +42,11 @@ if (${TARGET_ARCH} MATCHES "riscv32|rv32") endif() if(STATIC_LINK) - add_link_options(-static) + if(MSVC) + add_compile_options("$<$>:/MT>$<$:/MTd>") + else() + add_link_options(-static) + endif() endif() if(MSVC)