1
0
mirror of synced 2024-12-24 13:40:25 +01:00

23 lines
535 B
CMake
Raw Normal View History

2020-08-12 14:29:56 -04:00
# CMake ROOT simple example
2018-03-28 22:48:45 +02:00
## [main]
2019-11-26 13:52:10 -05:00
cmake_minimum_required(VERSION 3.1...3.16)
2018-03-28 20:50:38 +02:00
2018-03-28 22:48:45 +02:00
project(RootSimpleExample LANGUAGES CXX)
2018-03-28 20:50:38 +02:00
2019-08-08 16:18:42 -04:00
# Finding the ROOT package
2018-03-28 22:48:45 +02:00
## [find_package]
2019-08-08 16:18:42 -04:00
find_package(ROOT 6.16 CONFIG REQUIRED)
2018-03-28 22:48:45 +02:00
## [find_package]
2018-03-28 20:50:38 +02:00
2019-08-08 16:18:42 -04:00
# Adding an executable program and linking to needed ROOT libraries
2018-03-28 22:48:45 +02:00
## [add_and_link]
2018-03-29 12:27:23 +02:00
add_executable(RootSimpleExample SimpleExample.cxx)
2019-08-08 16:18:42 -04:00
target_link_libraries(RootSimpleExample PUBLIC ROOT::Physics)
2018-03-28 22:48:45 +02:00
## [add_and_link]
## [main]
2018-03-28 20:50:38 +02:00
enable_testing()
2018-03-29 12:27:23 +02:00
add_test(NAME RootSimpleExample COMMAND RootSimpleExample)