Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /JETSCAPE/cmakemodules/FindCERNLIB.cmake is written in an unsupported language. File is not indexed.

0001  ################################################################################
0002  #    Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH    #
0003  #                                                                              #
0004  #              This software is distributed under the terms of the             # 
0005  #         GNU Lesser General Public Licence version 3 (LGPL) version 3,        #  
0006  #                  copied verbatim in the file "LICENSE"                       #
0007  ################################################################################
0008 # - Try to find CERNLIB
0009 # Once done this will define
0010 #
0011 #  CERNLIB_FOUND - system has CERNLIB
0012 #### (not needed)  CERNLIB_INCLUDE_DIR - the CERNLIB include directory
0013 #  CERNLIB_LIBRARIES - The libraries needed to use CERNLIB
0014 #### (not needed)  CERNLIB_DEFINITIONS - Compiler switches required for using CERNLIB
0015 #
0016 
0017 if (CERNLIB_INCLUDE_DIR AND CERNLIB_LIBRARY_DIR)
0018   SET (CERNLIB_INCLUDE_DIR CERNLIB_INCLUDE_DIR-NOTFOUND)
0019   SET (CERNLIB_LIB_DIR CERNLIB_LIB_DIR-NOTFOUND)
0020   SET (CERNLIB_PLISTS_LIB_DIR CERNLIB_PLISTS_LIB_DIR-NOTFOUND)
0021 endif (CERNLIB_INCLUDE_DIR AND CERNLIB_LIBRARY_DIR)
0022 
0023 MESSAGE(STATUS "Looking for CERNLIB...")
0024 
0025 FIND_PATH(CERNLIB_INCLUDE_DIR NAMES CERNLIB PATHS
0026   ${SIMPATH}/cern/include
0027   $ENV{CERN_ROOT}/include
0028   NO_DEFAULT_PATH
0029 )
0030 
0031 FIND_PATH(CERNLIB_LIBRARY_DIR NAMES libgeant.a libmathlib.a PATHS
0032   ${SIMPATH}/cern/lib
0033   $ENV{CERN_ROOT}/lib
0034   NO_DEFAULT_PATH
0035 )
0036 
0037 if (CERNLIB_LIBRARY_DIR)
0038    set(CERNLIB_FOUND TRUE)
0039 endif (CERNLIB_LIBRARY_DIR)
0040 
0041 if (CERNLIB_FOUND)
0042   if (NOT CERNLIB_FIND_QUIETLY)
0043     MESSAGE(STATUS "Looking for CERNLIB... - found ${CERNLIB_LIBRARY_DIR}")
0044     SET(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${CERNLIB_LIBRARY_DIR})
0045   endif (NOT CERNLIB_FIND_QUIETLY)
0046 else (CERNLIB_FOUND)
0047   if (CERNLIB_FIND_REQUIRED)
0048     message(FATAL_ERROR "Looking for CERNLIB... - Not found")
0049   endif (CERNLIB_FIND_REQUIRED)
0050 endif (CERNLIB_FOUND)
0051