CMakeModules

CMakeModules are a collection of cmake macros and modules for building software packages in the context of HEP.

CMake FindModules

A collection of Find modules are available in order to find some of the most common software packages within the hep community, e.g.

This modules can be used in order to use one of the packages in question in your cmake project. The next two examples show how to find the GSL and the ROOT packages with slight different options. Please visit the cmake documentation of find_package for more information on the syntax.

FIND_PACKAGE( GSL ) IF( GSL_FOUND )    INCLUDE_DIRECTORIES( ${GSL_INCLUDE_DIRS} )    LINK_LIBRARIES( ${GSL_LIBRARIES} ) ENDIF( GSL_FOUND )
FIND_PACKAGE( ROOT 5.28 REQUIRED COMPONENTS MathMore ) INCLUDE_DIRECTORIES( ${ROOT_INCLUDE_DIRS} ) LINK_LIBRARIES( ${ROOT_LIBRARIES} ${ROOT_COMPONENT_LIBRARIES} )

CMake Macros

An additional set ot cmake macros are available in order to facilitate writing new CMakeLists for your project.

Valid HTML 4.01