Skip to content
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

only fetch acts and compile it if not found in image #1649

Merged
merged 4 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "docs/doxygen.conf/doxygen-awesome-css"]
path = docs/doxygen.conf/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css
[submodule "Tracking/acts"]
path = Tracking/acts
url = https://github.com/acts-project/acts
[submodule "Trigger/ruckus"]
path = Trigger/ruckus
url = https://github.com/slaclab/ruckus
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ list(APPEND CMAKE_MODULE_PATH ${LDMX_SW_SOURCE_DIR}/cmake/)
# is set to NOTFOUND.
include(BuildMacros RESULT_VARIABLE build_macros_found)

# Adding ROOT, ACTS, HLS arb prec as "SYSTEM"
# Adding ROOT as "SYSTEM"
# which will silence compiler warnings from these 3rd party softwares
include_directories(SYSTEM /usr/local/include/root)
include_directories(SYSTEM Tracking/acts/Core/include)

# FunctionalCoreTest.cxx doesnt comply with clang-tidy but that's ok
set_source_files_properties(Framework/test/FunctionalCoreTest.cxx PROPERTIES COMPILE_OPTIONS "-Wno-null-dereference")
Expand Down
30 changes: 20 additions & 10 deletions Tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,30 @@ if(BUILD_EVENT_ONLY)
return()
endif()

# since ACTS changes frequently enough, we build it as a submodule of Tracking
# here we could 'set' some CMake variables that we would have passed to 'cmake' on
# the command line with '-D' if we were building ACTS directly.
# for example, disable the building of examples (which is already disabled by default)
#set(ACTS_BUILD_EXAMPLES OFF) # don't waste time building examples
add_subdirectory(acts) # now build acts
# luckily for us, adding ACTS as a subdirectory produces the same CMake targets
# as find_package, so we don't need to do anything else from here on out

find_package(Eigen3 CONFIG REQUIRED)
# if you want to try an alternate Acts, you can
# 1. comment out the stuff here and replace with add_subdirectory(acts)
# 2. git clone acts into this directory and choose your version
find_package(Acts QUIET)
if (NOT Acts_FOUND)
message(STATUS "Did not find Acts, downloading and compiling it here")
include(FetchContent)
FetchContent_Declare(
Acts
URL https://github.com/acts-project/acts/archive/refs/tags/v36.0.0.tar.gz
URL_HASH MD5=f543dd8ba030bea2e4ee2f1b07dbe7c0
)
FetchContent_MakeAvailable(Acts)
FetchContent_GetProperties(Acts)
# Adding Acts as "SYSTEM"
# which will silence compiler warnings from these 3rd party softwares
include_directories(SYSTEM "${Acts_SOURCE_DIR}/Core/include")
else()
message(STATUS "Found Acts ${Acts_VERSION}")
endif()

setup_geant4_target()


file(GLOB SRC_FILES CONFIGURE_DEPENDS
${PROJECT_SOURCE_DIR}/src/Tracking/Sim/[a-zA-z]*.cxx
${PROJECT_SOURCE_DIR}/src/Tracking/Reco/[a-zA-z]*.cxx
Expand Down
1 change: 0 additions & 1 deletion Tracking/acts
Submodule acts deleted from 6eca77
2 changes: 1 addition & 1 deletion cmake/BuildMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function(message)
list(REMOVE_AT ARGV 0)
_message("${green}[ INFO ]: ${ARGV}${color_reset}")
else()
_message("${green} ${ARGV} ${color_reset}")
_message(${ARGV})
endif()
endfunction()

Expand Down
Loading