#101318: Patch for various problems in AliROOT
[u/mrichter/AliRoot.git] / cmake / CMakelinuxia64gcc.cmake
1 #--------------------------------------------------------------------------------#
2 # Linuxx8664gcc CMake System configuration file for the AliRoot Build System     #
3 #                                                                                # 
4 # Author: Johny Jose (johny.jose@cern.ch)                                        #
5 #                                                                                #
6 #--------------------------------------------------------------------------------#
7
8
9 cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
10
11 #Retrieve Compiler Version
12
13
14 execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion
15                  COMMAND cut -d. -f1
16                  OUTPUT_VARIABLE CCMAJORV
17                  OUTPUT_STRIP_TRAILING_WHITESPACE) 
18 execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion
19                  COMMAND cut -d. -f2
20                  OUTPUT_VARIABLE CCMINORV
21                  OUTPUT_STRIP_TRAILING_WHITESPACE)
22
23
24 # Global Optimization
25 set(OPT)
26 # ------- Setting optimization flags for default configuration -------
27 if((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "None"))
28     set(DEFAULT_CXX_FLAGS "-O -g")
29     set(OPT "${DEFAULT_CXX_FLAGS}")
30     message("-- Setting compiler flags for default configuration: ${DEFAULT_CXX_FLAGS}")
31 endif((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "None"))
32 # --------------------------------------------------------------------
33 set(NOOPT "-g -mieee -mno-soft-float")
34
35 set(CXXOPT ${OPT})
36 set(CXXNOPT ${NOOPT})
37 set(COPT ${OPT})
38 set(FOPT ${OPT})
39
40 #CERNLIB defines
41 set(CLIBDEFS "-DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ")
42 set(CLIBCXXOPTS)
43 set(CLIBCOPT)
44 set(CLIBFOPT ${CLIBDEFS})
45
46 set(CXXWARN "-Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi")
47
48 set(CXXFLAGS "${OPT} -fPIC -pipe")
49 set(CXXFLAGSNO "${NOOPT} -fPIC -pipe")
50 set(CFLAGS      "${OPT} -Wall -fPIC -pipe -ansi")
51 set(FFLAGS "${CLIBFOPT} ${FOPT} -Wall -fPIC -pipe -fno-second-underscore")
52
53 set(SYSLIBS "-ldl -lg2c -lcrypt -L/usr/X11R6/lib -lX11")
54
55 set(LDFLAGS "${OPT}")
56 set(SOFLAGS "${OPT} -Wall -fPIC -pipe -shared")
57 set(SHLIB "-lg2c")
58 set(ALLIB)
59
60
61