Preliminary files for CMake
[u/mrichter/AliRoot.git] / cmake / modules / FindDATE.cmake
CommitLineData
e969a926 1# -*- mode: cmake -*-
2
3# - Find the DATE system
4# Finds if the RuleChecker is installed and sets the following variables:
5#
6# DATE_FOUND = Boolean defining if DATE is installed
7#
8
9# Check if DATE is installed and in the path
10
11Execute_process(
12 COMMAND which date-config
13 OUTPUT_VARIABLE DATE_PROGRAM)
14
15If(DATE_PROGRAM)
16 Set(DATE_FOUND YES)
17 Message(STATUS "DATE is installed on this system")
18 Execute_process(COMMAND date-config --cflags OUTPUT_VARIABLE DATEFLAGS)
19Else(DATE_PROGRAM)
20 Set(DATE_FOUND NO)
21 Message(STATUS "DATE is not installed on this system")
22 If(UNIX)
23 Execute_process(
24 COMMAND uname
25 OUTPUT_VARIABLE _uname
26 OUTPUT_STRIP_TRAILING_WHITESPACE)
27 Else(UNIX)
28 Set(_uname "Unknown")
29 Endif(UNIX)
30 Set(DATEFLAGS "-D${_uname} -DDATE_SYS=${_uname} -Dlong32=\"int\" -Dlong64=\"long long\" -DdatePointer=\"long\"")
31Endif(DATE_PROGRAM)
32
33Set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${DATEFLAGS})
34
35