A Simple ROOT Project

This is a minimal example of a ROOT project using the target system and without a dictionary.


cmake_minimum_required(VERSION 3.1...3.22)

project(RootSimpleExample LANGUAGES CXX)

# Finding the ROOT package
find_package(ROOT 6.16 CONFIG REQUIRED)

# Adding an executable program and linking to needed ROOT libraries
add_executable(RootSimpleExample SimpleExample.cxx)
target_link_libraries(RootSimpleExample PUBLIC ROOT::Physics)


#include <TLorentzVector.h>

int main() {
    TLorentzVector v(1,2,3,4);
    return 0;

results matching ""

    No results matching ""