Skip to content

C-project for test GMP library and CMake build system

License

Notifications You must be signed in to change notification settings

mrsarm/gmp_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected]

License: GPL-3

About

C-project for test GMP library and CMake build system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages