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
Branches master
No related tags found
No related merge requests found
...@@ -2,6 +2,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5) ...@@ -2,6 +2,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5)
# NO_NINJA : Geant4 build fails with Ninja # 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) find_package(GaudiProject)
gaudi_project(Geant4 v96r4p3 gaudi_project(Geant4 v96r4p3
DATA Geant4Files VERSION v96r*) DATA Geant4Files VERSION v96r*)
......
...@@ -21,29 +21,32 @@ else() ...@@ -21,29 +21,32 @@ else()
set(G4DATA ../share) set(G4DATA ../share)
endif() endif()
if(DEFINED ENV{G4_NATIVE_VERSION}) if (NOT GEANT4_TAG)
set(Geant4_tag $ENV{G4_NATIVE_VERSION}) if(DEFINED ENV{G4_NATIVE_VERSION})
if(NOT Geant4_tag MATCHES "^4\\.") set(GEANT4_TAG $ENV{G4_NATIVE_VERSION})
# G4_NATIVE_VERSION might not contain the initial '4.' that we need if(NOT GEANT4_TAG MATCHES "^4\\.")
# see https://its.cern.ch/jira/browse/LHCBGAUSS-43 # G4_NATIVE_VERSION might not contain the initial '4.' that we need
set(Geant4_tag 4.${Geant4_tag}) # 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() endif()
if(NOT Geant4_tag MATCHES "^geant") # Special mapping of version HEAD
set(Geant4_tag geant${Geant4_tag}) if(GEANT4_TAG STREQUAL "HEAD")
set(GEANT4_TAG master)
endif() endif()
else() set(GEANT4_TAG ${GEANT4_TAG} CACHE STRING "Tag of Geant4 to get from the Geant4-srcs repository")
set(Geant4_tag ${CMAKE_PROJECT_VERSION})
endif()
# Special mapping of version HEAD
if(Geant4_tag STREQUAL "HEAD")
set(Geant4_tag master)
endif() endif()
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(Geant4 ExternalProject_Add(Geant4
GIT_REPOSITORY https://gitlab.cern.ch/lhcb/Geant4-srcs.git GIT_REPOSITORY ${GEANT4_SRCS_REPOSITORY}
GIT_TAG ${Geant4_tag} GIT_TAG ${GEANT4_TAG}
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/toolchain.cmake CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/toolchain.cmake
-DGEANT4_BUILD_CXXSTD=${GAUDI_CXX_STANDARD} -DGEANT4_BUILD_CXXSTD=${GAUDI_CXX_STANDARD}
-DGEANT4_INSTALL_DATA=OFF -DGEANT4_INSTALL_DATA=OFF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment