fixed problem with subproject submissions now you can run cmake /home/johny/opt/alice...
[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
44f1d74b 11Find_program( DATE_PROGRAM date-config )
e969a926 12
13If(DATE_PROGRAM)
14 Set(DATE_FOUND YES)
15 Message(STATUS "DATE is installed on this system")
1acfe552 16 Execute_process(COMMAND date-config --cflags OUTPUT_VARIABLE DATEFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
f180903d 17 string(REGEX REPLACE "\"" "'" DATEFLAGS ${DATEFLAGS})
18 #separate_arguments(DATEFLAGS)
19 execute_process(COMMAND date-config --monitorlibs=dyn OUTPUT_VARIABLE DMONLIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
20 separate_arguments(DMONLIBS)
5717a4eb 21 list(APPEND DMONLIBS "-L$ENV{DIMDIR}/$ENV{ODIR} -ldim")
f180903d 22 set(DATE_COMMON_DEFS $ENV{DATE_COMMON_DEFS})
23 set(DATE_MONITOR_DIR $ENV{DATE_MONITOR_DIR})
e969a926 24Else(DATE_PROGRAM)
25 Set(DATE_FOUND NO)
26 Message(STATUS "DATE is not installed on this system")
27 If(UNIX)
28 Execute_process(
29 COMMAND uname
30 OUTPUT_VARIABLE _uname
31 OUTPUT_STRIP_TRAILING_WHITESPACE)
32 Else(UNIX)
33 Set(_uname "Unknown")
34 Endif(UNIX)
8593c973 35 Set(DATEFLAGS "-D${_uname} -DDATE_SYS=${_uname} -Dlong32='int' -Dlong64='long long' -DdatePointer='long'")
e969a926 36Endif(DATE_PROGRAM)
f180903d 37set(__DATEFLAGS ${DATEFLAGS})
38separate_arguments(__DATEFLAGS)
e969a926 39Set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${DATEFLAGS})
40
41