Add ability to compile as a library
Opened this issue · 1 comments
cher-nov commented
Notes:
- Preserve ability to use as plain sources too.
- Add ability to run tests, get rid of hardcoded CodeBlocks project.
- Modular library compilation (i.e. user should be able to choose only necessary data structures).
Use CMake (halp ;C).- Add safe compilation mode that will use
-O2
instead of-O3
,-fno-strict-aliasing
etc. since the C standard is utterly retarded but GCC considers it as a honor to follow it.
A good example of talking some sense to GCC is here:
https://repo.or.cz/k8vavoom.git/blob/08d44a45c7eae3a1bebab49cbb1da4e66f522637:/CMakeLists.txt#l278
cher-nov commented
Instead of CMake, something other should be used, that meet at least the following requirements:
- Up-to-date and clear enough documentation.
- Free and open-source.
- Actual state of development and availability of support.
- Ability to describe project structure, compilation flags, targets etc. in a machine-readable form like JSON / XML to provide an opportunity for third-party developers to compile it in environments where the build system could be unavailable (for example, when building the Python extension through
distutils
).
Consider using SCons with json
module being used in the build script.
https://habr.com/ru/post/95693/