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

Added new submodule restDAQ #322

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft
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: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@
[submodule "source/libraries/wimp"]
path = source/libraries/wimp
url = https://github.com/rest-for-physics/wimplib.git
[submodule "source/packages/restDAQ"]
path = source/packages/restDAQ
url = https://github.com/rest-for-physics/restDAQ.git
28 changes: 27 additions & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ foreach (subdir ${subdirs})
set("${libname}_COMPILED" "FALSE")
endforeach ()

# loop all the dirs and set the option
# loop all the dirs and set the option ON or OFF
set(dirs "libraries" "packages")
foreach (dir ${dirs})
subdirlist(subdirs "${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
Expand Down Expand Up @@ -64,6 +64,7 @@ foreach (dir ${dirs})
endforeach ()
endforeach ()

# Add internal submodule dependencies
if (${REST_G4} MATCHES ON)
set(RESTLIB_GEANT4 ON)
endif ()
Expand All @@ -74,6 +75,31 @@ if (${RESTLIB_DETECTOR} MATCHES ON)
endif ()
endif ()

if (${REST_DAQ} MATCHES ON)
if (${RESTLIB_RAW} MATCHES OFF)
set(RESTLIB_RAW ON)
endif ()
endif ()

# Print all the submodules to compile after internal dependencies
foreach (dir ${dirs})
subdirlist(subdirs "${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
foreach (subdir ${subdirs})
set(fullname "${dir}/${subdir}")
dirname2option(option ${fullname})

file(GLOB ff "*/${subdir}/CMakeLists.txt")
if (ff)
message(
"Submodule found: ${fullname}. Option: ${option}=${${option}}")
else ()
message(
"Empty submodule dir: ${fullname}. Option: ${option}=${${option}}"
)
endif ()
endforeach ()
endforeach ()

# loop all the dirs and compile if option is ON
foreach (dir ${dirs})
subdirlist(subdirs "${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
Expand Down
1 change: 1 addition & 0 deletions source/packages/restDAQ
Submodule restDAQ added at 275abe
Loading