mirror of
1
0
Fork 0
modern-cmake/examples/root-simple/CMakeLists.txt

23 lines
535 B
CMake
Raw Normal View History

2020-08-12 20:29:56 +02:00
# CMake ROOT simple example
2018-03-28 22:48:45 +02:00
## [main]
2021-07-14 18:09:06 +02:00
cmake_minimum_required(VERSION 3.1...3.21)
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 22:18:42 +02:00
# Finding the ROOT package
2018-03-28 22:48:45 +02:00
## [find_package]
2019-08-08 22:18:42 +02: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 22:18:42 +02: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 22:18:42 +02: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)