Page MenuHomeHEPForge

No OneTemporary

diff --git a/cmake/Modules/FindHepMC.cmake b/cmake/Modules/FindHepMC.cmake
index a311f15..6c5d8d3 100644
--- a/cmake/Modules/FindHepMC.cmake
+++ b/cmake/Modules/FindHepMC.cmake
@@ -1,218 +1,218 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This is a slightly modified version of FindGSL.cmake taken from cmake 3.7
#.rst:
# FindHepMC
# --------
#
# Find the native HepMC includes and libraries.
#
# HepMC package is an object oriented, C++ event record for High Energy
# Physics Monte Carlo generators and simulation. It is free software
# under the GNU General Public License.
#
# Imported Targets
# ^^^^^^^^^^^^^^^^
#
# If HepMC is found, this module defines the following
# :prop_tgt:`IMPORTED` target::
#
# HepMC::HepMC - The main HepMC library.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module will set the following variables in your project::
#
# HepMC_FOUND - True if HepMC found on the local system
# HepMC_INCLUDE_DIRS - Location of HepMC header files.
# HepMC_LIBRARIES - The HepMC libraries.
# HepMC_VERSION - The version of the discovered HepMC install.
#
# Hints
# ^^^^^
#
# Set ``HepMC_ROOT_DIR`` to a directory that contains a HepMC installation.
#
# This script expects to find libraries at ``$HepMC_ROOT_DIR/lib`` and the HepMC
# headers at ``$HepMC_ROOT_DIR/include/HepMC``. The library directory may
# optionally provide Release and Debug folders. For Unix-like systems, this
# script will use ``$HepMC_ROOT_DIR/bin/HepMC-config`` (if found) to aid in the
# discovery HepMC.
#
# Cache Variables
# ^^^^^^^^^^^^^^^
#
# This module may set the following variables depending on platform and type
# of HepMC installation discovered. These variables may optionally be set to
# help this module find the correct files::
#
# HepMC_CONFIG_EXECUTABLE - Location of the ``HepMC-config`` script (if any).
# HepMC_LIBRARY - Location of the HepMC library.
# HepMC_LIBRARY_DEBUG - Location of the debug HepMC library (if any).
#
# Include these modules to handle the QUIETLY and REQUIRED arguments.
include(FindPackageHandleStandardArgs)
#=============================================================================
# If the user has provided ``HepMC_ROOT_DIR``, use it! Choose items found
# at this location over system locations.
if( EXISTS "$ENV{HepMC_ROOT_DIR}" )
file( TO_CMAKE_PATH "$ENV{HepMC_ROOT_DIR}" HepMC_ROOT_DIR )
set( HepMC_ROOT_DIR "${HepMC_ROOT_DIR}" CACHE PATH "Prefix for HepMC installation." )
endif()
if( NOT EXISTS "${HepMC_ROOT_DIR}" )
set( HepMC_USE_PKGCONFIG ON )
endif()
#=============================================================================
# As a first try, use the PkgConfig module. This will work on many
# *NIX systems. See :module:`findpkgconfig`
# This will return ``HepMC_INCLUDEDIR`` and ``HepMC_LIBDIR`` used below.
if( HepMC_USE_PKGCONFIG )
find_package(PkgConfig)
pkg_check_modules( HepMC QUIET HepMC )
if( EXISTS "${HepMC_INCLUDEDIR}" )
get_filename_component( HepMC_ROOT_DIR "${HepMC_INCLUDEDIR}" DIRECTORY CACHE)
endif()
endif()
#=============================================================================
# Set HepMC_INCLUDE_DIRS and HepMC_LIBRARIES. If we skipped the PkgConfig step, try
# to find the libraries at $HepMC_ROOT_DIR (if provided), in the directory
# suggested by HepMC-config (if available), or in standard system
# locations. These find_library and find_path calls will prefer custom
# locations over standard locations (HINTS). If the requested file is found
# neither at the HINTS location nor via HepMC-config, standard system locations
# will be still be searched (/usr/lib64 (Redhat), lib/i386-linux-gnu (Debian)).
# If we didn't use PkgConfig, try to find the version via HepMC-config
if( NOT HepMC_VERSION )
find_program( HepMC_CONFIG_EXECUTABLE
NAMES HepMC-config
HINTS "${HepMC_ROOT_DIR}/bin"
)
if( EXISTS "${HepMC_CONFIG_EXECUTABLE}" )
execute_process(
COMMAND "${HepMC_CONFIG_EXECUTABLE}" --version
OUTPUT_VARIABLE HepMC_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
execute_process(
COMMAND "${HepMC_CONFIG_EXECUTABLE}" --incdir
OUTPUT_VARIABLE HepMC_CONFIG_INCLUDEDIR
OUTPUT_STRIP_TRAILING_WHITESPACE )
execute_process(
COMMAND "${HepMC_CONFIG_EXECUTABLE}" --libdir
OUTPUT_VARIABLE HepMC_CONFIG_LIBDIR
OUTPUT_STRIP_TRAILING_WHITESPACE )
endif()
endif()
find_path( HepMC_INCLUDE_DIR
- NAMES HepMC/HepMC.h HepMC/HepMCDefs.h
+ NAMES HepMC/HepMCDefs.h
HINTS ${HepMC_ROOT_DIR}/include ${HepMC_INCLUDEDIR} ${HepMC_CONFIG_INCLUDEDIR}
)
find_library( HepMC_LIBRARY
NAMES HepMC
HINTS ${HepMC_ROOT_DIR}/lib ${HepMC_LIBDIR} ${HepMC_CONFIG_LIBDIR}
PATH_SUFFIXES Release Debug
)
# Do we also have debug versions?
find_library( HepMC_LIBRARY_DEBUG
NAMES HepMC
HINTS ${HepMC_ROOT_DIR}/lib ${HepMC_LIBDIR} ${HepMC_CONFIG_LIBDIR}
PATH_SUFFIXES Debug
)
set( HepMC_INCLUDE_DIRS ${HepMC_INCLUDE_DIR} )
set( HepMC_LIBRARIES ${HepMC_LIBRARY} )
if( NOT HepMC_VERSION )
if(IS_DIRECTORY ${HepMC_INCLUDE_DIR})
file(STRINGS "${HepMC_INCLUDE_DIR}/HepMC/HepMCDefs.h" _HepMC_DEFS)
file(STRINGS "${HepMC_INCLUDE_DIR}/HepMC/Version.h" _HepMC_VERS)
string(
REGEX MATCH
"#define *HEPMC_VERSION *\"[^\"]*\""
_HepMC_VERSION_STR "${_HepMC_DEFS} ${_HepMC_VERS}"
)
string(
REGEX MATCH
"[0-9]*\\.[0-9]*\\.[0-9]*"
HepMC_VERSION ${_HepMC_VERSION_STR}
)
endif()
endif()
if( HepMC_VERSION )
string(REPLACE "." ";" t_list ${HepMC_VERSION})
list(APPEND t_list 0 0) # add a buffer in case supversion not set
list(GET t_list 0 HepMC_VERSION_MAJOR)
list(GET t_list 1 HepMC_VERSION_MINOR)
list(GET t_list 2 HepMC_VERSION_PATCH)
endif()
#=============================================================================
# handle the QUIETLY and REQUIRED arguments and set HepMC_FOUND to TRUE if all
# listed variables are TRUE
find_package_handle_standard_args( HepMC
FOUND_VAR
HepMC_FOUND
REQUIRED_VARS
HepMC_INCLUDE_DIR
HepMC_LIBRARY
VERSION_VAR
HepMC_VERSION
)
mark_as_advanced( HepMC_ROOT_DIR HepMC_VERSION HepMC_LIBRARY HepMC_INCLUDE_DIR
HepMC_LIBRARY_DEBUG HepMC_USE_PKGCONFIG HepMC_CONFIG )
#=============================================================================
# Register imported libraries:
# 1. If we can find a Windows .dll file (or if we can find both Debug and
# Release libraries), we will set appropriate target properties for these.
# 2. However, for most systems, we will only register the import location and
# include directory.
# Look for dlls, or Release and Debug libraries.
if(WIN32)
string( REPLACE ".lib" ".dll" HepMC_LIBRARY_DLL "${HepMC_LIBRARY}" )
string( REPLACE ".lib" ".dll" HepMC_LIBRARY_DEBUG_DLL "${HepMC_LIBRARY_DEBUG}" )
endif()
if( HepMC_FOUND AND NOT TARGET HepMC::HepMC )
if( EXISTS "${HepMC_LIBRARY_DLL}")
# Windows systems with dll libraries.
add_library( HepMC::HepMC SHARED IMPORTED )
add_library( HepMC::HepMCcblas SHARED IMPORTED )
# Windows with dlls, but only Release libraries.
set_target_properties( HepMC::HepMC PROPERTIES
IMPORTED_LOCATION_RELEASE "${HepMC_LIBRARY_DLL}"
IMPORTED_IMPLIB "${HepMC_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${HepMC_INCLUDE_DIRS}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
)
# If we have both Debug and Release libraries
if( EXISTS "${HepMC_LIBRARY_DEBUG_DLL}")
set_property( TARGET HepMC::HepMC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( HepMC::HepMC PROPERTIES
IMPORTED_LOCATION_DEBUG "${HepMC_LIBRARY_DEBUG_DLL}"
IMPORTED_IMPLIB_DEBUG "${HepMC_LIBRARY_DEBUG}" )
endif()
else()
# For all other environments (ones without dll libraries), create
# the imported library targets.
add_library( HepMC::HepMC UNKNOWN IMPORTED )
set_target_properties( HepMC::HepMC PROPERTIES
IMPORTED_LOCATION "${HepMC_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${HepMC_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
)
endif()
endif()
diff --git a/cmake/Modules/FindLHAPDF.cmake b/cmake/Modules/FindLHAPDF.cmake
index 5b425cd..4df57a3 100644
--- a/cmake/Modules/FindLHAPDF.cmake
+++ b/cmake/Modules/FindLHAPDF.cmake
@@ -1,218 +1,217 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This is a slightly modified version of FindGSL.cmake taken from cmake 3.7
#.rst:
# FindLHAPDF
# --------
#
# Find the native LHAPDF includes and libraries.
#
# LHAPDF package is an object oriented, C++ event record for High Energy
# Physics Monte Carlo generators and simulation. It is free software
# under the GNU General Public License.
#
# Imported Targets
# ^^^^^^^^^^^^^^^^
#
# If LHAPDF is found, this module defines the following
# :prop_tgt:`IMPORTED` target::
#
# LHAPDF::LHAPDF - The main LHAPDF library.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module will set the following variables in your project::
#
# LHAPDF_FOUND - True if LHAPDF found on the local system
# LHAPDF_INCLUDE_DIRS - Location of LHAPDF header files.
# LHAPDF_LIBRARIES - The LHAPDF libraries.
# LHAPDF_VERSION - The version of the discovered LHAPDF install.
#
# Hints
# ^^^^^
#
# Set ``LHAPDF_ROOT_DIR`` to a directory that contains a LHAPDF installation.
#
# This script expects to find libraries at ``$LHAPDF_ROOT_DIR/lib`` and the LHAPDF
# headers at ``$LHAPDF_ROOT_DIR/include/LHAPDF``. The library directory may
# optionally provide Release and Debug folders. For Unix-like systems, this
# script will use ``$LHAPDF_ROOT_DIR/bin/LHAPDF-config`` (if found) to aid in the
# discovery LHAPDF.
#
# Cache Variables
# ^^^^^^^^^^^^^^^
#
# This module may set the following variables depending on platform and type
# of LHAPDF installation discovered. These variables may optionally be set to
# help this module find the correct files::
#
# LHAPDF_CONFIG_EXECUTABLE - Location of the ``LHAPDF-config`` script (if any).
# LHAPDF_LIBRARY - Location of the LHAPDF library.
# LHAPDF_LIBRARY_DEBUG - Location of the debug LHAPDF library (if any).
#
# Include these modules to handle the QUIETLY and REQUIRED arguments.
include(FindPackageHandleStandardArgs)
#=============================================================================
# If the user has provided ``LHAPDF_ROOT_DIR``, use it! Choose items found
# at this location over system locations.
if( EXISTS "$ENV{LHAPDF_ROOT_DIR}" )
file( TO_CMAKE_PATH "$ENV{LHAPDF_ROOT_DIR}" LHAPDF_ROOT_DIR )
set( LHAPDF_ROOT_DIR "${LHAPDF_ROOT_DIR}" CACHE PATH "Prefix for LHAPDF installation." )
endif()
if( NOT EXISTS "${LHAPDF_ROOT_DIR}" )
set( LHAPDF_USE_PKGCONFIG ON )
endif()
#=============================================================================
# As a first try, use the PkgConfig module. This will work on many
# *NIX systems. See :module:`findpkgconfig`
# This will return ``LHAPDF_INCLUDEDIR`` and ``LHAPDF_LIBDIR`` used below.
if( LHAPDF_USE_PKGCONFIG )
find_package(PkgConfig)
pkg_check_modules( LHAPDF QUIET LHAPDF )
if( EXISTS "${LHAPDF_INCLUDEDIR}" )
get_filename_component( LHAPDF_ROOT_DIR "${LHAPDF_INCLUDEDIR}" DIRECTORY CACHE)
endif()
endif()
#=============================================================================
# Set LHAPDF_INCLUDE_DIRS and LHAPDF_LIBRARIES. If we skipped the PkgConfig step, try
# to find the libraries at $LHAPDF_ROOT_DIR (if provided), in the directory
# suggested by LHAPDF-config (if available), or in standard system
# locations. These find_library and find_path calls will prefer custom
# locations over standard locations (HINTS). If the requested file is found
# neither at the HINTS location nor via LHAPDF-config, standard system locations
# will be still be searched (/usr/lib64 (Redhat), lib/i386-linux-gnu (Debian)).
# If we didn't use PkgConfig, try to find the version via LHAPDF-config
if( NOT LHAPDF_VERSION )
find_program( LHAPDF_CONFIG_EXECUTABLE
NAMES lhapdf-config
HINTS "${LHAPDF_ROOT_DIR}/bin"
)
if( EXISTS "${LHAPDF_CONFIG_EXECUTABLE}" )
execute_process(
COMMAND "${LHAPDF_CONFIG_EXECUTABLE}" --version
OUTPUT_VARIABLE LHAPDF_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
execute_process(
COMMAND "${LHAPDF_CONFIG_EXECUTABLE}" --incdir
OUTPUT_VARIABLE LHAPDF_CONFIG_INCLUDEDIR
OUTPUT_STRIP_TRAILING_WHITESPACE )
execute_process(
COMMAND "${LHAPDF_CONFIG_EXECUTABLE}" --libdir
OUTPUT_VARIABLE LHAPDF_CONFIG_LIBDIR
OUTPUT_STRIP_TRAILING_WHITESPACE )
endif()
endif()
find_path( LHAPDF_INCLUDE_DIR
- NAMES LHAPDF/LHAPDF.h LHAPDF/LHAPDFDefs.h
+ NAMES LHAPDF/LHAPDF.h LHAPDF/Version.h
HINTS ${LHAPDF_ROOT_DIR}/include ${LHAPDF_INCLUDEDIR} ${LHAPDF_CONFIG_INCLUDEDIR}
)
find_library( LHAPDF_LIBRARY
NAMES LHAPDF
HINTS ${LHAPDF_ROOT_DIR}/lib ${LHAPDF_LIBDIR} ${LHAPDF_CONFIG_LIBDIR}
PATH_SUFFIXES Release Debug
)
# Do we also have debug versions?
find_library( LHAPDF_LIBRARY_DEBUG
NAMES LHAPDF
HINTS ${LHAPDF_ROOT_DIR}/lib ${LHAPDF_LIBDIR} ${LHAPDF_CONFIG_LIBDIR}
PATH_SUFFIXES Debug
)
set( LHAPDF_INCLUDE_DIRS ${LHAPDF_INCLUDE_DIR} )
set( LHAPDF_LIBRARIES ${LHAPDF_LIBRARY} )
if( NOT LHAPDF_VERSION )
if(IS_DIRECTORY ${LHAPDF_INCLUDE_DIR})
- file(STRINGS "${LHAPDF_INCLUDE_DIR}/LHAPDF/LHAPDFDefs.h" _LHAPDF_DEFS)
file(STRINGS "${LHAPDF_INCLUDE_DIR}/LHAPDF/Version.h" _LHAPDF_VERS)
string(
REGEX MATCH
"#define *LHAPDF_VERSION *\"[^\"]*\""
- _LHAPDF_VERSION_STR "${_LHAPDF_DEFS} ${_LHAPDF_VERS}"
+ _LHAPDF_VERSION_STR "${_LHAPDF_VERS}"
)
string(
REGEX MATCH
"[0-9]*\\.[0-9]*\\.[0-9]*"
LHAPDF_VERSION ${_LHAPDF_VERSION_STR}
)
endif()
endif()
if( LHAPDF_VERSION )
string(REPLACE "." ";" t_list ${LHAPDF_VERSION})
list(APPEND t_list 0 0) # add a buffer in case supversion not set
list(GET t_list 0 LHAPDF_VERSION_MAJOR)
list(GET t_list 1 LHAPDF_VERSION_MINOR)
list(GET t_list 2 LHAPDF_VERSION_PATCH)
endif()
#=============================================================================
# handle the QUIETLY and REQUIRED arguments and set LHAPDF_FOUND to TRUE if all
# listed variables are TRUE
find_package_handle_standard_args( LHAPDF
FOUND_VAR
LHAPDF_FOUND
REQUIRED_VARS
LHAPDF_INCLUDE_DIR
LHAPDF_LIBRARY
VERSION_VAR
LHAPDF_VERSION
)
mark_as_advanced( LHAPDF_ROOT_DIR LHAPDF_VERSION LHAPDF_LIBRARY LHAPDF_INCLUDE_DIR
LHAPDF_LIBRARY_DEBUG LHAPDF_USE_PKGCONFIG LHAPDF_CONFIG )
#=============================================================================
# Register imported libraries:
# 1. If we can find a Windows .dll file (or if we can find both Debug and
# Release libraries), we will set appropriate target properties for these.
# 2. However, for most systems, we will only register the import location and
# include directory.
# Look for dlls, or Release and Debug libraries.
if(WIN32)
string( REPLACE ".lib" ".dll" LHAPDF_LIBRARY_DLL "${LHAPDF_LIBRARY}" )
string( REPLACE ".lib" ".dll" LHAPDF_LIBRARY_DEBUG_DLL "${LHAPDF_LIBRARY_DEBUG}" )
endif()
if( LHAPDF_FOUND AND NOT TARGET LHAPDF::LHAPDF )
if( EXISTS "${LHAPDF_LIBRARY_DLL}")
# Windows systems with dll libraries.
add_library( LHAPDF::LHAPDF SHARED IMPORTED )
add_library( LHAPDF::LHAPDFcblas SHARED IMPORTED )
# Windows with dlls, but only Release libraries.
set_target_properties( LHAPDF::LHAPDF PROPERTIES
IMPORTED_LOCATION_RELEASE "${LHAPDF_LIBRARY_DLL}"
IMPORTED_IMPLIB "${LHAPDF_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LHAPDF_INCLUDE_DIRS}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
)
# If we have both Debug and Release libraries
if( EXISTS "${LHAPDF_LIBRARY_DEBUG_DLL}")
set_property( TARGET LHAPDF::LHAPDF APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( LHAPDF::LHAPDF PROPERTIES
IMPORTED_LOCATION_DEBUG "${LHAPDF_LIBRARY_DEBUG_DLL}"
IMPORTED_IMPLIB_DEBUG "${LHAPDF_LIBRARY_DEBUG}" )
endif()
else()
# For all other environments (ones without dll libraries), create
# the imported library targets.
add_library( LHAPDF::LHAPDF UNKNOWN IMPORTED )
set_target_properties( LHAPDF::LHAPDF PROPERTIES
IMPORTED_LOCATION "${LHAPDF_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LHAPDF_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
)
endif()
endif()
diff --git a/cmake/Modules/Findfastjet.cmake b/cmake/Modules/Findfastjet.cmake
index 64918ed..ba03935 100644
--- a/cmake/Modules/Findfastjet.cmake
+++ b/cmake/Modules/Findfastjet.cmake
@@ -1,216 +1,216 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# This is a slightly modified version of FindGSL.cmake taken from cmake 3.7
#.rst:
# Findfastjet
# --------
#
# Find the native fastjet includes and libraries.
#
# fastjet package is an object oriented, C++ event record for High Energy
# Physics Monte Carlo generators and simulation. It is free software
# under the GNU General Public License.
#
# Imported Targets
# ^^^^^^^^^^^^^^^^
#
# If fastjet is found, this module defines the following
# :prop_tgt:`IMPORTED` target::
#
# fastjet::fastjet - The main fastjet library.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This module will set the following variables in your project::
#
# fastjet_FOUND - True if fastjet found on the local system
# fastjet_INCLUDE_DIRS - Location of fastjet header files.
# fastjet_LIBRARIES - The fastjet libraries.
# fastjet_VERSION - The version of the discovered fastjet install.
#
# Hints
# ^^^^^
#
# Set ``fastjet_ROOT_DIR`` to a directory that contains a fastjet installation.
#
# This script expects to find libraries at ``$fastjet_ROOT_DIR/lib`` and the fastjet
# headers at ``$fastjet_ROOT_DIR/include/fastjet``. The library directory may
# optionally provide Release and Debug folders. For Unix-like systems, this
# script will use ``$fastjet_ROOT_DIR/bin/fastjet-config`` (if found) to aid in the
# discovery fastjet.
#
# Cache Variables
# ^^^^^^^^^^^^^^^
#
# This module may set the following variables depending on platform and type
# of fastjet installation discovered. These variables may optionally be set to
# help this module find the correct files::
#
# fastjet_CONFIG_EXECUTABLE - Location of the ``fastjet-config`` script (if any).
# fastjet_LIBRARY - Location of the fastjet library.
# fastjet_LIBRARY_DEBUG - Location of the debug fastjet library (if any).
#
# Include these modules to handle the QUIETLY and REQUIRED arguments.
include(FindPackageHandleStandardArgs)
#=============================================================================
# If the user has provided ``fastjet_ROOT_DIR``, use it! Choose items found
# at this location over system locations.
if( EXISTS "$ENV{fastjet_ROOT_DIR}" )
file( TO_CMAKE_PATH "$ENV{fastjet_ROOT_DIR}" fastjet_ROOT_DIR )
set( fastjet_ROOT_DIR "${fastjet_ROOT_DIR}" CACHE PATH "Prefix for fastjet installation." )
endif()
if( NOT EXISTS "${fastjet_ROOT_DIR}" )
set( fastjet_USE_PKGCONFIG ON )
endif()
#=============================================================================
# As a first try, use the PkgConfig module. This will work on many
# *NIX systems. See :module:`findpkgconfig`
# This will return ``fastjet_INCLUDEDIR`` and ``fastjet_LIBDIR`` used below.
if( fastjet_USE_PKGCONFIG )
find_package(PkgConfig)
pkg_check_modules( fastjet QUIET fastjet )
if( EXISTS "${fastjet_INCLUDEDIR}" )
get_filename_component( fastjet_ROOT_DIR "${fastjet_INCLUDEDIR}" DIRECTORY CACHE)
endif()
endif()
#=============================================================================
# Set fastjet_INCLUDE_DIRS and fastjet_LIBRARIES. If we skipped the PkgConfig step, try
# to find the libraries at $fastjet_ROOT_DIR (if provided), in the directory
# suggested by fastjet-config (if available), or in standard system
# locations. These find_library and find_path calls will prefer custom
# locations over standard locations (HINTS). If the requested file is found
# neither at the HINTS location nor via fastjet-config, standard system locations
# will be still be searched (/usr/lib64 (Redhat), lib/i386-linux-gnu (Debian)).
# If we didn't use PkgConfig, try to find the version via fastjet-config
if( NOT fastjet_VERSION )
find_program( fastjet_CONFIG_EXECUTABLE
NAMES fastjet-config
HINTS "${fastjet_ROOT_DIR}/bin"
)
if( EXISTS "${fastjet_CONFIG_EXECUTABLE}" )
execute_process(
COMMAND "${fastjet_CONFIG_EXECUTABLE}" --version
OUTPUT_VARIABLE fastjet_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
execute_process(
COMMAND "${fastjet_CONFIG_EXECUTABLE}" --prefix
OUTPUT_VARIABLE fastjet_CONFIG_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE )
set(fastjet_CONFIG_INCLUDEDIR ${fastjet_CONFIG_ROOT_DIR}/include)
set(fastjet_CONFIG_LIBDIR ${fastjet_CONFIG_ROOT_DIR}/lib)
endif()
endif()
find_path( fastjet_INCLUDE_DIR
- NAMES fastjet/config_auto.h fastjet/version.hh
+ NAMES fastjet/config_auto.h fastjet/PseudoJet.hh
HINTS ${fastjet_ROOT_DIR}/include ${fastjet_INCLUDEDIR} ${fastjet_CONFIG_INCLUDEDIR}
)
find_library( fastjet_LIBRARY
NAMES fastjet
HINTS ${fastjet_ROOT_DIR}/lib ${fastjet_LIBDIR} ${fastjet_CONFIG_LIBDIR}
PATH_SUFFIXES Release Debug
)
# Do we also have debug versions?
find_library( fastjet_LIBRARY_DEBUG
NAMES fastjet
HINTS ${fastjet_ROOT_DIR}/lib ${fastjet_LIBDIR} ${fastjet_CONFIG_LIBDIR}
PATH_SUFFIXES Debug
)
set( fastjet_INCLUDE_DIRS ${fastjet_INCLUDE_DIR} )
set( fastjet_LIBRARIES ${fastjet_LIBRARY} )
if( NOT fastjet_VERSION )
if(IS_DIRECTORY ${fastjet_INCLUDE_DIR})
file(STRINGS "${fastjet_INCLUDE_DIR}/fastjet/config_auto.h" _fastjet_DEFS)
file(STRINGS "${fastjet_INCLUDE_DIR}/fastjet/version.hh" _fastjet_VERS)
string(
REGEX MATCH
"#define *FASTJET_VERSION *\"[^\"]*\""
_fastjet_VERSION_STR "${_fastjet_VERS} ${_fastjet_DEFS}"
)
string(
REGEX MATCH
"[0-9]*\\.[0-9]*\\.[0-9]*"
fastjet_VERSION ${_fastjet_VERSION_STR}
)
endif()
endif()
if( fastjet_VERSION )
string(REPLACE "." ";" t_list ${fastjet_VERSION})
list(APPEND t_list 0 0) # add a buffer in case supversion not set
list(GET t_list 0 fastjet_VERSION_MAJOR)
list(GET t_list 1 fastjet_VERSION_MINOR)
list(GET t_list 2 fastjet_VERSION_PATCH)
endif()
#=============================================================================
# handle the QUIETLY and REQUIRED arguments and set fastjet_FOUND to TRUE if all
# listed variables are TRUE
find_package_handle_standard_args( fastjet
FOUND_VAR
fastjet_FOUND
REQUIRED_VARS
fastjet_INCLUDE_DIR
fastjet_LIBRARY
VERSION_VAR
fastjet_VERSION
)
mark_as_advanced( fastjet_ROOT_DIR fastjet_VERSION fastjet_LIBRARY fastjet_INCLUDE_DIR
fastjet_LIBRARY_DEBUG fastjet_USE_PKGCONFIG fastjet_CONFIG )
#=============================================================================
# Register imported libraries:
# 1. If we can find a Windows .dll file (or if we can find both Debug and
# Release libraries), we will set appropriate target properties for these.
# 2. However, for most systems, we will only register the import location and
# include directory.
# Look for dlls, or Release and Debug libraries.
if(WIN32)
string( REPLACE ".lib" ".dll" fastjet_LIBRARY_DLL "${fastjet_LIBRARY}" )
string( REPLACE ".lib" ".dll" fastjet_LIBRARY_DEBUG_DLL "${fastjet_LIBRARY_DEBUG}" )
endif()
if( fastjet_FOUND AND NOT TARGET fastjet::fastjet )
if( EXISTS "${fastjet_LIBRARY_DLL}")
# Windows systems with dll libraries.
add_library( fastjet::fastjet SHARED IMPORTED )
add_library( fastjet::fastjetcblas SHARED IMPORTED )
# Windows with dlls, but only Release libraries.
set_target_properties( fastjet::fastjet PROPERTIES
IMPORTED_LOCATION_RELEASE "${fastjet_LIBRARY_DLL}"
IMPORTED_IMPLIB "${fastjet_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${fastjet_INCLUDE_DIRS}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
)
# If we have both Debug and Release libraries
if( EXISTS "${fastjet_LIBRARY_DEBUG_DLL}")
set_property( TARGET fastjet::fastjet APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( fastjet::fastjet PROPERTIES
IMPORTED_LOCATION_DEBUG "${fastjet_LIBRARY_DEBUG_DLL}"
IMPORTED_IMPLIB_DEBUG "${fastjet_LIBRARY_DEBUG}" )
endif()
else()
# For all other environments (ones without dll libraries), create
# the imported library targets.
add_library( fastjet::fastjet UNKNOWN IMPORTED )
set_target_properties( fastjet::fastjet PROPERTIES
IMPORTED_LOCATION "${fastjet_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${fastjet_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
)
endif()
endif()

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jan 20, 10:58 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4242746
Default Alt Text
(25 KB)

Event Timeline