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
No related branches found
No related tags found
1 merge request!3Remove clhep dependency
Pipeline #1710797 passed with warnings
stages:
- deps-geomodelcore
- deps-CLHEP
- deps-xerces-c
- deps-Geant4
- build
......@@ -21,7 +20,7 @@ variables:
- export PATH="/usr/local/opt/qt/bin:$PATH" # to make Qt5 discoverable by CMake
.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:
- docker
before_script:
......@@ -37,26 +36,7 @@ variables:
- mkdir geomodelcore-build
- cd geomodelcore-build
- cmake ${CMAKE_ARGS} ../GeoModelCore
- make -j32
- 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 -j4
- make install
artifacts:
paths:
......@@ -73,7 +53,7 @@ variables:
- mkdir xerces-c-build
- cd xerces-c-build
- cmake ${CMAKE_ARGS} ../xerces-c-3.2.2
- make -j32
- make -j4
- make install
artifacts:
paths:
......@@ -93,7 +73,7 @@ variables:
- mkdir 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
- make -j32
- make -j4
- make install
artifacts:
paths:
......@@ -105,11 +85,10 @@ variables:
CMAKE_ARGS: ${CMAKE_BASE_ARGS}
script:
- pwd; ls
- git clone https://gitlab.cern.ch/GeoModelDev/GeoModelG4.git
- mkdir GeoModelG4-build
- cd GeoModelG4-build
- cmake ${CMAKE_ARGS} ../GeoModelG4
- make -j32
- mkdir build
- cd build
- cmake ${CMAKE_ARGS} ..
- make -j4
- make install
artifacts:
paths:
......@@ -122,10 +101,6 @@ geomodelcore-mac:
<<: *macos-job
<<: *geomodelcore-job
CLHEP-mac:
<<: *macos-job
<<: *CLHEP-job
xerces-c-mac:
<<: *macos-job
<<: *xerces-c-job
......@@ -133,12 +108,12 @@ xerces-c-mac:
Geant4-mac:
<<: *macos-job
<<: *Geant4-job
needs: ["CLHEP-mac", "xerces-c-mac"]
needs: ["xerces-c-mac"]
geomodelg4-mac:
<<: *macos-job
<<: *geomodelg4-job
needs: ["geomodelcore-mac", "CLHEP-mac", "Geant4-mac"]
needs: ["geomodelcore-mac", "Geant4-mac"]
### UBUNTU PATH
......@@ -146,10 +121,6 @@ geomodelcore-ubuntu:
<<: *ubuntu-job
<<: *geomodelcore-job
#CLHEP-ubuntu:
# <<: *ubuntu-job
# <<: *CLHEP-job
#geomodelio-ubuntu:
# <<: *ubuntu-job
# <<: *geomodelio-job
......@@ -162,7 +133,7 @@ geomodelcore-ubuntu:
# Geant4-ubuntu:
# <<: *ubuntu-job
# <<: *Geant4-job
# needs: ["CLHEP-ubuntu", "xerces-c-ubuntu"]
# needs: ["xerces-c-ubuntu"]
geomodelg4-ubuntu:
<<: *ubuntu-job
......
......@@ -9,7 +9,7 @@ project( "GeoModel2G4" VERSION 1.0.0 LANGUAGES CXX )
# External dependencies:
find_package( Geant4 REQUIRED )
find_package( CLHEP )
# GeoModel dependencies
find_package( GeoModelCore 3.2.0 REQUIRED )
......@@ -44,8 +44,8 @@ include(${Geant4_USE_FILE})
add_library( GeoModel2G4 SHARED ${HEADERS} ${SOURCES} )
target_link_libraries( GeoModel2G4
PUBLIC ${GEANT4_LIBRARIES}
PRIVATE ${CLHEP_LIBRARIES} GeoMaterial2G4 GeoSpecialShapes)
target_include_directories( GeoModel2G4 SYSTEM PUBLIC ${GEANT4_INCLUDE_DIRS} PRIVATE ${CLHEP_INCLUDE_DIRS} ${GeoModelCore_INCLUDE_DIRS} )
PRIVATE GeoMaterial2G4 GeoSpecialShapes)
target_include_directories( GeoModel2G4 SYSTEM PUBLIC ${GEANT4_INCLUDE_DIRS} PRIVATE ${GeoModelCore_INCLUDE_DIRS} )
target_include_directories( GeoModel2G4 PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include> )
......
......@@ -5,12 +5,15 @@
# Package: GeoSpecialShapes
################################################################################
find_package(CLHEP)
find_package( Geant4 REQUIRED )
find_package(GeoModelCore 3.2.0 REQUIRED)
# Use the GNU install directory names.
include( GNUInstallDirs ) # it defines CMAKE_INSTALL_LIBDIR
# include Geant4 headers
include(${Geant4_USE_FILE})
# Find the header and source files.
file( GLOB SOURCES src/*.cxx src/LArWheelCalculator_Impl/*.cxx )
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.
add_library( GeoSpecialShapes SHARED ${HEADERS} ${SOURCES} )
target_link_libraries( GeoSpecialShapes PUBLIC
PRIVATE GeoModelCore::GeoModelKernel ${CLHEP_LIBRARIES} )
PRIVATE GeoModelCore::GeoModelKernel ${Geant4_LIBRARIES})
target_include_directories( GeoSpecialShapes PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include> )
$<INSTALL_INTERFACE:include> ${GEANT4_INCLUDE_DIRS})
source_group( "GeoSpecialShapes" FILES ${HEADERS} )
source_group( "src" FILES ${SOURCES} )
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