Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mrsarm/gmp_test

C-project for test GMP library and CMake build system
https://github.com/mrsarm/gmp_test

c-project cli cmake gmplib

Last synced: about 1 month ago
JSON representation

C-project for test GMP library and CMake build system

Awesome Lists containing this project

README

        

gmp_test C-project
==================

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.

Build and execute
-----------------

To compile you need first installed the **GMP library**,
in many Linux distribution the package is
named `libgmp-dev`.

1. From the source directory, generate the "Makefile":

$ cmake .

2. *Make* the project and generate the executable "gmp_test".

$ make

3. Then execute with:

$ out/gmp_test

4. To install the executable `gmp_test` into `/usr/local/bin`:

$ sudo make install

To install into another folder, execute the step 1
overwriting the `CMAKE_INSTALL_PREFIX` variable, eg.
to install into the `/usr/bin` folder:

$ 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

About
-----

Source: https://github.com/mrsarm/gmp_test

Authors: (2015-2018) Mariano Ruiz

License: GPL-3