Skip to content

Commit 2434898

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 94f2afc commit 2434898

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
@@ -376,6 +376,9 @@ unset(artifact_files)
376376

377377
add_custom_target(move_artifacts DEPENDS ${stamp_file} ${all_artifacts})
378378

379+
if(builtin_cling)
380+
set(CLING_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/interpreter/cling/include)
381+
endif()
379382

380383
#---Add the main sources ---------------------------------
381384
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
@@ -467,8 +467,6 @@ if (builtin_cling)
467467
add_subdirectory(cling EXCLUDE_FROM_ALL)
468468
add_dependencies(CLING ${CLING_LIBRARIES})
469469

470-
set(CLING_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/cling/include CACHE STRING "")
471-
472470

473471

474472
#---These are the libraries that we link ROOT with CLING---------------------------
@@ -544,11 +542,6 @@ mark_as_advanced(CLEAR LLVM_ENABLE_ASSERTIONS LLVM_BUILD_TYPE)
544542

545543
##################### LIBINTEROP ###########################
546544

547-
#---Set InterOp include directories, for any ROOT component that requires the headers--------------------------------------------------------
548-
set(CPPINTEROP_INCLUDE_DIRS
549-
${CMAKE_CURRENT_SOURCE_DIR}/CppInterOp/include
550-
CACHE STRING "CppInterOp include directories.")
551-
552545
#---Set InterOp to build on Cling, this can be toggled to use Clang-REPL-------------------------------------------------------
553546
set(CPPINTEROP_USE_CLING ON CACHE BOOL "" FORCE)
554547
set(CPPINTEROP_USE_REPL OFF CACHE BOOL "" FORCE)

0 commit comments

Comments
 (0)