herumi / mcl

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

Use cmake for the build system #6

Closed arybczak closed 7 years ago

arybczak commented 7 years ago

Current situation with hand-written makefiles is less than ideal, because:

  1. There is no make install.
  2. A lot of things are hardcoded (e.g. -O* always overrides compilation flags you can set from the command line, you can't compile with -flto because ar command is hardcoded, linking of 32bit libmcl_dy.so on 64bit system fails because no -m32 is passed to linker)
  3. Windows and Linux need separate makefiles.
herumi commented 7 years ago

If I add CmakeLists.txt, then is it ok?

arybczak commented 7 years ago

Yes, that would also work :)

herumi commented 7 years ago

I added a CMakeList.txt though it is not checked on Windows. It is my first CMakeList.txt then I think there are some problems.

arybczak commented 7 years ago

Works great, thanks!