unicorn-engine / unicorn

Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
http://www.unicorn-engine.org
GNU General Public License v2.0
7.67k stars 1.35k forks source link

Allow passing `CMAKE_MSVC_RUNTIME_LIBRARY` #1960

Closed es3n1n closed 5 months ago

es3n1n commented 5 months ago

This PR adds support for configuring the MSVC runtime library type using not only CMAKE_C_FLAGS, but also CMAKE_MSVC_RUNTIME_LIBRARY. If a conflict occurs when both CMAKE_MSVC_RUNTIME_LIBRARY and CMAKE_C_FLAGS are set, a fatal error will be raised, as we agreed in #1958.

Both cpp (cmake 3.28.1, MSVC 17.0) and rust (cargo 1.72.0) worked fine on my machine; I honestly don't think this change could break anything.

wtdcode commented 5 months ago

Looks good, waiting for CI

wtdcode commented 5 months ago

Oh wait, you need to rebase to dev branch.

es3n1n commented 5 months ago

Oh wait, you need to rebase to dev branch.

Oops, my bad, sorry. I rebased my master to dev and changed the base branch; now, we should be good.

wtdcode commented 5 months ago

Thanks and welcome!