1
0
mirror of synced 2025-01-03 10:21:32 +01:00
Henry Schreiner 570c7b64bf
chore: bump to CMake 3.23
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-03-29 16:41:40 -04:00

535 B

CMake ROOT simple example

[main]

cmake_minimum_required(VERSION 3.1...3.23)

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)