Fix for FindRuleChecker, few pkgs, updated readme, added class level targets for...
authorjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Nov 2010 10:48:28 +0000 (10:48 +0000)
committerjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Nov 2010 10:48:28 +0000 (10:48 +0000)
CMakeLists.txt
README_CMake
TRD/CMakelibTRDbase.pkg
cmake/FindRuleChecker.cmake

index c912988..0c144f2 100644 (file)
@@ -143,7 +143,7 @@ set(CERNMODULES LHAPDF HIJING MICROCERN HERWIG)
 if(EXISTS ${ROOTINCDIR}/TPythia6.h)
   set(PYTHIA6 TRUE)
   list(APPEND CERNMODULES PYTHIA6 RALICE EVGEN)
-else()
+elseif(NOT NOPYTHIA)
   message(FATAL_ERROR "ROOT must have Pythia6 enabled !")
 endif(EXISTS ${ROOTINCDIR}/TPythia6.h)
 
index 9e9eccb..63d03c5 100644 (file)
@@ -42,13 +42,14 @@ eg. make STEER-all STEER-all-static
 
 eg.    make STEERbase STEERbase-static
 
-8. The code can be checked for the ALICE coding conventions on a package or module level using the following targets. 
+8. The code can be checked for the ALICE coding conventions on a package, module or class level using the following targets. 
 
   make check-all
   make <Module>-check-all
   make <Package>-check
+  make <Module>-<ClassName>-check
 
-  The resulting violations will be written to the folder $ALICE_ROOT/<Module>/check/viols
+  The resulting violations will be written to the folder <Build_Directory>/<Module>/check/viols
 
 9. To Build PARs the following targets can be used. The resulting packages will be created in the cmake build directory
 
index d1cc84c..55c5ce4 100644 (file)
@@ -25,7 +25,7 @@
 # SHLIBS - Shared Libraries and objects for linking (Executables only)           #
 #--------------------------------------------------------------------------------#
 
