LHAPDF veraion 5.9.1
[u/mrichter/AliRoot.git] / cmake / CMakemacosxicc.cmake
CommitLineData
03d1e24f 1#--------------------------------------------------------------------------------#
2# Package File for #
3# Author : Johny Jose (johny.jose@cern.ch) #
4# Variables Defined : #
5# #
6# SRCS - C++ source files #
7# HDRS - C++ header files #
8# DHDR - ROOT Dictionary Linkdef header file #
9# CSRCS - C source files #
10# CHDRS - C header files #
11# EINCLUDE - Include directories #
12# EDEFINE - Compiler definitions #
13# ELIBS - Extra libraries to link #
14# ELIBSDIR - Extra library directories #
15# PACKFFLAGS - Fortran compiler flags for package #
16# PACKCXXFLAGS - C++ compiler flags for package #
17# PACKCFLAGS - C compiler flags for package #
18# PACKSOFLAGS - Shared library linking flags #
19# PACKLDFLAGS - Module linker flags #
20# PACKBLIBS - Libraries to link (Executables only) #
21# EXPORT - Header files to be exported #
22# CINTHDRS - Dictionary header files #
23# CINTAUTOLINK - Set automatic dictionary generation #
24# ARLIBS - Archive Libraries and objects for linking (Executables only) #
25# SHLIBS - Shared Libraries and objects for linking (Executables only) #
26#--------------------------------------------------------------------------------#
27
28set(FINK_ROOT $ENV{FINK_ROOT})
29if( NOT FINK_ROOT )
30
31 set ( FINK_ROOT /usr/local)
32
33endif( NOT FINK_ROOT )
34
aecc2ba0 35# Global Optimization
36set ( OPT )
37# ------- Setting optimization flags for default configuration -------
38if((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "None"))
39 set(DEFAULT_CXX_FLAGS "-O -g")
40 set(OPT "${DEFAULT_CXX_FLAGS}")
41 message("-- Setting compiler flags for default configuration: ${DEFAULT_CXX_FLAGS}")
42endif((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "None"))
43# --------------------------------------------------------------------
03d1e24f 44set ( NOOPT "-g")
45
46set ( CXXOPT ${OPT})
47set ( CXXNOOPT ${NOOPT})
48set ( COPT ${OPT})
49set ( FOPT ${OPT})
50
51set ( CLIBDEFS "-DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC")
52set ( CLIBCXXOPTS )
53set ( CLIBCOPT )
54set ( CLIBFOPT ${CLIBDEFS})
55
56set ( CXXFLAGS "${CXXOPT} -fPIC -wd1476 -I/usr/X11R6/include -I${FINK_ROOT}/include)"
57
58set ( CXXFLAGSNO ${CXXNOOPT})
59
60set ( CFLAGS "${COPT} -fPIC -restrict -I${FINK_ROOT}/include")
61
62set ( FFLAGS "${CLIBFOPT} ${FOPT}")
63
64set ( CINTFLAGS )
65
66set ( LDFLAGS "${OPT} ${DICTLOAD}")
67
68set ( SOFLAGS "${OPT} -dynamiclib -undefined dynamic_lookup -single_module")
69
70set ( DYFLAGS "-dynamiclib -undefined dynamic_lookup -single_module")
71
72set ( ALLIB )
73
74set ( EXEFLAGS "-bind_at_load")
75
76execute_process(COMMAND find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'
77 OUTPUT_VARIABLE LIBNOVER
78 OUTPUT_STRIP_TRAILING_WHITESPACE)
79
80execute_process(COMMAND which ifort | sed -e 's|bin|lib|'
81 OUTPUT_VARIABLE IFORT
82 OUTPUT_STRIP_TRAILING_WHITESPACE)
83
84set (SYSLIBS "-lcrypt -L/usr/X11R6/lib -lX11 ${LIBNOVER} -L/usr/local/lib -lXt -L${IFORT} -lifcore -lifport")