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 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /cmake/Modules/FindPythia8.cmake (Version 11.3.0) and /cmake/Modules/FindPythia8.cmake (Version 11.0.p4)


  1 #[============================================ <<   1 # Locate Pythia8 library
  2 FindPythia8                                    <<   2 # in a directory defined via PYTHIA8 environment variable
  3 ---------                                      <<   3 #
  4                                                <<   4 # Defines:
  5 Find the Pythia8 event generator headers and l <<   5 #  PYTHIA8_FOUND
  6                                                <<   6 #  PYTHIA8_LIBRARIES
  7 Imported Targets                               <<   7 #  PYTHIA8_INCLUDES
  8 ^^^^^^^^^^^^^^^^                               <<   8 
  9                                                <<   9 find_library(PYTHIA8_LIBRARY NAMES pythia8
 10 This module defines the following :prop_tgt:`I <<  10            HINTS $ENV{PYTHIA8} $ENV{PYTHIA8}/lib)
 11                                                <<  11 
 12 ``Pythia8::Pythia8``                           <<  12 set(PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARY})
 13   The Pythia8 ``pythia8`` library, if found.   <<  13 #message(STATUS PYTHIA8_LIBRARIES ${PYTHIA8_LIBRARIES} )
 14                                                <<  14 
 15 Result Variables                               <<  15 find_path( PYTHIA8_INCLUDES Pythia8/Pythia.h
 16 ^^^^^^^^^^^^^^^^                               <<  16            HINTS $ENV{PYTHIA8} $ENV{PYTHIA8}/include $ENV{PYTHIA8}/include/Pythia8 )
 17                                                <<  17 set(PYTHIA8_INCLUDES ${PYTHIA8_INCLUDES})
 18 This module will set the following variables i <<  18 
 19                                                <<  19 # handle the QUIETLY and REQUIRED arguments and set PYTHIA8_FOUND to TRUE if
 20 ``Pythia8_FOUND``                              <<  20 # all listed variables are TRUE
 21   true if the Pythia8 headers and libraries we <<  21 INCLUDE(FindPackageHandleStandardArgs)
 22                                                <<  22 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pythia8 DEFAULT_MSG PYTHIA8_LIBRARIES)
 23 Hints                                          <<  23 
 24 ^^^^^                                          <<  24 mark_as_advanced(PYTHIA8_FOUND PYTHIA8_LIBRARIES PYTHIA8_INCLUDES)
 25                                                << 
 26 A user may set ``Pythia8_ROOT`` to a Pythia8 i << 
 27 module where to look.                          << 
 28                                                << 
 29 #]============================================ << 
 30                                                << 
 31 # WE ONLY ALLOW USE OF THIS MODULE IN GEANT4 O << 
 32 if(NOT PROJECT_NAME MATCHES "Geant4|py8decayer << 
 33   message(FATAL_ERROR "This FindPythia8.cmake  << 
 34     "extended example. No support or extension << 
 35     "will be provided.")                       << 
 36 endif()                                        << 
 37                                                << 
 38 # Look for the header file                     << 
 39 find_path(Pythia8_INCLUDE_DIR                  << 
 40   NAMES Pythia8/Pythia.h                       << 
 41   HINTS ${Pythia8_ROOT}/include)               << 
 42                                                << 
 43 if(NOT Pythia8_LIBRARY)                        << 
 44   find_library(Pythia8_LIBRARY                 << 
 45     NAMES pythia8 Pythia8                      << 
 46     HINTS ${Pythia8_ROOT}/lib ${Pythia8_ROOT}/ << 
 47 endif()                                        << 
 48                                                << 
 49 # Determine the version                        << 
 50 if(Pythia8_INCLUDE_DIR AND EXISTS "${Pythia8_I << 
 51   file(STRINGS "${Pythia8_INCLUDE_DIR}/Pythia8 << 
 52   if(PYTHIA8_H MATCHES "PYTHIA_VERSION ([0-9]\ << 
 53     set(Pythia8_VERSION "${CMAKE_MATCH_1}")    << 
 54   else()                                       << 
 55     set(Pythia8_VERSION "")                    << 
 56   endif()                                      << 
 57 endif()                                        << 
 58                                                << 
 59 # handle the QUIETLY and REQUIRED arguments an << 
 60 # all listed variables are TRUE                << 
 61 include(FindPackageHandleStandardArgs)         << 
 62 find_package_handle_standard_args(Pythia8      << 
 63   REQUIRED_VARS Pythia8_INCLUDE_DIR Pythia8_LI << 
 64   VERSION_VAR Pythia8_VERSION)                 << 
 65                                                << 
 66 mark_as_advanced(Pythia8_INCLUDE_DIR Pythia8_L << 
 67                                                << 
 68 # Create imported target                       << 
 69 if(Pythia8_FOUND)                              << 
 70   if(NOT TARGET Pythia8::Pythia8)              << 
 71     add_library(Pythia8::Pythia8 UNKNOWN IMPOR << 
 72     set_target_properties(Pythia8::Pythia8 PRO << 
 73       INTERFACE_INCLUDE_DIRECTORIES "${Pythia8 << 
 74       IMPORTED_LOCATION ${Pythia8_LIBRARY})    << 
 75   endif()                                      << 
 76 endif()                                        <<