IAP GITLAB

Commit 87570bef authored by Ralf M Ulrich's avatar Ralf M Ulrich

cleanup findconex

parent 8cd70c75
......@@ -11,9 +11,9 @@
# - find Conex
#
# This module defines
# CONEX_FOUND
# CONEX_PREFIX
# CONEX_INCLUDE_DIR
# CONEX_LIBRARY
set (SEARCH_conex_
${WITH_CONEX}
......@@ -44,88 +44,9 @@ find_library (CONEX_LIBRARY
DOC "The CONEX library"
)
if (CONEX_INCLUDE_DIR)
if (NOT CONEX_FIND_QUIETLY)
message (STATUS "Conex include directory is ${CONEX_INCLUDE_DIR}")
endif ()
set (CMAKE_REQUIRED_INCLUDES ${CONEX_INCLUDE_DIR})
include (CheckCXXSourceCompiles)
check_cxx_source_compiles (
"
#include <conexHEModels.h>
int
main()
{
EHEModel test = eSibyll23;
if (test == eSibyll23) return 0;
return 0;
}
"
HAS_SIBYLL23
)
check_cxx_source_compiles (
"
#include <conexHEModels.h>
int
main()
{
EHEModel test = eEposLHC;
if (test == eEposLHC) return 0;
return 0;
}
"
HAS_EPOS_LHC
)
check_cxx_source_compiles (
"
#include <ConexDynamicInterface.h>
#include <ConexDynamicInterface.cc>
int
main()
{
ConexDynamicInterface cdi(eSibyll23);
cdi.GetLeadingInteractionsParticleData();
return 0;
}
"
HAS_LEADINGINTERACTION_INTERFACE
)
if (HAS_LEADINGINTERACTION_INTERFACE)
# at least conex2r5.65
set (CONEX_VERSION 565)
if (NOT CONEX_FIND_QUIETLY)
message (STATUS "Conex has interface to leading interactions. Set _CONEX2R_VERSION=565.")
endif ()
elseif (HAS_SIBYLL23)
# at least conex2r5.30
set (CONEX_VERSION 530)
if (NOT CONEX_FIND_QUIETLY)
message (STATUS "Conex has SIBYLL2.3. Set _CONEX2R_VERSION=530.")
endif ()
elseif (HAS_EPOS_LHC)
# at least conex2r4.36
set (CONEX_VERSION 436)
if (NOT CONEX_FIND_QUIETLY)
message (STATUS "Conex has EPOS-LHC. Set _CONEX2R_VERSION=436.")
endif ()
else ()
# pre LHC
set (CONEX_VERSION 300)
if (NOT CONEX_FIND_QUIETLY)
message (STATUS "Conex is pre-LHC. Set _CONEX2R_VERSION=300.")
endif ()
endif ()
endif ()
# standard cmake infrastructure:
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (CONEX
"Did not find system-level CONEX."
CONEX_INCLUDE_DIR CONEX_LIBRARY CONEX_VERSION)
mark_as_advanced (CONEX_INCLUDE_DIR CONEX_LIBRARY CONEX_VERSION)
CONEX_INCLUDE_DIR CONEX_LIBRARY CONEX_PREFIX)
mark_as_advanced (CONEX_INCLUDE_DIR CONEX_LIBRARY CONEX_PREFIX)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment