From 2412e4c21881f09b8dd86dff64f139ddb54b8b7c Mon Sep 17 00:00:00 2001 From: juanan Date: Thu, 27 Oct 2022 21:12:42 +0200 Subject: [PATCH 1/3] Added new submodule restDAQ --- .gitmodules | 3 +++ source/packages/restDAQ | 1 + 2 files changed, 4 insertions(+) create mode 160000 source/packages/restDAQ diff --git a/.gitmodules b/.gitmodules index efbf34c44..519b947cd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,3 +52,6 @@ [submodule "projects/basic-examples"] path = projects/basic-examples url = https://github.com/rest-for-physics/basic-examples.git +[submodule "source/packages/restDAQ"] + path = source/packages/restDAQ + url = https://github.com/rest-for-physics/restDAQ.git 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 From 7af2fccdeaf7c0a2fd9a5f5f40d624d9f286f679 Mon Sep 17 00:00:00 2001 From: juanan Date: Fri, 28 Oct 2022 10:34:32 +0200 Subject: [PATCH 2/3] Adding internal restDAQ and rawlib compilation dependency, now the submodules to be compiled are printed out after internal dependencies --- source/CMakeLists.txt | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 6c0a48a8d..1fd16db81 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -35,7 +35,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}") @@ -52,14 +52,13 @@ foreach (dir ${dirs}) set(${option} OFF) endif () endif () - message("Submodule found: ${fullname}. Option: ${option}=${${option}}") else () set(${option} OFF) - message("Empty submodule dir: ${fullname}. Option: ${option}=${${option}}") endif () endforeach () endforeach () +# Add internal submodule dependencies if (${REST_G4} MATCHES ON) set(RESTLIB_GEANT4 ON) endif () @@ -70,6 +69,28 @@ 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}") From 8206dc0bc155c865648ded3252ba8fc2b7e96d23 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 17:20:12 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .gitmodules | 2 +- source/CMakeLists.txt | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index f8431fd23..435d27bd9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -57,4 +57,4 @@ 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 \ No newline at end of file + url = https://github.com/rest-for-physics/restDAQ.git diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 795dd4ca7..b83703356 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -73,7 +73,7 @@ if (${RESTLIB_DETECTOR} MATCHES ON) endif () endif () -if( ${REST_DAQ} MATCHES ON ) +if (${REST_DAQ} MATCHES ON) if (${RESTLIB_RAW} MATCHES OFF) set(RESTLIB_RAW ON) endif () @@ -81,16 +81,19 @@ endif () # Print all the submodules to compile after internal dependencies foreach (dir ${dirs}) - SUBDIRLIST(subdirs "${CMAKE_CURRENT_SOURCE_DIR}/${dir}") + subdirlist(subdirs "${CMAKE_CURRENT_SOURCE_DIR}/${dir}") foreach (subdir ${subdirs}) set(fullname "${dir}/${subdir}") - DIRNAME2OPTION(option ${fullname}) + dirname2option(option ${fullname}) file(GLOB ff "*/${subdir}/CMakeLists.txt") if (ff) - message("Submodule found: ${fullname}. Option: ${option}=${${option}}") + message( + "Submodule found: ${fullname}. Option: ${option}=${${option}}") else () - message("Empty submodule dir: ${fullname}. Option: ${option}=${${option}}") + message( + "Empty submodule dir: ${fullname}. Option: ${option}=${${option}}" + ) endif () endforeach () endforeach ()