More decay options
[u/mrichter/AliRoot.git] / cmake / CMakemacosx64.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
28execute_process (COMMAND sw_vers | sed -n 's/ProductVersion://p' | cut -d. -f1
29 OUTPUT_VARIABLE MACOSX_MAJOR
30 OUTPUT_STRIP_TRAILING_WHITESPACE )
31execute_process (COMMAND sw_vers | sed -n 's/ProductVersion://p' | cut -d. -f2
32 OUTPUT_VARIABLE MACOSX_MINOR
33 OUTPUT_STRIP_TRAILING_WHITESPACE )
34
35set(FINK_ROOT $ENV{FINK_ROOT})
36if( NOT FINK_ROOT )
37
38 set ( FINK_ROOT /usr/local)
39
40endif( NOT FINK_ROOT )
41
42set ( OPT "-O -g")
43set ( NOOPT "-O0 -g")
44
45set ( CXXOPT ${OPT})
46set ( CXXNOOPT ${NOOPT})
47set ( COPT ${OPT})
48
49if( F77 MATCHES "g95")
50
51 set ( FOPT "${FOPT} -fbounds-check")
52
53endif( F77 MATCHES "g95")
54
55set ( CLIBDEFS "-DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC")
56set ( CLIBCXXOPTS )
57set ( CLIBCOPT )
58set ( CLIBFOPT ${CLIBDEFS})
59
60set ( CXXWARN "-Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi")
61
62set ( CXXSTF "-pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I${FINK_ROOT}/include")
63
64set ( CXXFLAGS "${CXXOPT} ${CXXSTF}")
65
66set ( CXXFLAGSNO "${CXXNOOPT} ${CXXSTF}")
67
68set ( CFLAGS "${COPT} -Wall -W -fno-common -pipe -I${FINK_ROOT}/include")
69
70if(F77 MATCHES "g95")
71
72 set ( FFLAGS "${FFLAGS} -ftrace=full")
73 set ( FFLAGS "${FFLAGS} -DFORTRAN_G95")
74
75else()
76
77 set ( FFLAGS "${FFLAGS} -DFORTRAN_GFORTRAN")
78
79endif(F77 MATCHES "g95")
80
81set ( CINTFLAGS )
82
83set ( LDFLAGS "${OPT} ${DICTLOAD}")
84
85set ( SOFLAGS "-m64 -dynamiclib -undefined dynamic_lookup -single_module")
86
87set ( ALLIB )
88
89set ( SYSLIBS "-L/usr/X11R6/lib -lX11")
90
91
92set ( EXEFLAGS "-bind_at_load")
93
94if( F77 MATCHES "g95")
95
96 execute_process(COMMAND ${CMAKE_Fortran_COMPILER} --print-search-dirs
97 OUTPUT_VARIABLE SYSLIBS
98 OUTPUT_STRIP_TRAILING_WHITESPACE)
99 string(REGEX MATCH "^.*install:[^\n]*" SYSLIBS ${SYSLIBS})
100 string(REGEX REPLACE "^.*install: " "" SYSLIBS ${SYSLIBS})
101 set(SYSLIBS "-L${SHLIB} -lf95")
102 set(DYLIB ${SYSLIBS})
103
104else()
105
106 execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -print-file-name=libgfortran.dylib
107 OUTPUT_VARIABLE _shlib
108 OUTPUT_STRIP_TRAILING_WHITESPACE)
109 execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -print-file-name=libgfortranbegin.a
110 OUTPUT_VARIABLE _alib
111 OUTPUT_STRIP_TRAILING_WHITESPACE)
112 set( SYSLIBS "${SYSLIBS} -ldl ${_shlib} ${_alib}")
113
114endif(F77 MATCHES "g95")