From bd7c95982061ba724c8393148b321e7308d099e7 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 9 Jun 2020 11:33:13 -0400 Subject: [PATCH] ci: Fix issue with ROOT not building --- chapters/packages/ROOT.md | 2 +- examples/root-dict/CMakeLists.txt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/chapters/packages/ROOT.md b/chapters/packages/ROOT.md index ef23cb2..3128cf4 100644 --- a/chapters/packages/ROOT.md +++ b/chapters/packages/ROOT.md @@ -3,7 +3,7 @@ ROOT is a C++ Toolkit for High Energy Physics. It is huge. There are really a lot of ways to use it in CMake, though many/most of the examples you'll find are probably wrong. Here's my recommendation. -Most importantly, there are *lots of improvements* in CMake support in more recent versions of ROOT - Using 6.16+ is much, much easier! If you really must support 6.14 or earlier, see the section at the end. +Most importantly, there are *lots of improvements* in CMake support in more recent versions of ROOT - Using 6.16+ is much, much easier! If you really must support 6.14 or earlier, see the section at the end. There were further improvements in 6.20, as well, it behaves much more like a proper CMake project, and exports C++ standard features for targets, etc. ## Finding ROOT diff --git a/examples/root-dict/CMakeLists.txt b/examples/root-dict/CMakeLists.txt index 5086326..342a9d5 100644 --- a/examples/root-dict/CMakeLists.txt +++ b/examples/root-dict/CMakeLists.txt @@ -9,8 +9,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_PLATFORM_INDEPENDENT_CODE ON) -find_package(ROOT CONFIG REQUIRED) -include("${ROOT_DIR}/modules/RootNewMacros.cmake") +find_package(ROOT 6.20 CONFIG REQUIRED) +# If you want to support <6.20, add this line: +# include("${ROOT_DIR}/modules/RootNewMacros.cmake") +# However, it was moved and included by default in 6.201 root_generate_dictionary(G__DictExample DictExample.h LINKDEF DictLinkDef.h)