CMake or VS issue? In Debug mode libcmt is linked together with libcmtd?
Although I set for a release build /MT and for a debug build /MTd, in the debug mode the libcmt
is still being linked, together with the libcmtd.
What could have gone wrong?I ended up by setting /NODEFAULTLIB:libcmt
as a linker option for a debug mode.
Btw what is better to use
target_link_options(myTargetName PUBLIC $<$CONFIG:Debug:/NODEFAULTLIB:libcmt>)
or
set_property(TARGET myTargetName APPEND PROPERTY LINK_FLAGS_DEBUG /NODEFAULTLIB:libcmt)