[all-commits] [llvm/llvm-project] 51bceb: [libcxx] [test] Fix restoring LLVM_DIR and Clang_D...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Mar 26 13:13:49 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51bceb46f8eeb7c3d060387be315ca41855933c2
      https://github.com/llvm/llvm-project/commit/51bceb46f8eeb7c3d060387be315ca41855933c2
  Author: Martin Storsjö <martin at martin.st>
  Date:   2025-03-26 (Wed, 26 Mar 2025)

  Changed paths:
    M libcxx/test/tools/clang_tidy_checks/CMakeLists.txt

  Log Message:
  -----------
  [libcxx] [test] Fix restoring LLVM_DIR and Clang_DIR (#132838)

In 664f345cd53d1f624d94f9889a1c9fff803e3391, a fix was introduced,
attempting to restore LLVM_DIR and Clang_DIR after doing
find_package(Clang).

However, 6775285e7695f2d45cf455f5d31b2c9fa9362d3d added a return if the
clangTidy target wasn't found. If this is hit, we don't restore LLVM_DIR
and Clang_DIR, which causes strange effects if CMake is rerun a second
time.

Move the code for restoring LLVM_DIR and Clang_DIR to directly after the
find_package calls, to make sure they are restored, regardless of the
find_package outcome.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list