herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
450 stars 152 forks source link

MCL_MSVC_RUNTIME_DLL cannot work correctly with DOWNLOAD #142

Closed earonesty closed 2 years ago

earonesty commented 2 years ago

In the CMakeLists.txt:

  1. MCL_MSVC_RUNTIME_DLL allows you to choose /MD and /MDD
  2. mpirxx.lib is downloaded directly from github releases and is not built
  3. mpirxx.lib is built with static CRT and Release ... only

Static/Release build works fine, but debug/dynamic cannot work.

Also this helps if you want to make the build work. MSVC is very strict about BUILD_TYPE... it must match.

+if(NOT DEFINED CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE "Release")
+endif()

Only solution I can see is to build mpirxx (which I should do anyway), and not allow downloads.

earonesty commented 2 years ago

https://github.com/herumi/mcl/pull/143