-set ( SRCS  AliTRDarraySignal.cxx AliTRDarrayDictionary.cxx AliTRDarrayADC.cxx AliTRDSignalIndex.cxx AliTRDgeometry.cxx AliTRDdigit.cxx AliTRDdigitsManager.cxx AliTRDdigitsParam.cxx AliTRDrawData.cxx AliTRDpadPlane.cxx AliTRDrawStreamOld.cxx AliTRDrawStreamBase.cxx AliTRDrawStream.cxx AliTRDtestBeam.cxx AliTRDCommonParam.cxx AliTRDfeeParam.cxx AliTRDgtuParam.cxx AliTRDcalibDB.cxx Cal/AliTRDCalROC.cxx Cal/AliTRDCalPad.cxx Cal/AliTRDCalDet.cxx Cal/AliTRDCalDCS.cxx Cal/AliTRDCalDCSFEE.cxx Cal/AliTRDCalDCSPTR.cxx Cal/AliTRDCalDCSGTUBoardInfo.cxx Cal/AliTRDCalDCSGTUCtpOpc.cxx Cal/AliTRDCalDCSGTUSegment.cxx Cal/AliTRDCalDCSGTUTgu.cxx Cal/AliTRDCalDCSGTUTmu.cxx Cal/AliTRDCalDCSGTU.cxx Cal/AliTRDCalMonitoring.cxx Cal/AliTRDCalChamberStatus.cxx Cal/AliTRDCalPadStatus.cxx Cal/AliTRDCalSingleChamberStatus.cxx Cal/AliTRDCalPID.cxx AliTRDCalibraFit.cxx AliTRDCalibraMode.cxx AliTRDCalibraVector.cxx AliTRDCalibraVdriftLinearFit.cxx AliTRDCalibPadStatus.cxx AliTRDCalibChamberStatus.cxx AliTRDCalibViewer.cxx AliTRDCalibViewerGUI.cxx AliTRDEntriesInfo.cxx AliTRDPhInfo.cxx AliTRDPrfInfo.cxx AliTRDUshortInfo.cxx AliTRDQAChecker.cxx AliTRDPreprocessor.cxx AliTRDSaxHandler.cxx AliTRDDataDCS.cxx AliTRDSensor.cxx AliTRDSensorArray.cxx AliTRDalignment.cxx AliTRDtrapConfig.cxx AliTRDmcmSim.cxx AliTRDtrapConfigHandler.cxx AliTRDtrackGTU.cxx AliTRDtrackletBase.cxx AliTRDtrackletGTU.cxx AliTRDtrackletMCM.cxx AliTRDtrackletWord.cxx AliTRDgtuSim.cxx AliTRDgtuTMU.cxx AliTRDhit.cxx AliTRDrecoParam.cxx AliTRDSimParam.cxx)
+set ( SRCS  AliTRDarraySignal.cxx AliTRDarrayDictionary.cxx AliTRDarrayADC.cxx AliTRDSignalIndex.cxx AliTRDgeometry.cxx AliTRDdigit.cxx AliTRDdigitsManager.cxx AliTRDdigitsParam.cxx AliTRDrawData.cxx AliTRDpadPlane.cxx AliTRDrawStreamOld.cxx AliTRDrawStreamBase.cxx AliTRDrawStream.cxx AliTRDCommonParam.cxx AliTRDfeeParam.cxx AliTRDgtuParam.cxx AliTRDcalibDB.cxx Cal/AliTRDCalROC.cxx Cal/AliTRDCalPad.cxx Cal/AliTRDCalDet.cxx Cal/AliTRDCalDCS.cxx Cal/AliTRDCalDCSFEE.cxx Cal/AliTRDCalDCSPTR.cxx Cal/AliTRDCalDCSGTUBoardInfo.cxx Cal/AliTRDCalDCSGTUCtpOpc.cxx Cal/AliTRDCalDCSGTUSegment.cxx Cal/AliTRDCalDCSGTUTgu.cxx Cal/AliTRDCalDCSGTUTmu.cxx Cal/AliTRDCalDCSGTU.cxx Cal/AliTRDCalMonitoring.cxx Cal/AliTRDCalChamberStatus.cxx Cal/AliTRDCalPadStatus.cxx Cal/AliTRDCalSingleChamberStatus.cxx Cal/AliTRDCalPID.cxx AliTRDCalibraFit.cxx AliTRDCalibraMode.cxx AliTRDCalibraVector.cxx AliTRDCalibraVdriftLinearFit.cxx AliTRDCalibPadStatus.cxx AliTRDCalibChamberStatus.cxx AliTRDCalibViewer.cxx AliTRDCalibViewerGUI.cxx AliTRDEntriesInfo.cxx AliTRDPhInfo.cxx AliTRDPrfInfo.cxx AliTRDUshortInfo.cxx AliTRDQAChecker.cxx AliTRDPreprocessor.cxx AliTRDSaxHandler.cxx AliTRDDataDCS.cxx AliTRDSensor.cxx AliTRDSensorArray.cxx AliTRDalignment.cxx AliTRDtrapConfig.cxx AliTRDmcmSim.cxx AliTRDtrapConfigHandler.cxx AliTRDtrackGTU.cxx AliTRDtrackletBase.cxx AliTRDtrackletGTU.cxx AliTRDtrackletMCM.cxx AliTRDtrackletWord.cxx AliTRDgtuSim.cxx AliTRDgtuTMU.cxx AliTRDhit.cxx AliTRDrecoParam.cxx AliTRDSimParam.cxx)
 
 string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
 
index 9821fde..ae1fefc 100644 (file)
@@ -34,7 +34,7 @@ endif(IRST_INSTALLDIR)
 
 macro(ALICE_CheckModule)
   if(RULECHECKER_FOUND)
-    set(CHECKDIR ${ALICE_ROOT}/${MODULE}/check)
+    set(CHECKDIR ${CMAKE_BINARY_DIR}/${MODULE}/check)
     set(violFiles)
     foreach(_srcfile ${SRCS})
       string (REGEX REPLACE "cxx$" "h" _header ${_srcfile})
