System configuration files for mac solaris and win32
[u/mrichter/AliRoot.git] / cmake / CMakelinuxicc.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
28
29execute_process (COMMAND ${CMAKE_C_COMPILER} -V 2>&1 | awk '{ if (NR == 1) print $$8}' | cut -d'.' -f1
30 OUTPUT_VARIABLE ICC_MAJOR
31 OUTPUT_STRIP_TRAILING_WHITESPACE)
32execute_process (COMMAND ${CMAKE_C_COMPILER} -V 2>&1 | awk '{ if(NR == 1) print $$8}' | cut -d'.' -f2
33 OUTPUT_VARIABLE ICC_MINOR
34 OUTPUT_STRIP_TRAILING_WHITESPACE)
35
36set ( OPT "-O -ip")
37set ( NOOPT "-O0")
38
39set ( CXXOPT "${OPT} -fPIC")
40set ( CXXNOOPT "${NOOPT} -fPIC")
41set ( COPT "${OPT} -fPIC")
42set ( FOPT "${OPT} -fPIC")
43
44set ( CLIBDEFS "-DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ")
45set ( CLIBCXXOPTS )
46set ( CLIBCOPT )
47set ( CLIBFOPT ${CLIBDEFS})
48
49set ( CXXFLAGS ${CXXOPT})
50set ( CXXFLAGSNO ${CXXNOOPT})
51set ( CFLAGS ${COPT})
52set ( FFLAGS "${CLIBFOPT} ${FOPT}")
53set ( DEPENDFFLAGS ${FFLAGS})
54
55set ( CINTFLAGS )
56
57set ( LDFLAGS ${OPT})
58
59set ( SOFLAGS "-shared")
60
61set ( ALLIB )
62
63execute_process(COMMAND find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'
64 OUTPUT_VARIABLE LIBNOVER
65 OUTPUT_STRIP_TRAILING_WHITESPACE)
66
67execute_process(COMMAND which ifort | sed -e 's|bin|lib|' | sed -e 's|ifor||'
68 OUTPUT_VARIABLE IFORT
69 OUTPUT_STRIP_TRAILING_WHITESPACE)
70
71set (SYSLIBS "-lcrypt -L/usr/X11R6/lib -lX11 ${LIBNOVER} -L/usr/local/lib -lXt -L${IFORT} -lifcore -lifport")
72