1
0
mirror of synced 2024-12-22 20:50:00 +01:00
2024-08-09 14:54:33 +00:00

535 B

CMake ROOT simple example

[main]

cmake_minimum_required(VERSION 3.1...3.30)

project(RootSimpleExample LANGUAGES CXX)

Finding the ROOT package

[find_package]

find_package(ROOT 6.16 CONFIG REQUIRED)

[find_package]

Adding an executable program and linking to needed ROOT libraries

add_executable(RootSimpleExample SimpleExample.cxx) target_link_libraries(RootSimpleExample PUBLIC ROOT::Physics)

[main]

enable_testing() add_test(NAME RootSimpleExample COMMAND RootSimpleExample)