Fixed issue with DATE which caused SLC 4 builds to fail
authorjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Aug 2010 14:44:41 +0000 (14:44 +0000)
committerjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Aug 2010 14:44:41 +0000 (14:44 +0000)
cmake/modules/ALICEMacros.cmake
cmake/modules/FindDATE.cmake
cmake/modules/FindROOT.cmake

index 6039ee4..603d13e 100644 (file)
@@ -88,7 +88,7 @@ Function (AddLibrary LIB SRCS DHDRS)
 
   Add_Library(${LIB} SHARED ${ASRCS})
   set_property(TARGET ${LIB} PROPERTY LABELS ${label})
-  Target_Link_Libraries(${LIB} ${ALIROOT_LIBRARIES})
+  Target_Link_Libraries(${LIB} ${ALIROOT_LIBRARIES} ${DMONLIBS})
   Set_Target_Properties(${LIB} PROPERTIES ${ALIROOT_LIBRARY_PROPERTIES})
 #  message("${LIB}-${label}")
   Install(TARGETS ${LIB} DESTINATION ${ALIROOT_INSTALL_DIR}/lib
@@ -157,7 +157,7 @@ Function (AddHLTLibrary LIB SRCS DHDRS)
 
   Add_Library(${LIB} SHARED ${ASRCS})
   set_property(TARGET ${LIB} PROPERTY LABELS ${label})
-  Target_Link_Libraries(${LIB} ${ALIROOT_LIBRARIES})
+  Target_Link_Libraries(${LIB} ${ALIROOT_LIBRARIES} ${DMONLIBS})
   Set_Target_Properties(${LIB} PROPERTIES ${ALIROOT_LIBRARY_PROPERTIES})
 #  message("${LIB}-${label}")  
   Install(TARGETS ${LIB} DESTINATION ${ALIROOT_INSTALL_DIR}/lib
@@ -197,7 +197,7 @@ Function (AddExecutable BIN SRCS LIBS)
   Add_Executable(${BIN} ${SRCS})
   set_property(TARGET ${BIN} PROPERTY LABELS ${label})
 #  message("${BIN}-${label}")
-  Target_Link_Libraries(${BIN} ${ROOT_LIBRARIES} ${LIBS})
+  Target_Link_Libraries(${BIN} ${ROOT_LIBRARIES} ${LIBS} ${DMONLIBS})
   set_target_properties(${BIN} PROPERTIES OUTPUT_NAME ${executable_name})
   Install(TARGETS ${BIN} DESTINATION ${ALIROOT_INSTALL_DIR}/bin)
 
index 85afa4d..a28d9ee 100644 (file)
@@ -14,6 +14,12 @@ If(DATE_PROGRAM)
   Set(DATE_FOUND YES)
   Message(STATUS "DATE is installed on this system")
   Execute_process(COMMAND date-config --cflags OUTPUT_VARIABLE DATEFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
+  string(REGEX REPLACE "\"" "'" DATEFLAGS ${DATEFLAGS})
+  #separate_arguments(DATEFLAGS)
+  execute_process(COMMAND date-config --monitorlibs=dyn OUTPUT_VARIABLE DMONLIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
+  separate_arguments(DMONLIBS)
+  set(DATE_COMMON_DEFS $ENV{DATE_COMMON_DEFS})
+  set(DATE_MONITOR_DIR $ENV{DATE_MONITOR_DIR})
 Else(DATE_PROGRAM)
   Set(DATE_FOUND NO)
   Message(STATUS "DATE is not installed on this system")
@@ -27,7 +33,8 @@ Else(DATE_PROGRAM)
   Endif(UNIX)
   Set(DATEFLAGS "-D${_uname} -DDATE_SYS=${_uname} -Dlong32=\"int\" -Dlong64=\"long long\" -DdatePointer=\"long\"")
 Endif(DATE_PROGRAM)
-
+set(__DATEFLAGS ${DATEFLAGS})
+separate_arguments(__DATEFLAGS)
 Set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${DATEFLAGS})
 
 
index 5f55164..fd77efd 100644 (file)
@@ -141,25 +141,30 @@ Macro(ROOT_GENERATE_DICTIONARY INFILES LINKDEF_FILE OUTFILE INCLUDE_DIRS_IN)
   Foreach (_current_FILE ${INCLUDE_DIRS_IN})
     Set(INCLUDE_DIRS ${INCLUDE_DIRS} -I${_current_FILE})   
   Endforeach (_current_FILE ${INCLUDE_DIRS_IN})
+  list(APPEND INCLUDE_DIRS "-Iinclude" "-isystem${ROOT_INCLUDE_DIR}")
   String(REGEX REPLACE "^(.*)\\.(.*)$" "\\1.h" bla "${OUTFILE}")
   Set(OUTFILES ${OUTFILE} ${bla})
 
   Foreach (_current_FILE ${INFILES})
-    Get_filename_component(name_wo_path ${_current_FILE} NAME)
-    Set(infiles_nopath ${infiles_nopath} ${name_wo_path})   
+    string(REGEX MATCH "Ali" ALICE ${_current_FILE})
+#Filter Non-ALICE files
+    if(ALICE)
+      Get_filename_component(name_wo_path ${_current_FILE} NAME)
+      Set(infiles_nopath ${infiles_nopath} ${name_wo_path})   
+    endif(ALICE)
   Endforeach (_current_FILE ${INFILES})
 
   Get_property(_defs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_DEFINITIONS)
-  Set(_ddefs)
+  set(_ddefs)
   Foreach (_def ${_defs})
-    Set(_ddefs "${_ddefs} -D${_def}")
+    set(_ddefs "${_ddefs} -D${_def}")
   Endforeach (_def ${_defs})
+#Remove DALI_DIM for dictionaries
+  string(REGEX REPLACE "-DALI_DIM" "" _ddefs ${_ddefs})
   Separate_arguments(_ddefs)
-
   Add_custom_command(OUTPUT ${OUTFILES}
      COMMAND DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}:${ROOT_LIBRARY_DIR} ${ROOTCINT}
-     ARGS -f ${OUTFILE} -c -DHAVE_CONFIG_H ${_ddefs} ${_special_settings} ${INCLUDE_DIRS} ${infiles_nopath} ${LINKDEF_FILE} 
+     ARGS -f ${OUTFILE} -c -DHAVE_CONFIG_H ${_ddefs} ${__DATEFLAGS} ${_special_settings} ${INCLUDE_DIRS} ${infiles_nopath} ${LINKDEF_FILE} 
      DEPENDS ${INFILES} ${LINKDEF_FILE})
 
 Endmacro(ROOT_GENERATE_DICTIONARY)