Closed gmh5225 closed 1 year ago
Doing it this way is super incorrect. You should use https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html (and enable the relevant policy) instead.
Still might be nice to build into cmkr though.
I see. Thank you for your reply.
Because set_property(TARGET foo PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
does not work well in Z3 project.
The replacement method works well.
Yeah you need to enable https://cmake.org/cmake/help/latest/policy/CMP0091.html#policy:CMP0091 before the project()
call otherwise it does nothing
My bad. Looks like my version of cmake is too old.
Thank you for your reply.
set_property(TARGET foo PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
works well.
There are times when we want to use
/MT
instead of/MD
The following code can do this by replacing/MD
with/MT
But it's too much trouble to copy and paste every time If possible, add an
msvc-static
type, it would be much easier :)