IAP GITLAB

Skip to content
Snippets Groups Projects
Commit e76e617d authored by Ralf Ulrich's avatar Ralf Ulrich
Browse files

Merge branch 'rprechelt-manual-pythia-search' into 'master'

Try to manually find Pythia8 if `pythia8-config` is not found.

See merge request !198
parents 58ee230c 674f42d8
No related branches found
No related tags found
1 merge request!198Try to manually find Pythia8 if `pythia8-config` is not found.
Pipeline #1313 passed
...@@ -65,6 +65,36 @@ if (PYTHIA8_CONFIG) ...@@ -65,6 +65,36 @@ if (PYTHIA8_CONFIG)
_PYTHIA8_CONFIG_ ("--libs" PYTHIA8_LIBRARY STRING "the pythia8 libs") _PYTHIA8_CONFIG_ ("--libs" PYTHIA8_LIBRARY STRING "the pythia8 libs")
_PYTHIA8_CONFIG_ ("--datadir" PYTHIA8_DATA_DIR PATH "the pythia8 data dir") _PYTHIA8_CONFIG_ ("--datadir" PYTHIA8_DATA_DIR PATH "the pythia8 data dir")
_PYTHIA8_CONFIG_ ("--cxxflags" PYTHIA8_CXXFLAGS STRING "the pythia8 cxxflags") _PYTHIA8_CONFIG_ ("--cxxflags" PYTHIA8_CXXFLAGS STRING "the pythia8 cxxflags")
else()
# if we get here, pythia8-config was not found by CMake so we use
# CMake to try and find Pythia8 for us (but let the user know first).
# We set these variables to exactly match the format of pythia8-config.
# If any one of the variables is not found, CMake will automatically report
# that Pythia8 is NOT FOUND (which is what we want).
message(WARNING
"pythia8-config was not found. Attempting to manually locate Pythia8...")
# construct the prefix directory
find_path(PYTHIA8_PREFIX "Pythia8/Pythia.h")
# find the main header
find_path(PYTHIA8_INCLUDE_DIR "Pythia8/Pythia.h")
# and find the main library
find_library(PYTHIA8_LIBRARY "libpythia8.so")
# attempt to find the data directory
find_path(PYTHIA8_DATA_DIR "xmldoc"
HINTS "/usr/share" "/usr/local/share"
PATH_SUFFIXES "Pythia8")
# and set our best guess
message("Found Pythia8 in ${PYTHIA8_PREFIX}")
message("Found Pythia.h in ${PYTHIA8_INCLUDE_DIR}")
message("Found libpythia8.so at ${PYTHIA8_LIBRARY_DIR}")
message("Found pythia-data in in ${PYTHIA8_DATA_DIR}")
endif () endif ()
# standard cmake infrastructure: # standard cmake infrastructure:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment