Skip to content

Commit 9eb7933

Browse files
committed
[CMake] Don't cache CPPINTEROP_INCLUDE_DIRS and CLING_INCLUDE_DIRS
Cached variables end up in `root-config --config`, and we don't want to have absolute paths to the bulid directory inside its output. After this change, no trace of the full ROOT source or build directory path is left in the output of `root-config --config`. Closes https://its.cern.ch/jira/browse/ROOT-9481
1 parent 56401f7 commit 9eb7933

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ unset(artifact_files)
388388

389389
add_custom_target(move_artifacts DEPENDS ${stamp_file} ${all_artifacts})
390390

391+
if(builtin_cling)
392+
set(CLING_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/interpreter/cling/include)
393+
endif()
391394

392395
#---Add the main sources ---------------------------------
393396
add_subdirectory (interpreter)

core/metacling/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ target_include_directories(MetaCling SYSTEM PRIVATE
5050
${CLANG_INCLUDE_DIRS}
5151
${LLVM_INCLUDE_DIRS}
5252
${CLAD_INCLUDE_DIRS}
53-
${CPPINTEROP_INCLUDE_DIRS}
53+
${CMAKE_SOURCE_DIR}/interpreter/CppInterOp/include
5454
)
5555

5656
target_include_directories(MetaCling PRIVATE

interpreter/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,6 @@ if (builtin_cling)
481481
add_subdirectory(cling EXCLUDE_FROM_ALL)
482482
add_dependencies(CLING ${CLING_LIBRARIES})
483483

484-
set(CLING_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/cling/include CACHE STRING "")
485-
486484

487485

488486
#---These are the libraries that we link ROOT with CLING---------------------------
@@ -558,11 +556,6 @@ mark_as_advanced(CLEAR LLVM_ENABLE_ASSERTIONS LLVM_BUILD_TYPE)
558556

559557
##################### LIBINTEROP ###########################
560558

561-
#---Set InterOp include directories, for any ROOT component that requires the headers--------------------------------------------------------
562-
set(CPPINTEROP_INCLUDE_DIRS
563-
${CMAKE_CURRENT_SOURCE_DIR}/CppInterOp/include
564-
CACHE STRING "CppInterOp include directories.")
565-
566559
#---Set InterOp to build on Cling, this can be toggled to use Clang-REPL-------------------------------------------------------
567560
set(CPPINTEROP_USE_CLING ON CACHE BOOL "" FORCE)
568561
set(CPPINTEROP_USE_REPL OFF CACHE BOOL "" FORCE)

0 commit comments

Comments
 (0)