This is just a test example project.
The only purpose of this project is to use as a test for GMP library, and as an example of how to import this library in a CMakes project.
The project uses CMakes to build the executable.
To compile you need first installed the GMP library,
in many Linux distribution the package is
named libgmp-dev.
-
From the source directory, generate the "Makefile":
$ cmake . -
Make the project and generate the executable "gmp_test".
$ make -
Then execute with:
$ out/gmp_test -
To install the executable
gmp_testinto/usr/local/bin:$ sudo make installTo install into another folder, execute the step 1 overwriting the
CMAKE_INSTALL_PREFIXvariable, eg. to install into the/usr/binfolder:$ cmake -DCMAKE_INSTALL_PREFIX=/usr .
To clean the compiled binaries and compiled modules:
$ make clean
To clean all compiled files and generated "Makefiles":
$ make clean-all
A more complete example of a C project with CMake and CHEAT for unit testing is at https://github.com/mrsarm/helloworld-c
Source: https://github.com/mrsarm/gmp_test
Authors: (2015-2018) Mariano Ruiz mrsarm@gmail.cm
License: GPL-3