From aa2fff97c05778222b8363861ae3a3d9a65c9ded Mon Sep 17 00:00:00 2001
From: Adrien Matta <matta@lpccaen.in2p3.fr>
Date: Fri, 25 Feb 2022 15:16:43 +0100
Subject: [PATCH] * Fixing NPTOOL_DETLIST issue in NPSimulation

---
 NPSimulation/CMakeLists.txt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/NPSimulation/CMakeLists.txt b/NPSimulation/CMakeLists.txt
index 1d7720b52..4c27d1532 100644
--- a/NPSimulation/CMakeLists.txt
+++ b/NPSimulation/CMakeLists.txt
@@ -45,13 +45,13 @@ add_definitions(${Geant4_DEFINITIONS})
 configure_file(Core/NPSimulationVersion.hh.in Core/NPSimulationVersion.hh @ONLY) 
 
  # Detector List
-set(DETLIST ${NPLib_DETECTOR_LIST})
+set(NPTOOL_DETLIST ${NPLib_DETECTOR_LIST})
 
-string(COMPARE EQUAL "${DETLIST}" "" rdet)
+string(COMPARE EQUAL "${NPTOOL_DETLIST}" "" rdet)
 if(rdet)
     message("Building all detectors")
   else()
-    message("Building the following detectors ${DETLIST}") 
+    message("Building the following detectors ${NPTOOL_DETLIST}") 
 endif()
 
 # Add root to the link and include directories
@@ -84,10 +84,10 @@ MACRO(subdirlist result curdir)
       string(REPLACE "Detectors/" "" det ${child})
 
       IF(NOT r0 AND NOT r1)
-        string(COMPARE EQUAL "${DETLIST}" "" r2)
+        string(COMPARE EQUAL "${NPTOOL_DETLIST}" "" r2)
         IF(r2)
           LIST(APPEND dirlist ${child})
-        ELSEIF(${DETLIST} MATCHES ".*${det}.*" )
+        ELSEIF(${NPTOOL_DETLIST} MATCHES ".*${det}.*" )
           LIST(APPEND dirlist ${child}) 
         ENDIF()
       ENDIF()
-- 
GitLab