Skip to content

Commit

Permalink
Make it possible to pass existing CLAD_SOURCE_DIR
Browse files Browse the repository at this point in the history
This would address two annoyances I have at the same time:

  1. One can now clone both `root` and `clad`, linking the source
     directories together. This makes it much easier to try out changes
     in clad in the context of ROOT.

  2. ROOT can now configure and build without an internet connection,
     even with `Dclad=ON`. This partially addresses #11603.
  • Loading branch information
guitargeek authored and jenkins committed Oct 2, 2024
1 parent 6217270 commit 149b49e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/plugins/clad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,20 @@ endif(LLVM_FORCE_USE_OLD_TOOLCHAIN)
list(APPEND _clad_extra_cmake_args -DCLAD_BUILD_STATIC_ONLY=ON)

# Wrap download, configure and build steps in a script to log output
set(_clad_cmake_logging_settings
set(_clad_extra_settings
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_INSTALL ON
LOG_OUTPUT_ON_FAILURE ON
)

list(APPEND _clad_cmake_logging_settings LOG_OUTPUT_ON_FAILURE ON)
# If the CLAD_SOURCE_DIR variable is defined in the CMake configuration, we're
# skipping the download of the repository and use the passed directory.
if (DEFINED CLAD_SOURCE_DIR)
list(APPEND _clad_extra_settings DOWNLOAD_COMMAND "")
list(APPEND _clad_extra_settings SOURCE_DIR ${CLAD_SOURCE_DIR})
endif()

#list(APPEND _clad_patches_list "patch1.patch" "patch2.patch")
#set(_clad_patch_command
Expand Down Expand Up @@ -88,7 +94,7 @@ ExternalProject_Add(
BUILD_COMMAND ${CMAKE_COMMAND} --build . ${EXTRA_BUILD_ARGS}
INSTALL_COMMAND ${CMAKE_COMMAND} --build . ${EXTRA_BUILD_ARGS} --target install
BUILD_BYPRODUCTS ${CLAD_BYPRODUCTS}
${_clad_cmake_logging_settings}
${_clad_extra_settings}
# We need the target clangBasic to be built before building clad. However, we
# support building prebuilt clang and adding clangBasic breaks this case.
# Delegate the dependency resolution to the clingInterpreter target (which
Expand Down

0 comments on commit 149b49e

Please sign in to comment.