@@ -42,6 +42,7 @@ macro(ALICE_CheckModule)
       string (REGEX REPLACE "cxx$" "viol" _viol ${_srcname})
       string (REGEX REPLACE "cxx$" "cxx.xml" _srcxml ${_srcname})
       string (REGEX REPLACE "cxx$" "h.xml" _hxml ${_srcname})
+      string (REGEX REPLACE ".cxx$" "" _class ${_srcname})
       set(depends)
       if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_header})
         list(APPEND depends ${_header})
@@ -50,8 +51,8 @@ macro(ALICE_CheckModule)
                           COMMAND ${CMAKE_COMMAND} -E make_directory ${CHECKDIR}/viols
                           COMMAND ${RULECHECKER_SRCML} ${_srcfile} ${CHECKDIR}/${_srcxml}
                           COMMAND ${RULECHECKER_SRCML} ${_header} ${CHECKDIR}/${_hxml}
-                          COMMAND ${Java_JAVA_EXECUTABLE} -jar ${FACTEXTRACTOR_JAR} ${CHECKDIR} ${CHECKDIR}
-                          COMMAND ${Java_JAVA_EXECUTABLE} -jar ${RULECHECKER_JAR} ${CHECKDIR}/${_srcxml} ${CHECKDIR}/${_hxml} ${CHECKDIR}/factFile.xml ${RULECHECKER_RULES} > ${CHECKDIR}/viols/${_viol}
+                          COMMAND ${JAVA_RUNTIME} -jar ${FACTEXTRACTOR_JAR} ${CHECKDIR} ${CHECKDIR}
+                          COMMAND ${JAVA_RUNTIME} -jar ${RULECHECKER_JAR} ${CHECKDIR}/${_srcxml} ${CHECKDIR}/${_hxml} ${CHECKDIR}/factFile.xml ${RULECHECKER_RULES} > ${CHECKDIR}/viols/${_viol}
                           DEPENDS ${_depends}
                           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
         list(APPEND violFiles ${_viol})
@@ -60,13 +61,14 @@ macro(ALICE_CheckModule)
                           COMMAND ${CMAKE_COMMAND} -E make_directory ${CHECKDIR}
                           COMMAND ${CMAKE_COMMAND} -E make_directory ${CHECKDIR}/viols
                           COMMAND ${RULECHECKER_SRCML} ${_srcfile} ${CHECKDIR}/${_srcxml}
-                          COMMAND ${Java_JAVA_EXECUTABLE} -jar ${FACTEXTRACTOR_JAR} ${CHECKDIR} ${CHECKDIR}
-                          COMMAND ${Java_JAVA_EXECUTABLE} -jar ${RULECHECKER_JAR} ${CHECKDIR}/${_srcxml} ${CHECKDIR}/${_hxml} ${CHECKDIR}/factFile.xml ${RULECHECKER_RULES} > ${CHECKDIR}/viols/${_viol}
+                          COMMAND ${JAVA_RUNTIME} -jar ${FACTEXTRACTOR_JAR} ${CHECKDIR} ${CHECKDIR}
+                          COMMAND ${JAVA_RUNTIME} -jar ${RULECHECKER_JAR} ${CHECKDIR}/${_srcxml} ${CHECKDIR}/${_hxml} ${CHECKDIR}/factFile.xml ${RULECHECKER_RULES} > ${CHECKDIR}/viols/${_viol}
                           DEPENDS ${_depends}
                           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
         list(APPEND violFiles ${_viol})
       endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_header})
-      endforeach(_srcfile ${SRCS})
+      add_custom_target(${MODULE}-${_class}-check DEPENDS ${_viol})
+    endforeach(_srcfile ${SRCS})
     if(violFiles)
       add_custom_target(${PACKAGE}-check DEPENDS ${violFiles})
       add_dependencies(${PACKAGE}-check ${violFiles})