-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add possibility to include SDHCalContent and AprilContent #26
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build/ | ||
lib/ |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -41,15 +41,44 @@ FIND_PACKAGE( DD4hep REQUIRED ) | |||||
FIND_PACKAGE( ROOT REQUIRED ) | ||||||
FIND_PACKAGE( MarlinTrk REQUIRED ) | ||||||
|
||||||
OPTION( USE_SDHCALCONTENT "Use SDHCALContent" OFF ) | ||||||
OPTION( USE_APRILCONTENT "Use APRILContent" OFF ) | ||||||
|
||||||
FOREACH( pkg PandoraSDK Marlin MarlinUtil LCContent DD4hep ROOT MarlinTrk ) | ||||||
FOREACH( pkg PandoraSDK Marlin MarlinUtil LCContent DD4hep ROOT MarlinTrk ) | ||||||
IF( ${pkg}_FOUND ) | ||||||
INCLUDE_DIRECTORIES( SYSTEM ${${pkg}_INCLUDE_DIRS} ) | ||||||
LINK_LIBRARIES( ${${pkg}_LIBRARIES} ) | ||||||
ADD_DEFINITIONS ( ${${pkg}_DEFINITIONS} ) | ||||||
ENDIF() | ||||||
ENDFOREACH() | ||||||
|
||||||
IF( USE_SDHCALCONTENT ) | ||||||
FIND_PACKAGE( SDHCALContent REQUIRED ) | ||||||
IF( SDHCALContent_FOUND ) | ||||||
INCLUDE_DIRECTORIES( SYSTEM ${SDHCALContent_INCLUDE_DIRS} ) | ||||||
LINK_LIBRARIES( ${SDHCALContent_LIBRARIES} ) | ||||||
ADD_DEFINITIONS ( ${SDHCALContent_DEFINITIONS} ) | ||||||
ADD_DEFINITIONS( "-DSDHCALCONTENT" ) | ||||||
ENDIF() | ||||||
ENDIF() | ||||||
|
||||||
IF( USE_APRILCONTENT ) | ||||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | ||||||
FIND_PACKAGE( APRILContent REQUIRED ) | ||||||
FIND_PACKAGE( mlpack REQUIRED ) | ||||||
IF( APRILContent_FOUND ) | ||||||
INCLUDE_DIRECTORIES( SYSTEM ${APRILContent_INCLUDE_DIRS} ) | ||||||
LINK_LIBRARIES( ${APRILContent_LIBRARIES} ) | ||||||
ADD_DEFINITIONS ( ${APRILContent_DEFINITIONS} ) | ||||||
ADD_DEFINITIONS( "-DAPRILCONTENT" ) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
ENDIF() | ||||||
IF( mlpack_FOUND ) | ||||||
INCLUDE_DIRECTORIES( SYSTEM ${mlpack_INCLUDE_DIRS} ) | ||||||
LINK_LIBRARIES( ${mlpack_LIBRARIES} ) | ||||||
ADD_DEFINITIONS ( ${mlpack_DEFINITIONS} ) | ||||||
ENDIF() | ||||||
ENDIF() | ||||||
|
||||||
IF( PANDORA_MONITORING ) | ||||||
FIND_PACKAGE( PandoraMonitoring 03.00.00 REQUIRED ) | ||||||
IF( PandoraMonitoring_FOUND ) | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,18 @@ | ||||||||
IF(NOT DEFINED mlpack_DIR) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mlpack should come with a cmake config file, so this findmlpack should not be needed |
||||||||
MESSAGE(STATUS "Warning: it is mandorary to define mlpack_DIR.") | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
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) | ||||||||
|
||||||||
IF(NOT mlpack_FOUND) | ||||||||
MESSAGE(FATAL_ERROR "The mlpack package not found.") | ||||||||
ENDIF() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cmake will add the -D where necessary