Additional patch for #83850: Please consider deprecating CINTAUTOLINK (Christian)
[u/mrichter/AliRoot.git] / cmake / FindDATE.cmake
CommitLineData
6db31708 1# AliRoot Build System Module to find and configure DATE
2#
3# Author: Johny Jose (johny.jose@cern.ch)
4# Port of previous Makefile build to cmake
5
6b06712c 6cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
6db31708 7
8find_program(DATE_CONFIG date-config)
9message(STATUS "Check for Date : ${DATE_CONFIG}")
10if(DATE_CONFIG)
11 set(DATE_FOUND TRUE)
12 set(DATE_ROOT $ENV{DATE_ROOT})
13 set(DATE_COMMON_DEFS $ENV{DATE_COMMON_DEFS})
14 set(DATE_MONITOR_DIR $ENV{DATE_MONITOR_DIR})
15 execute_process(COMMAND date-config --cflags OUTPUT_VARIABLE DATEFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
16 string(REGEX REPLACE "\"" "'" DATEFLAGS ${DATEFLAGS})
17 set(DATEFLAGS "-DALI_DATE ${DATEFLAGS}")
18 execute_process(COMMAND date-config --monitorlibs OUTPUT_VARIABLE DMONLIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
19else()
20 set(DATEFLAGS "-D${CMAKE_SYSTEM_NAME} -DDATE_SYS=${CMAKE_SYSTEM_NAME} -Dlong32='int' -Dlong64='long long' -DdatePointer='long'")
21endif(DATE_CONFIG)
22