Skip to content

Commit

Permalink
conflict fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Li committed Jul 19, 2020
2 parents 06363cc + f6cfe65 commit 03a5f48
Show file tree
Hide file tree
Showing 304 changed files with 60,664 additions and 12,269 deletions.
69 changes: 59 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
#################################################
# cmake file for building ArborContent framework
# cmake file for building APRILContent framework
# @author Eté Rémi ,IPNL
# Copyright (c) CNRS / IPNL
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.2 FATAL_ERROR )
#################################################

# project name
PROJECT( ArborContent )
PROJECT( APRILContent )

SET( ${PROJECT_NAME}_VERSION_MAJOR 01 )
SET( ${PROJECT_NAME}_VERSION_MINOR 05 )
SET( ${PROJECT_NAME}_VERSION_PATCH 01 )

FOREACH( _path ${CMAKE_PREFIX_PATH} )
FIND_PATH(pandora_cmake_path "PandoraCMakeSettings.cmake" ${_path}/cmakemodules)
IF (pandora_cmake_path)
BREAK()
ENDIF()
ENDFOREACH()

IF (pandora_cmake_path)
LIST(APPEND CMAKE_MODULE_PATH ${pandora_cmake_path})
ENDIF()

INCLUDE(PandoraCMakeSettings)

LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
INCLUDE( PandoraCMakeSettings )

OPTION( PANDORA_MONITORING "Whether to use PandoraMonitoring (requires ROOT)" OFF )
MESSAGE( STATUS "PANDORA_MONITORING : ${PANDORA_MONITORING}" )

OPTION( ARBOR_PARALLEL "Whether to use multithreading (requires OpenMP)" OFF )
MESSAGE( STATUS "ARBOR_PARALLEL : ${ARBOR_PARALLEL}" )
OPTION( APRIL_PARALLEL "Whether to use multithreading (requires OpenMP)" OFF )
MESSAGE( STATUS "APRIL_PARALLEL : ${APRIL_PARALLEL}" )

OPTION( INSTALL_DOC "Set to OFF to skip build/install Documentation" OFF )
MESSAGE( STATUS "INSTALL_DOC : ${INSTALL_DOC}" )
Expand All @@ -30,21 +43,38 @@ MESSAGE( STATUS "INSTALL_DOC : ${INSTALL_DOC}" )
INCLUDE_DIRECTORIES( ./include )

SET( INPUT_DIRS
<<<<<<< HEAD
ArborApi ArborObjects ArborCheating ArborClustering ArborHelpers ArborMonitoring ArborPfoConstruction ArborParticleId
ArborPlugins ArborReclustering ArborTools ArborTopologicalAssociation ArborTrackClusterAssociation ArborUtility )

