Skip to content

Commit 88edd4f

Browse files
committed
[tutorials][test] Specify the include path for SOFIE tutorials in CMake
We don't want to rely on environment variables like `ROOTSYS` in the tutorials, and we should also not leak details of the test setup like `$ROOTSYS/runtutorials` in the user-facing tutorials.
1 parent 1f96948 commit 88edd4f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

tutorials/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ set(ROOT_root_CMD $<TARGET_FILE:root.exe>)
99
set(pythonpaths ${localruntimedir} $ENV{PYTHONPATH})
1010
cmake_path(CONVERT "${pythonpaths}" TO_NATIVE_PATH_LIST pythonpaths_native)
1111

12-
set(root_includepaths ${CMAKE_BINARY_DIR}/tutorials/io/tree ${DEFAULT_ROOT_INCLUDE_PATH})
12+
set(root_includepaths
13+
${CMAKE_BINARY_DIR}/tutorials/io/tree
14+
# Some SOFIE tutorials include headers with code generated by other
15+
# tutorials, which ends up in runtutorials/
16+
${CMAKE_BINARY_DIR}/runtutorials
17+
${DEFAULT_ROOT_INCLUDE_PATH}
18+
)
19+
1320
cmake_path(CONVERT "${root_includepaths}" TO_NATIVE_PATH_LIST root_includepaths_native)
1421

1522
# Escape list separators for env usage

tutorials/machine_learning/TMVA_SOFIE_GNN_Application.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// need to add include path to find generated model file
99
#ifdef __CLING__
1010
R__ADD_INCLUDE_PATH($PWD)
11-
R__ADD_INCLUDE_PATH($ROOTSYS/runtutorials)
1211
#endif
1312

1413
#include "encoder.hxx"

tutorials/machine_learning/TMVA_SOFIE_RDataFrame.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ using namespace TMVA::Experimental;
2525
// need to add the current directory (from where we are running this macro)
2626
// to the include path for Cling
2727
R__ADD_INCLUDE_PATH($PWD)
28-
R__ADD_INCLUDE_PATH($ROOTSYS/runtutorials)
2928
#include "Higgs_trained_model.hxx"
3029
#include "TMVA/SOFIEHelpers.hxx"
3130

0 commit comments

Comments
 (0)