[llvm-bugs] [Bug 52020] New: Clang/tools CMakeLists.txt should not unconditionally include tests?

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 30 00:50:24 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=52020

            Bug ID: 52020
           Summary: Clang/tools CMakeLists.txt should not unconditionally
                    include tests?
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: jujjyl at gmail.com
                CC: llvm-bugs at lists.llvm.org

The script clang/tools/CMakeLists.txt unconditionally adds testing related
subdirectories to the build, e.g.

add_clang_subdirectory(apinotes-test)
add_clang_subdirectory(clang-import-test)
add_clang_subdirectory(c-index-test)
if(CLANG_ENABLE_ARCMT)
  add_clang_subdirectory(arcmt-test)
  add_clang_subdirectory(c-arcmt-test)
endif()

Should these be gated behind either CLANG_INCLUDE_TESTS or LLVM_INCLUDE_TESTS?

What I am seeing is that even when I do a CMake build with
-DCLANG_INCLUDE_TESTS=OFF and -DLLVM_INCLUDE_TESTS=OFF, I get these test
related files getting built.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210930/12288d5e/attachment.html>


More information about the llvm-bugs mailing list