Moving required CMake version from 2.8.4 to 2.8.8
[u/mrichter/AliRoot.git] / cmake / CMakemacosx.cmake
CommitLineData
6db31708 1#--------------------------------------------------------------------------------#
2# Maxosx CMake System configuration file for the AliRoot Build System #
3# #
4# Author : Johny Jose (johny.jose@cern.ch) #
5# #
6#--------------------------------------------------------------------------------#
7
8execute_process (COMMAND sw_vers | sed -n 's/ProductVersion://p' | cut -d. -f1
9 OUTPUT_VARIABLE MACOSX_MAJOR
10 OUTPUT_STRIP_TRAILING_WHITESPACE )
11execute_process (COMMAND sw_vers | sed -n 's/ProductVersion://p' | cut -d. -f2
12 OUTPUT_VARIABLE MACOSX_MINOR
13 OUTPUT_STRIP_TRAILING_WHITESPACE )
14
15set(FINK_ROOT $ENV{FINK_ROOT})
16if( NOT FINK_ROOT )
17
18 set ( FINK_ROOT /usr/local)
19
20endif( NOT FINK_ROOT )
21
aecc2ba0 22# Global Optimization
23set ( OPT )
24# ------- Setting optimization flags for default configuration -------
25if((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "None"))
26 set(DEFAULT_CXX_FLAGS "-O -g")
27 set(OPT "${DEFAULT_CXX_FLAGS}")
28 message("-- Setting compiler flags for default configuration: ${DEFAULT_CXX_FLAGS}")
29endif((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "None"))
30# --------------------------------------------------------------------
31set ( NOOPT "-g")
6db31708 32
33set ( CXXOPT "${OPT}")
34set ( CXXNOOPT "${NOOPT}")
35set ( COPT "${OPT}")
36
37set ( CLIBDEFS "-DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC")
38set ( CLIBCXXOPTS )
39set ( CLIBCOPT )
40set ( CLIBFOPT ${CLIBDEFS})
41
42set ( CXXWARN "-Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi")
43
44set ( CXXSTF "-pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I${FINK_ROOT}/include")
45
46set ( CXXFLAGS "${CXXOPT} ${CXXSTF}")
47
48set ( CXXFLAGSNO "${CXXNOOPT} ${CXXSTF}")
49
50set ( CFLAGS "${COPT} -Wall -W -fno-common -pipe -I${FINK_ROOT}/include")
51
52set ( FFLAGS "${FFLAGS} -DFORTRAN_GFORTRAN")
53
54set ( DEPENDFFLAGS ${FFLAGS})
55
56set ( CINTFLAGS )
57
58set ( LDFLAGS "${OPT} ${DICTLOAD}")
59
60set ( SOFLAGS "-dynamiclib -undefined dynamic_lookup -single_module")
61
62set ( ALLIB )
63
64set ( DEPENDCXXFLAGS "${CXXFLAGS} -I/usr/include/sys")
65
66set ( SYSLIBS "-L/usr/X11R6/lib -lX11")
67
68set ( EXEFLAGS "-bind_at_load")
69
70set (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem")
71
72set (CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem")
73
74
75execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -print-file-name=libgfortran.dylib
76 OUTPUT_VARIABLE _shlib
77 OUTPUT_STRIP_TRAILING_WHITESPACE)
78execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -print-file-name=libgfortranbegin.a
79 OUTPUT_VARIABLE _alib
80 OUTPUT_STRIP_TRAILING_WHITESPACE)
81set( SYSLIBS "${SYSLIBS} -ldl ${_shlib} ${_alib}")
82