Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ SET( ${PROJECT_NAME}_VERSION_PATCH 0 )

SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" )

include(cmake/MaybeBuildActs.cmake)

find_package(EDM4HEP REQUIRED)
find_package(k4FWCore REQUIRED)
find_package(Acts REQUIRED COMPONENTS Core PluginDD4hep)
Expand Down
24 changes: 24 additions & 0 deletions cmake/MaybeBuildActs.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# The setup below allows optionally building ACTS directly with the k4ActsTracking build.
# This avoids having to run separate build and install steps, and also allows getting a
# combined compilation database out.
if(IS_DIRECTORY ${ACTS_SOURCE_DIR})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who sets ACTS_SOURCE_DIR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user!

message(STATUS "Using ACTS from: ${ACTS_SOURCE_DIR}")

include(FetchContent)

# Build configuration needed for k4ActsTracking.
set(ACTS_USE_SYSTEM_NLOHMANN_JSON ON CACHE BOOL "Use system json")
set(ACTS_BUILD_PLUGIN_JSON ON CACHE BOOL "Build json plugin")
set(ACTS_BUILD_PLUGIN_ROOT ON CACHE BOOL "Build root plugin")
set(ACTS_BUILD_PLUGIN_DD4HEP ON CACHE BOOL "Build dd4hep plugin")


set(FETCHCONTENT_SOURCE_DIR_ACTS "${ACTS_SOURCE_DIR}" CACHE PATH "")

# This makes `find_package(Acts)` transparently defer to `FetchContent`
# to being the ACTS build in.
FetchContent_Declare(Acts
SYSTEM
OVERRIDE_FIND_PACKAGE
)
endif()
Loading