-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (32 loc) · 1.1 KB
/
CMakeLists.txt
File metadata and controls
40 lines (32 loc) · 1.1 KB
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
cmake_minimum_required(VERSION 3.16)
project(MyPionNeutronLab)
find_package(Geant4 REQUIRED ui_all vis_all)
include(${Geant4_USE_FILE})
set(SOURCES
src/DetectorConstruction.cc
src/EventAction.cc
src/FluenceDetector.cc
src/main.cc
src/PhysicsList.cc
src/PrimaryGeneratorAction.cc
src/RunAction.cc
src/SteppingAction.cc
)
include_directories(${CMAKE_SOURCE_DIR}/include)
add_executable(MyPionNeutronLab ${SOURCES})
target_link_libraries(MyPionNeutronLab ${Geant4_LIBRARIES})
set_target_properties(MyPionNeutronLab PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
set_target_properties(MyPionNeutronLab PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
message(STATUS "==========================================")
message(STATUS "MyPionNeutronLab Configuration:")
message(STATUS " Geant4 version: ${Geant4_VERSION}")
message(STATUS " Source files: ${SOURCES}")
message(STATUS " Include path: ${CMAKE_SOURCE_DIR}/include")
message(STATUS " Detector at 30 cm from target")
message(STATUS "==========================================")