Skip to content
Snippets Groups Projects
Commit ea2b4173 authored by liblhcb's avatar liblhcb
Browse files

Added cached variables for SRCS_REPOSITORY and GEANT4_TAG

Added cached variables for SRCS_REPOSITORY and GEANT4_TAG

As requested during the meeting.

Fixes LHCBGAUSS-590

Merge branch 'LBCORE-1009' of ssh://gitlab.cern.ch:7999/bcouturi/Geant4

* 'LBCORE-1009' of ssh://gitlab.cern.ch:7999/bcouturi/Geant4:
  Added cached variables for SRCS_REPOSITORY and GEANT4_TAG

See merge request !3


git-svn-id: svn+ssh://svn.cern.ch/reps/lhcb/Geant4/trunk@199081 4525493e-7705-40b1-a816-d608a930855b
parents e233aa9b ff778085
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5)
# NO_NINJA : Geant4 build fails with Ninja
set(GEANT4_SRCS_REPOSITORY https://gitlab.cern.ch/lhcb/Geant4-srcs.git CACHE STRING "Repository for Geant4 sources")
find_package(GaudiProject)
gaudi_project(Geant4 v96r4p3
DATA Geant4Files VERSION v96r*)
......
......@@ -21,29 +21,32 @@ else()
set(G4DATA ../share)
endif()
if(DEFINED ENV{G4_NATIVE_VERSION})
set(Geant4_tag $ENV{G4_NATIVE_VERSION})
if(NOT Geant4_tag MATCHES "^4\\.")
# G4_NATIVE_VERSION might not contain the initial '4.' that we need
# see https://its.cern.ch/jira/browse/LHCBGAUSS-43
set(Geant4_tag 4.${Geant4_tag})
if (NOT GEANT4_TAG)
if(DEFINED ENV{G4_NATIVE_VERSION})
set(GEANT4_TAG $ENV{G4_NATIVE_VERSION})
if(NOT GEANT4_TAG MATCHES "^4\\.")
# G4_NATIVE_VERSION might not contain the initial '4.' that we need
# see https://its.cern.ch/jira/browse/LHCBGAUSS-43
set(GEANT4_TAG 4.${GEANT4_TAG})
endif()
if(NOT GEANT4_TAG MATCHES "^geant")
set(GEANT4_TAG geant${GEANT4_TAG})
endif()
else()
set(GEANT4_TAG ${CMAKE_PROJECT_VERSION})
endif()
if(NOT Geant4_tag MATCHES "^geant")
set(Geant4_tag geant${Geant4_tag})
# Special mapping of version HEAD
if(GEANT4_TAG STREQUAL "HEAD")
set(GEANT4_TAG master)
endif()
else()
set(Geant4_tag ${CMAKE_PROJECT_VERSION})
endif()
# Special mapping of version HEAD
if(Geant4_tag STREQUAL "HEAD")
set(Geant4_tag master)
set(GEANT4_TAG ${GEANT4_TAG} CACHE STRING "Tag of Geant4 to get from the Geant4-srcs repository")
endif()
include(ExternalProject)
ExternalProject_Add(Geant4
GIT_REPOSITORY https://gitlab.cern.ch/lhcb/Geant4-srcs.git
GIT_TAG ${Geant4_tag}
GIT_REPOSITORY ${GEANT4_SRCS_REPOSITORY}
GIT_TAG ${GEANT4_TAG}
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/toolchain.cmake
-DGEANT4_BUILD_CXXSTD=${GAUDI_CXX_STANDARD}
-DGEANT4_INSTALL_DATA=OFF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment