diff --git a/.gitmodules b/.gitmodules index da5b1e158..435d27bd9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index a238382ec..44d21e991 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -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}") @@ -64,6 +64,7 @@ foreach (dir ${dirs}) endforeach () endforeach () +# Add internal submodule dependencies if (${REST_G4} MATCHES ON) set(RESTLIB_GEANT4 ON) endif () @@ -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}") diff --git a/source/packages/restDAQ b/source/packages/restDAQ new file mode 160000 index 000000000..275abe691 --- /dev/null +++ b/source/packages/restDAQ @@ -0,0 +1 @@ +Subproject commit 275abe6916712d0cef79313942787af42609d7fa