Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions .github/workflows/root-ci-config/build_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,26 +419,13 @@ def cmake_configure(options, buildtype):
options = f"{options} -DROOT_COMPILEDATA_IGNORE_BUILD_NODE_CHANGES=ON"

result = subprocess_with_log(f"""
cmake -S '{srcdir}' -B '{builddir}' -DCMAKE_BUILD_TYPE={buildtype} {options}
cmake --fresh -S '{srcdir}' -B '{builddir}' -DCMAKE_BUILD_TYPE={buildtype} {options}
""")

if result != 0:
die(result, "Failed cmake generation step")


@github_log_group("Dump existing configuration")
def cmake_dump_config():
# Print CMake cached config
srcdir = os.path.join(WORKDIR, "src")
builddir = os.path.join(WORKDIR, "build")
result = subprocess_with_log(f"""
cmake -S '{srcdir}' -B '{builddir}' -N -L
""")

if result != 0:
die(result, "Failed cmake cache print step")


@github_log_group("Dump requested build configuration")
def dump_requested_config(options):
print(f"\nBUILD OPTIONS: {options}")
Expand Down Expand Up @@ -466,10 +453,7 @@ def build(options, buildtype):
if result != 0:
die(result, "Failed to create build directory")

if not os.path.exists(os.path.join(WORKDIR, "build", "CMakeCache.txt")):
cmake_configure(options, buildtype)
else:
cmake_dump_config()
cmake_configure(options, buildtype)

dump_requested_config(options)

Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,15 @@ if(MSVC)
endif()

if(runtime_cxxmodules)
if(NOT ROOT_CONFIGURED_FROM_CACHE)
# When using cmake --fresh (or changing the toolchain), remove possibly stale pcms that are not tracked by CMake
set(ROOT_CONFIGURED_FROM_CACHE True CACHE BOOL "Shows if ROOT is configured from an existing CMake cache")
mark_as_advanced(ROOT_CONFIGURED_FROM_CACHE)
file(GLOB_RECURSE left_over_pcms ${CMAKE_BINARY_DIR}/*.pcm)
if(left_over_pcms)
file(REMOVE ${left_over_pcms})
endif()
endif()
# Dummy target that does nothing, we don't need a PCH for modules.
# Onepcm target has all dependencies needed for allDict.cxx.pch, which allow
# to test hsimple.C after all C++ modules are updated.
Expand Down
Loading