This repository has been archived by the owner on Jan 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from hegner/master
add Herwig and Blackhat MC generators
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# - Locate Blackhat libraries | ||
# Defines: | ||
# | ||
# BLACKHAT_FOUND | ||
# BLACKHAT_INCLUDE_DIR | ||
# BLACKHAT_LIBRARIES | ||
|
||
find_path(BLACKHAT_INCLUDE_DIR blackhat/BH_interface.h | ||
HINTS $ENV{BLACKHAT_ROOT_DIR}/include ${BLACKHAT_ROOT_DIR}/include) | ||
find_path(BLACKHAT_BIN_DIR blackhat-config | ||
HINTS $ENV{BLACKHAT_ROOT_DIR}/bin ${BLACKHAT_ROOT_DIR}/bin) | ||
|
||
set(BLACKHAT_INCLUDE_DIRS ${BLACKHAT_INCLUDE_DIR}) | ||
|
||
#Compose library list from the output of blackhat-config: | ||
|
||
execute_process(COMMAND ${BLACKHAT_BIN_DIR}/blackhat-config --libs OUTPUT_VARIABLE bliblist0) | ||
string(REGEX MATCHALL "-l[A-Za-z0-9_-]+" bliblist0 "${bliblist0}") | ||
list(REMOVE_ITEM bliblist0 "-lqd") | ||
set(BLACKHAT_LIBRARIES "") | ||
foreach(_c ${bliblist0}) | ||
string(REPLACE "-l" "" _c ${_c}) | ||
find_library(libi NAMES ${_c} | ||
HINTS $ENV{BLACKHAT_ROOT_DIR}/lib/blackhat ${BLACKHAT_ROOT_DIR}/lib/blackhat) | ||
list(APPEND BLACKHAT_LIBRARIES "${libi}") | ||
unset(libi CACHE) | ||
endforeach() | ||
message(STATUS "blackhat libraries list for linking: ${BLACKHAT_LIBRARIES}") | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set BLACKHAT_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
|
||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Blackhat DEFAULT_MSG BLACKHAT_INCLUDE_DIR BLACKHAT_BIN_DIR BLACKHAT_LIBRARIES) | ||
mark_as_advanced(BLACKHAT_FOUND BLACKHAT_INCLUDE_DIR BLACKHAT_BIN_DIR BLACKHAT_LIBRARIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# - Locate herwig libraries and includes | ||
# Defines: | ||
# | ||
# HERWIG_FOUND | ||
# HERWIG_INCLUDE_DIR | ||
# HERWIG_INCLUDE_DIRS (not cached) | ||
# HERWIG_LIBRARY | ||
# HERWIG_LIBRARY_DIR (not cached) | ||
# HERWIG_LIBRARIES (not cached) | ||
|
||
|
||
find_path(HERWIG_INCLUDE_DIR HERWIG65.INC | ||
HINTS $ENV{HERWIG_ROOT_DIR}/include ${HERWIG_ROOT_DIR}/include) | ||
|
||
find_library(HERWIG_LIBRARY NAMES herwig Herwig | ||
HINTS $ENV{HERWIG_ROOT_DIR}/lib ${HERWIG_ROOT_DIR}/lib) | ||
|
||
find_library(HERWIG_dummy_LIBRARY NAMES herwig_dummy Herwig_dummy | ||
HINTS $ENV{HERWIG_ROOT_DIR}/lib ${HERWIG_ROOT_DIR}/lib) | ||
|
||
find_library(HERWIG_pdfdummy_LIBRARY NAMES herwig_pdfdummy Herwig_pdfdummy | ||
HINTS $ENV{HERWIG_ROOT_DIR}/lib ${HERWIG_ROOT_DIR}/lib) | ||
|
||
|
||
set(HERWIG_INCLUDE_DIRS ${HERWIG_INCLUDE_DIR}) | ||
set(HERWIG_LIBRARIES ${HERWIG_LIBRARY} ${HERWIG_dummy_LIBRARY} ${HERWIG_pdfdummy_LIBRARY}) | ||
get_filename_component(HERWIG_LIBRARY_DIR ${HERWIG_LIBRARY} PATH) | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set HERWIG_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
|
||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Herwig DEFAULT_MSG HERWIG_INCLUDE_DIR HERWIG_LIBRARY HERWIG_dummy_LIBRARY HERWIG_pdfdummy_LIBRARY) | ||
|
||
mark_as_advanced(HERWIG_FOUND HERWIG_INCLUDE_DIR HERWIG_LIBRARY HERWIG_dummy_LIBRARY HERWIG_pdfdummy_LIBRARY) |