From 6d9e7fa1de603451cd33911fb8754205219345d8 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 2 Feb 2023 11:31:48 -0600 Subject: [PATCH] [LLVM][Runtimes] Hide unused CMake variable messages for runtimes builds The LLVM runtime build is used to bootstrap projects with the built LLVM toolchain. This effectively re-runs CMake with the current build directory. One problem is that this passes every common CMake variable to the projects individually, some of which are not necessarily used. This patch suppresses the unused variable warnings for the runtimes. The standard CMake invocation should still be able to print out the unused variables so it should not impact code quality. Reviewed By: thieta Differential Revision: https://reviews.llvm.org/D143199 --- llvm/cmake/modules/LLVMExternalProjectUtils.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake index 120462b..cc2eefb 100644 --- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake +++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake @@ -302,6 +302,7 @@ function(llvm_ExternalProject_Add name source_dir) BINARY_DIR ${BINARY_DIR} ${exclude} CMAKE_ARGS ${${nameCanon}_CMAKE_ARGS} + --no-warn-unused-cli ${compiler_args} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ${sysroot_arg} -- 2.7.4