Use cmake for building (#90)

* Use cmake for building
* CMakeLists.txt modified to support full standalone build
* added support for ARCH=native builds
* added PowerPC flags
* added ARMv8 flags
* check for x86 AES-NI at compile time
This commit is contained in:
tevador 2019-06-28 19:50:41 +02:00 committed by GitHub
parent 4a4b06e44b
commit b91882be42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 148 additions and 240 deletions

View file

@ -20,23 +20,28 @@ Design description and analysis is available in [design.md](doc/design.md).
## Build
RandomX is written in C++11 and builds a static library with a C API provided by header file [randomx.h](src/randomx.h). Minimal API usage example is provided in [api-example1.c](src/tests/api-example1.c). The reference code includes a `benchmark` executable for testing.
RandomX is written in C++11 and builds a static library with a C API provided by header file [randomx.h](src/randomx.h). Minimal API usage example is provided in [api-example1.c](src/tests/api-example1.c). The reference code includes a `randomx-benchmark` and `randomx-tests` executables for testing.
### Linux
Build dependencies: `make` and `gcc` (minimum version 4.8, but version 7+ is recommended).
Build dependencies: `cmake` (minimum 2.8.7) and `gcc` (minimum version 4.8, but version 7+ is recommended).
Build using the provided makefile.
To build optimized binaries for your machine, run:
```
git clone https://github.com/tevador/RandomX.git
cd RandomX
mkdir build && cd build
cmake -DARCH=native ..
make
```
### Windows
Build dependencies: Visual Studio 2017.
A solution file is provided.
On Windows, it is possible to build using MinGW (same procedure as on Linux) or using Visual Studio 2017 (solution file is provided).
### Precompiled binaries
Precompiled `benchmark` binaries are available on the [Releases page](https://github.com/tevador/RandomX/releases).
Precompiled `randomx-benchmark` binaries are available on the [Releases page](https://github.com/tevador/RandomX/releases).
## Proof of work