FILE(GLOB INPUT_DIR_INCS ./include/*.h)
SOURCE_GROUP("Header files" FILES ${INPUT_DIR_INCS} )
LIST(APPEND ArborContent_INCS ${INPUT_DIR_INCS})
=======
APRILApi APRILObjects APRILCheating APRILClustering APRILHelpers APRILMonitoring APRILPfoConstruction APRILParticleId
APRILPlugins APRILReclustering APRILTools APRILTopologicalAssociation APRILTrackClusterAssociation APRILUtility )

FILE(GLOB INPUT_DIR_INCS ./include/*.h)
SOURCE_GROUP("Header files" FILES ${INPUT_DIR_INCS} )
LIST(APPEND APRILContent_INCS ${INPUT_DIR_INCS})
>>>>>>> newDev

FOREACH( INPUT_DIR ${INPUT_DIRS} )
FILE(GLOB_RECURSE INPUT_DIR_INCS ./include/${INPUT_DIR}/*.h)
SOURCE_GROUP("Header files\\${INPUT_DIR}" FILES ${INPUT_DIR_INCS} )
<<<<<<< HEAD
LIST(APPEND ArborContent_INCS ${INPUT_DIR_INCS})

FILE (GLOB_RECURSE INPUT_DIR_SRCS ./src/${INPUT_DIR}/*.cc )
SOURCE_GROUP("Source files\\${INPUT_DIR}" FILES ${INPUT_DIR_SRCS} )
LIST(APPEND ArborContent_SRCS ${INPUT_DIR_SRCS})
=======
LIST(APPEND APRILContent_INCS ${INPUT_DIR_INCS})

FILE (GLOB_RECURSE INPUT_DIR_SRCS ./src/${INPUT_DIR}/*.cc )
SOURCE_GROUP("Source files\\${INPUT_DIR}" FILES ${INPUT_DIR_SRCS} )
LIST(APPEND APRILContent_SRCS ${INPUT_DIR_SRCS})
>>>>>>> newDev
ENDFOREACH()

### C++11 check #############################################################
Expand All @@ -71,15 +101,19 @@ IF( NOT COMPILER_SUPPORTS_CXX_FLAGS )
ENDIF()

if(APPLE)
<<<<<<< HEAD
SET( CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Wno-long-long -Wno-sign-compare -Wshadow -fno-strict-aliasing ${CMAKE_CXX_FLAGS}" )
=======
SET( CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Wno-long-long -Wno-sign-compare -fno-strict-aliasing ${CMAKE_CXX_FLAGS}" )
>>>>>>> newDev
else()
SET( CMAKE_CXX_FLAGS "-Wall -Wextra -ansi -pedantic -Wno-long-long -Wno-sign-compare -Wshadow -fno-strict-aliasing ${CMAKE_CXX_FLAGS}" )
endif()



# -------------- packages -------------
FIND_PACKAGE( PandoraSDK 02.00.00 REQUIRED NO_CMAKE_PATH )
FIND_PACKAGE( PandoraSDK 02.00.00 REQUIRED )
INCLUDE_DIRECTORIES( ${PandoraSDK_INCLUDE_DIRS} )
LINK_LIBRARIES( ${PandoraSDK_LIBRARIES} )
ADD_DEFINITIONS ( ${PandoraSDK_DEFINITIONS} )
Expand All @@ -90,23 +124,33 @@ INCLUDE_DIRECTORIES( ${ROOT_INCLUDE_DIRS} )
LINK_LIBRARIES( ${ROOT_LIBRARIES} ${ROOT_COMPONENT_LIBRARIES} )
ADD_DEFINITIONS ( ${ROOT_DEFINITIONS} )


IF( PANDORA_MONITORING )
FIND_PACKAGE( PandoraMonitoring REQUIRED NO_CMAKE_PATH )
FIND_PACKAGE( PandoraMonitoring REQUIRED )
INCLUDE_DIRECTORIES( ${PandoraMonitoring_INCLUDE_DIRS} )
LINK_LIBRARIES( ${PandoraMonitoring_LIBRARIES} )
ADD_DEFINITIONS ( ${PandoraMonitoring_DEFINITIONS} )
ADD_DEFINITIONS( "-DMONITORING" )
ENDIF()


IF( ARBOR_PARALLEL )
IF( APRIL_PARALLEL )
FIND_PACKAGE( OpenMP REQUIRED )
ADD_DEFINITIONS( ${OpenMP_CXX_FLAGS} )
ADD_DEFINITIONS( "-DARBOR_PARALLEL=1" )
ADD_DEFINITIONS( "-DAPRIL_PARALLEL=1" )
ENDIF()

# mlpack
FIND_PACKAGE( mlpack REQUIRED )
INCLUDE_DIRECTORIES( SYSTEM ${mlpack_INCLUDE_DIRS} )
LINK_LIBRARIES( ${mlpack_LIBRARIES} )

FIND_PACKAGE( Boost REQUIRED )
INCLUDE_DIRECTORIES( SYSTEM ${Boost_INCLUDE_DIRS} )

FIND_PACKAGE( Armadillo REQUIRED )
INCLUDE_DIRECTORIES( SYSTEM ${ARMADILLO_INCLUDE_DIRS} )

# doc
IF( INSTALL_DOC AND EXISTS "${PROJECT_SOURCE_DIR}/doc/CMakeLists.txt" )
ADD_SUBDIRECTORY( ./doc )
ELSE()
Expand All @@ -117,10 +161,14 @@ ENDIF()
### LIBRARY #################################################################

# add library
<<<<<<< HEAD
ADD_LIBRARY( ${PROJECT_NAME} SHARED ${ArborContent_SRCS} ${ArborContent_INCS})
=======
ADD_LIBRARY( ${PROJECT_NAME} SHARED ${APRILContent_SRCS} ${APRILContent_INCS})
>>>>>>> newDev
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_SOVERSION})

IF( ARBOR_PARALLEL )
IF( APRIL_PARALLEL )
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} gomp )
ENDIF()

Expand All @@ -132,6 +180,7 @@ INSTALL( TARGETS ${PROJECT_NAME} DESTINATION lib COMPONENT Runtime )

# install header files
INSTALL( DIRECTORY include/ DESTINATION include )
INSTALL( FILES "ChangeLog.txt" DESTINATION "${PROJECT_SOURCE_DIR}/docs" OPTIONAL )

# display some variables and write them to cache
PANDORA_DISPLAY_STD_VARIABLES()
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
69 changes: 69 additions & 0 deletions cmake/APRILContentConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
##############################################################################
# cmake configuration file for APRILContent
#
# requires:
# MacroCheckPackageLibs.cmake for checking package libraries
#
# returns following variables:
#
# APRILContent_FOUND : set to TRUE if APRILContent found
# if FIND_PACKAGE called with REQUIRED and COMPONENTS arguments
# APRILContent_FOUND is only set to TRUE if ALL components are also found
# if REQUIRED is NOT set components may or may not be available
#
# APRILContent_ROOT : path to this APRILContent installation
# APRILContent_VERSION : package version
# APRILContent_LIBRARIES : list of APRILContent libraries (NOT including COMPONENTS)
# APRILContent_INCLUDE_DIRS : list of paths to be used with INCLUDE_DIRECTORIES
# APRILContent_LIBRARY_DIRS : list of paths to be used with LINK_DIRECTORIES
# APRILContent_COMPONENT_LIBRARIES : list of APRILContent component libraries
# APRILContent_${COMPONENT}_FOUND : set to TRUE or FALSE for each library
# APRILContent_${COMPONENT}_LIBRARY : path to individual libraries
# APRILContent_${COMPONENT}_LIB_DEPENDS : individual library dependencies
#
# @author Jan Engels, Desy
##############################################################################

SET( APRILContent_ROOT "@CMAKE_INSTALL_PREFIX@" )
SET( APRILContent_VERSION "@APRILContent_VERSION@" )


# ---------- include dirs -----------------------------------------------------
# do not store find results in cache
SET( APRILContent_INCLUDE_DIRS APRILContent_INCLUDE_DIRS-NOTFOUND )
MARK_AS_ADVANCED( APRILContent_INCLUDE_DIRS )

FIND_PATH( APRILContent_INCLUDE_DIRS
NAMES APRILClustering/ClusteringParentAlgorithm.h
PATHS ${APRILContent_ROOT}/include
NO_DEFAULT_PATH
)



# ---------- libraries --------------------------------------------------------
INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageLibs.cmake" )

# only standard libraries should be passed as arguments to CHECK_PACKAGE_LIBS
# additional components are set by cmake in variable PKG_FIND_COMPONENTS
# first argument should be the package name
CHECK_PACKAGE_LIBS( APRILContent APRILContent )




# ---------- libraries dependencies -------------------------------------------
# this sets APRILContent_${COMPONENT}_LIB_DEPENDS variables
INCLUDE( "${APRILContent_ROOT}/lib/cmake/APRILContentLibDeps.cmake" )




# ---------- final checking ---------------------------------------------------
INCLUDE( FindPackageHandleStandardArgs )
# set APRILContent_FOUND to TRUE if all listed variables are TRUE and not empty
# APRILContent_COMPONENT_VARIABLES will be set if FIND_PACKAGE is called with REQUIRED argument
FIND_PACKAGE_HANDLE_STANDARD_ARGS( APRILContent DEFAULT_MSG APRILContent_ROOT APRILContent_INCLUDE_DIRS APRILContent_LIBRARIES ${APRILContent_COMPONENT_VARIABLES} )

SET( APRILContent_FOUND ${APRILContent_FOUND} )

Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
##############################################################################


SET( ${PACKAGE_FIND_NAME}_VERSION_MAJOR @ArborContent_VERSION_MAJOR@ )
SET( ${PACKAGE_FIND_NAME}_VERSION_MINOR @ArborContent_VERSION_MINOR@ )
SET( ${PACKAGE_FIND_NAME}_VERSION_PATCH @ArborContent_VERSION_PATCH@ )
SET( ${PACKAGE_FIND_NAME}_VERSION_MAJOR @APRILContent_VERSION_MAJOR@ )
SET( ${PACKAGE_FIND_NAME}_VERSION_MINOR @APRILContent_VERSION_MINOR@ )
SET( ${PACKAGE_FIND_NAME}_VERSION_PATCH @APRILContent_VERSION_PATCH@ )


INCLUDE( "@PANDORA_CMAKE_MODULES_PATH@/MacroCheckPackageVersion.cmake" )
CHECK_PACKAGE_VERSION( ${PACKAGE_FIND_NAME} @ArborContent_VERSION@ )
CHECK_PACKAGE_VERSION( ${PACKAGE_FIND_NAME} @APRILContent_VERSION@ )

69 changes: 0 additions & 69 deletions cmake/ArborContentConfig.cmake.in

This file was deleted.

18 changes: 18 additions & 0 deletions cmake/Findmlpack.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
IF(NOT DEFINED mlpack_DIR)
MESSAGE(STATUS "Warning: it is mandorary to define mlpack_DIR.")
ENDIF()

IF (NOT DEFINED mlpack_INCLUDE_DIRS)
SET(mlpack_INCLUDE_DIRS ${mlpack_DIR}/include)
ENDIF()

# Check mlpack core header file
FIND_PATH(mlpack_CORE_HPP_DIR NAMES core.hpp HINTS ${mlpack_INCLUDE_DIRS}/mlpack)

# Check mlpack library
FIND_LIBRARY(mlpack_LIBRARIES NAMES mlpack HINTS ${mlpack_DIR}/*)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(mlpack DEFAULT_MSG mlpack_CORE_HPP_DIR mlpack_LIBRARIES)

IF(NOT mlpack_FOUND)
MESSAGE(FATAL_ERROR "The mlpack package not found.")
ENDIF()
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################
# cmake file for building ArborContent documentation
# cmake file for building APRILContent documentation
# @author rete , IPNL / CNRS
########################################################

Expand Down
Loading

0 comments on commit 03a5f48

Please sign in to comment.