Skip to content

πŸ“ CMake Modules for SDHCAL software compilation

License

Notifications You must be signed in to change notification settings

SDHCAL/CMakeModules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š CMakeCM

GitHub GitHub code size in bytes GitHub repo size Tests Linux Tests MacOS Tests Windows

CMake Community Modules

✨ Introduction

This repository groups some usefull CMake Modules that can be share between different repositories.

πŸ“ Create a Modules List

Modules can be LOCALE or REMOTE :

βž• Adding a "Local" Module

Local modules are contained within the repository given by URL in cmmm_modules_list. If you do not wish to own a separate repository to contain the module, this is the recommended way to do so.

To start, add a module in the repository. This will be the module that will be included by the user. It should consist of a single CMake file.

After adding the module, add a call to cmcm_module in the Modules List.

Suppose you add a SuperCoolModule.cmake to modules. The resulting call in modules/ModulesList.cmake will look something like this :

cmcm_module(SuperCoolModule.cmake
            LOCAL modules/SuperCoolModule.cmake
            VERSION 1
           )

The VERSION argument is an arbitrary string that is used to invalidate local copies of the module that have been downloaded.

βž• Adding a "Remote" Module

If you have a module that you wish to add, but it is contained in a remote location, you simply need to add the call in the Modules List`:

cmcm_module(MyAwesomeModule.cmake
            REMOTE https://some-place.example.com/files/path/MyAwesomeModule.cmake
            VERSION 1
           )

The VERSION argument is an arbitrary string that is used to invalidate local copies of the module that have been downloaded.

The REMOTE is a URL to the file to download for the module. In order for your modification to be accepted into the repository, it must meet certain criteria:

  1. The URL must use https.
  2. The URL must refer to a stable file location. If using a Git URL, it should refer to a specific commit, not to a branch.

πŸ“š Module Lists

  • Local :

    • Color : Defines some colors and text styles.
    • DefaultInstallPrefix : Set CMAKE_INSTALL_PREFIX if it has not been defined before.
    • Doctest : Use CPM to setup doctest.
    • Messages : Redefines the message command to use personnalized styles.
    • PreventInSourceBuilds : Prevents building the project from his source directory.
    • Standards : Set the CMAKE_C_STANDARD or CMAKE_CXX_STANDARD to the required standard.
    • Testings : Some CMake functions to perform some tests in CMake files.
    • CPM : Wrapper to CPM, the Setup-free CMake dependency management.
    • Ping : A basic ping for CMake. Test if you are online.

About

πŸ“ CMake Modules for SDHCAL software compilation

Topics

Resources

License

Stars

Watchers

Forks