Skip to content
Snippets Groups Projects
Commit 9e02f5bb authored by Marilena Bandieramonte's avatar Marilena Bandieramonte
Browse files

Merge branch 'removeCLHEP-dep' into 'master'

Remove clhep dependency

See merge request !3
parents c5da987f 2276d359
Branches
Tags
1 merge request!3Remove clhep dependency
Pipeline #1710797 passed with warnings
stages: stages:
- deps-geomodelcore - deps-geomodelcore
- deps-CLHEP
- deps-xerces-c - deps-xerces-c
- deps-Geant4 - deps-Geant4
- build - build
...@@ -21,7 +20,7 @@ variables: ...@@ -21,7 +20,7 @@ variables:
- export PATH="/usr/local/opt/qt/bin:$PATH" # to make Qt5 discoverable by CMake - export PATH="/usr/local/opt/qt/bin:$PATH" # to make Qt5 discoverable by CMake
.ubuntu-template-job: &ubuntu-job .ubuntu-template-job: &ubuntu-job
image: gitlab-registry.cern.ch/mbandier/geant4-ubuntu/base-image:latest image: gitlab-registry.cern.ch/mbandier/geant4-ubuntu/base-image:1.1
tags: tags:
- docker - docker
before_script: before_script:
...@@ -37,26 +36,7 @@ variables: ...@@ -37,26 +36,7 @@ variables:
- mkdir geomodelcore-build - mkdir geomodelcore-build
- cd geomodelcore-build - cd geomodelcore-build
- cmake ${CMAKE_ARGS} ../GeoModelCore - cmake ${CMAKE_ARGS} ../GeoModelCore
- make -j32 - make -j4
- make install
artifacts:
paths:
- install
.CLHEP-build-template-job: &CLHEP-job
stage: deps-CLHEP
variables:
CMAKE_ARGS: ${CMAKE_BASE_ARGS}
script:
- pwd; ls
- git clone https://gitlab.cern.ch/CLHEP/CLHEP.git
- cd CLHEP
- git checkout CLHEP_2_4_1_0
- cd ../
- mkdir CLHEP-build
- cd CLHEP-build
- cmake ${CMAKE_ARGS} ../CLHEP
- make -j32
- make install - make install
artifacts: artifacts:
paths: paths:
...@@ -73,7 +53,7 @@ variables: ...@@ -73,7 +53,7 @@ variables:
- mkdir xerces-c-build - mkdir xerces-c-build
- cd xerces-c-build - cd xerces-c-build
- cmake ${CMAKE_ARGS} ../xerces-c-3.2.2 - cmake ${CMAKE_ARGS} ../xerces-c-3.2.2
- make -j32 - make -j4
- make install - make install
artifacts: artifacts:
paths: paths:
...@@ -93,7 +73,7 @@ variables: ...@@ -93,7 +73,7 @@ variables:
- mkdir Geant4-build - mkdir Geant4-build
- cd Geant4-build - cd Geant4-build
- cmake ${CMAKE_ARGS} -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DGEANT4_BUILD_MULTITHREADED=ON -DXERCESC_ROOT_DIR=../install/xerces-c/ ../geant4 - cmake ${CMAKE_ARGS} -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DGEANT4_BUILD_MULTITHREADED=ON -DXERCESC_ROOT_DIR=../install/xerces-c/ ../geant4
- make -j32 - make -j4
- make install - make install
artifacts: artifacts:
paths: paths:
...@@ -105,11 +85,10 @@ variables: ...@@ -105,11 +85,10 @@ variables:
CMAKE_ARGS: ${CMAKE_BASE_ARGS} CMAKE_ARGS: ${CMAKE_BASE_ARGS}
script: script:
- pwd; ls - pwd; ls
- git clone https://gitlab.cern.ch/GeoModelDev/GeoModelG4.git - mkdir build
- mkdir GeoModelG4-build - cd build
- cd GeoModelG4-build - cmake ${CMAKE_ARGS} ..
- cmake ${CMAKE_ARGS} ../GeoModelG4 - make -j4
- make -j32
- make install - make install
artifacts: artifacts:
paths: paths:
...@@ -122,10 +101,6 @@ geomodelcore-mac: ...@@ -122,10 +101,6 @@ geomodelcore-mac:
<<: *macos-job <<: *macos-job
<<: *geomodelcore-job <<: *geomodelcore-job
CLHEP-mac:
<<: *macos-job
<<: *CLHEP-job
xerces-c-mac: xerces-c-mac:
<<: *macos-job <<: *macos-job
<<: *xerces-c-job <<: *xerces-c-job
...@@ -133,12 +108,12 @@ xerces-c-mac: ...@@ -133,12 +108,12 @@ xerces-c-mac:
Geant4-mac: Geant4-mac:
<<: *macos-job <<: *macos-job
<<: *Geant4-job <<: *Geant4-job
needs: ["CLHEP-mac", "xerces-c-mac"] needs: ["xerces-c-mac"]
geomodelg4-mac: geomodelg4-mac:
<<: *macos-job <<: *macos-job
<<: *geomodelg4-job <<: *geomodelg4-job
needs: ["geomodelcore-mac", "CLHEP-mac", "Geant4-mac"] needs: ["geomodelcore-mac", "Geant4-mac"]
### UBUNTU PATH ### UBUNTU PATH
...@@ -146,10 +121,6 @@ geomodelcore-ubuntu: ...@@ -146,10 +121,6 @@ geomodelcore-ubuntu:
<<: *ubuntu-job <<: *ubuntu-job
<<: *geomodelcore-job <<: *geomodelcore-job
#CLHEP-ubuntu:
# <<: *ubuntu-job
# <<: *CLHEP-job
#geomodelio-ubuntu: #geomodelio-ubuntu:
# <<: *ubuntu-job # <<: *ubuntu-job
# <<: *geomodelio-job # <<: *geomodelio-job
...@@ -162,7 +133,7 @@ geomodelcore-ubuntu: ...@@ -162,7 +133,7 @@ geomodelcore-ubuntu:
# Geant4-ubuntu: # Geant4-ubuntu:
# <<: *ubuntu-job # <<: *ubuntu-job
# <<: *Geant4-job # <<: *Geant4-job
# needs: ["CLHEP-ubuntu", "xerces-c-ubuntu"] # needs: ["xerces-c-ubuntu"]
geomodelg4-ubuntu: geomodelg4-ubuntu:
<<: *ubuntu-job <<: *ubuntu-job
......
...@@ -9,7 +9,7 @@ project( "GeoModel2G4" VERSION 1.0.0 LANGUAGES CXX ) ...@@ -9,7 +9,7 @@ project( "GeoModel2G4" VERSION 1.0.0 LANGUAGES CXX )
# External dependencies: # External dependencies:
find_package( Geant4 REQUIRED ) find_package( Geant4 REQUIRED )
find_package( CLHEP )
# GeoModel dependencies # GeoModel dependencies
find_package( GeoModelCore 3.2.0 REQUIRED ) find_package( GeoModelCore 3.2.0 REQUIRED )
...@@ -44,8 +44,8 @@ include(${Geant4_USE_FILE}) ...@@ -44,8 +44,8 @@ include(${Geant4_USE_FILE})
add_library( GeoModel2G4 SHARED ${HEADERS} ${SOURCES} ) add_library( GeoModel2G4 SHARED ${HEADERS} ${SOURCES} )
target_link_libraries( GeoModel2G4 target_link_libraries( GeoModel2G4
PUBLIC ${GEANT4_LIBRARIES} PUBLIC ${GEANT4_LIBRARIES}
PRIVATE ${CLHEP_LIBRARIES} GeoMaterial2G4 GeoSpecialShapes) PRIVATE GeoMaterial2G4 GeoSpecialShapes)
target_include_directories( GeoModel2G4 SYSTEM PUBLIC ${GEANT4_INCLUDE_DIRS} PRIVATE ${CLHEP_INCLUDE_DIRS} ${GeoModelCore_INCLUDE_DIRS} ) target_include_directories( GeoModel2G4 SYSTEM PUBLIC ${GEANT4_INCLUDE_DIRS} PRIVATE ${GeoModelCore_INCLUDE_DIRS} )
target_include_directories( GeoModel2G4 PUBLIC target_include_directories( GeoModel2G4 PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include> ) $<INSTALL_INTERFACE:include> )
......
...@@ -5,12 +5,15 @@ ...@@ -5,12 +5,15 @@
# Package: GeoSpecialShapes # Package: GeoSpecialShapes
################################################################################ ################################################################################
find_package(CLHEP) find_package( Geant4 REQUIRED )
find_package(GeoModelCore 3.2.0 REQUIRED) find_package(GeoModelCore 3.2.0 REQUIRED)
# Use the GNU install directory names. # Use the GNU install directory names.
include( GNUInstallDirs ) # it defines CMAKE_INSTALL_LIBDIR include( GNUInstallDirs ) # it defines CMAKE_INSTALL_LIBDIR
# include Geant4 headers
include(${Geant4_USE_FILE})
# Find the header and source files. # Find the header and source files.
file( GLOB SOURCES src/*.cxx src/LArWheelCalculator_Impl/*.cxx ) file( GLOB SOURCES src/*.cxx src/LArWheelCalculator_Impl/*.cxx )
file( GLOB HEADERS GeoSpecialShapes/*.h src/LArWheelCalculator_Impl/*.h) file( GLOB HEADERS GeoSpecialShapes/*.h src/LArWheelCalculator_Impl/*.h)
...@@ -18,10 +21,10 @@ file( GLOB HEADERS GeoSpecialShapes/*.h src/LArWheelCalculator_Impl/*.h) ...@@ -18,10 +21,10 @@ file( GLOB HEADERS GeoSpecialShapes/*.h src/LArWheelCalculator_Impl/*.h)
# Set the library. # Set the library.
add_library( GeoSpecialShapes SHARED ${HEADERS} ${SOURCES} ) add_library( GeoSpecialShapes SHARED ${HEADERS} ${SOURCES} )
target_link_libraries( GeoSpecialShapes PUBLIC target_link_libraries( GeoSpecialShapes PUBLIC
PRIVATE GeoModelCore::GeoModelKernel ${CLHEP_LIBRARIES} ) PRIVATE GeoModelCore::GeoModelKernel ${Geant4_LIBRARIES})
target_include_directories( GeoSpecialShapes PUBLIC target_include_directories( GeoSpecialShapes PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include> ) $<INSTALL_INTERFACE:include> ${GEANT4_INCLUDE_DIRS})
source_group( "GeoSpecialShapes" FILES ${HEADERS} ) source_group( "GeoSpecialShapes" FILES ${HEADERS} )
source_group( "src" FILES ${SOURCES} ) source_group( "src" FILES ${SOURCES} )
set_target_properties( GeoSpecialShapes PROPERTIES set_target_properties( GeoSpecialShapes PROPERTIES
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment