Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8725670
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
View Options
diff --git a/cmake/Modules/FindHepMC.cmake b/cmake/Modules/FindHepMC.cmake
index dc207fe..8cb7edf 100644
--- a/cmake/Modules/FindHepMC.cmake
+++ b/cmake/Modules/FindHepMC.cmake
@@ -1,107 +1,107 @@
#.rst:
# FindHepMC
# -------
#
# Finds the HepMC library.
#
# This will define the following variables::
#
# HepMC_FOUND - True if the system has the HepMC library
# HepMC_VERSION - The version of the HepMC library which was found
# HepMC_VERSION_MAJOR - Major version (first number in version string)
# HepMC_VERSION_MINOR - Minor version (second number in version string)
# HepMC_VERSION_PATCH - Patch version (third number in version string)
#
# and the following imported targets::
#
# HepMC::HepMC - The HepMC library
#
# To provide a hint for the preferred HepMC installation, set
# ``HepMC_ROOT`` to the directory containing said installation.
#
#=============================================================================
# Copyright 2016 Andreas Maier (andreas.maier@durham.ac.uk)
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
find_package(PkgConfig)
pkg_check_modules(PC_HepMC QUIET HepMC)
unset(HepMC_INCLUDE_DIR)
find_path(HepMC_INCLUDE_DIR
NAMES HepMCDefs.h
PATHS ${HepMC_ROOT} ${PC_HepMC_INCLUDE_DIRS}
PATH_SUFFIXES HepMC
)
find_library(HepMC_LIBRARY
NAMES HepMC
PATHS ${HepMC_ROOT} ${PC_HepMC_LIBRARY_DIRS}
)
-if(IS_DIRECTORY HepMC_INCLUDE_DIR)
+if(IS_DIRECTORY ${HepMC_INCLUDE_DIR})
file(STRINGS "${HepMC_INCLUDE_DIR}/HepMCDefs.h" _HepMC_DEFS)
file(STRINGS "${HepMC_INCLUDE_DIR}/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}
)
string(
REGEX MATCH
"^[0-9]*"
HepMC_VERSION_MAJOR ${HepMC_VERSION}
)
string(
REGEX REPLACE
"^[0-9]*\\.([0-9]*)" "\\1"
HepMC_VERSION_MINOR ${HepMC_VERSION}
)
string(
REGEX MATCH
"[0-9]*$"
HepMC_VERSION_PATCH ${HepMC_VERSION}
)
message(STATUS "HepMC version: ${HepMC_VERSION}")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HepMC
FOUND_VAR HepMC_FOUND
REQUIRED_VARS
HepMC_LIBRARY
HepMC_INCLUDE_DIR
VERSION_VAR HepMC_VERSION
)
if(HepMC_FOUND)
set(HepMC_LIBRARIES ${HepMC_LIBRARY})
set(HepMC_INCLUDE_DIRS ${HepMC_INCLUDE_DIR})
set(HepMC_DEFINITIONS ${PC_HepMC_CFLAGS_OTHER})
endif()
if(HepMC_FOUND AND NOT TARGET HepMC::HepMC)
add_library(HepMC::HepMC UNKNOWN IMPORTED)
set_target_properties(HepMC::HepMC PROPERTIES
IMPORTED_LOCATION "${HepMC_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${PC_HepMC_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${HepMC_INCLUDE_DIR}"
)
endif()
mark_as_advanced(
HepMC_INCLUDE_DIR
HepMC_LIBRARY
)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jan 21, 2:17 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4225413
Default Alt Text
(3 KB)
Attached To
rHEJ HEJ
Event Timeline
Log In to Comment