forked from MoritzNeuberger/warwick-legend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (39 loc) · 1.28 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.12)
project(warwick-legend VERSION 0.1.0)
# Compiler/build settings
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
# CTest if we need it
include(CTest)
# Dependencies
find_package(Geant4 10.6 REQUIRED gdml ui_all vis_all)
find_package(ROOT 6.06 CONFIG REQUIRED )
# Build
add_executable(warwick-legend
warwick-legend.cc
src/WLGDActionInitialization.cc
src/WLGDBiasChangeCrossSection.cc
src/WLGDBiasMultiParticleChangeCrossSection.cc
src/WLGDCrystalHit.cc
src/WLGDCrystalSD.cc
src/WLGDDetectorConstruction.cc
src/WLGDEventAction.cc
src/WLGDPrimaryGeneratorAction.cc
src/WLGDPetersGammaCascadeReader.cc
src/WLGDRunAction.cc
src/WLGDStackingAction.cc
src/WLGDSteppingAction.cc
src/WLGDTrackingAction.cc
src/WLGDTrajectory.cc)
target_include_directories(warwick-legend PRIVATE ${PROJECT_SOURCE_DIR}/include)
target_link_libraries(warwick-legend PRIVATE ${Geant4_LIBRARIES} ${ROOT_LIBRARIES})
# Copy macro needed to run in interactive mode to build directory.
# By default, the macro is assumed to be in the working directory
# where warwick-legend is run from.
configure_file(vis.mac vis.mac COPYONLY)
# Test
if(BUILD_TESTING)
add_subdirectory(test)
endif()