1
0
mirror of synced 2024-12-22 12:40:00 +01:00

ci: Fix issue with ROOT not building

This commit is contained in:
Henry Schreiner 2020-06-09 11:33:13 -04:00
parent cc9c1c7c21
commit bd7c959820
2 changed files with 5 additions and 3 deletions

View File

@ -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. 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 ## Finding ROOT

View File

@ -9,8 +9,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_PLATFORM_INDEPENDENT_CODE ON) set(CMAKE_PLATFORM_INDEPENDENT_CODE ON)
find_package(ROOT CONFIG REQUIRED) find_package(ROOT 6.20 CONFIG REQUIRED)
include("${ROOT_DIR}/modules/RootNewMacros.cmake") # 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) root_generate_dictionary(G__DictExample DictExample.h LINKDEF DictLinkDef.h)