[llvm] [CMake] Pass doc-related LLVM variables to external projects (PR #65531)
Will Hawkins via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 13:39:31 PDT 2023
https://github.com/hawkinsw created https://github.com/llvm/llvm-project/pull/65531:
When generating the configuration arguments for external projects, some of the external-project-specific CMake variables only work in combination with CMake variables from LLVM itself. In particular, the some of the doc-related CMake variables in libcxx depend on LLVM_ENABLE_SPHINX. Pass
LLVM_ENABLE_SPHINX
LLVM_BUILD_DOCS
to external projects.
Differential Revision: https://reviews.llvm.org/D158483
>From bbae8ad37c9fc5077e969c02a2d4052c3ee68d60 Mon Sep 17 00:00:00 2001
From: Will Hawkins <hawkinsw at obs.cr>
Date: Mon, 21 Aug 2023 22:16:00 -0400
Subject: [PATCH] [CMake] Pass doc-related LLVM variables to external projects
When generating the configuration arguments for external projects,
some of the external-project-specific CMake variables only work
in combination with CMake variables from LLVM itself. In particular,
the some of the doc-related CMake variables in libcxx depend on
LLVM_ENABLE_SPHINX. Pass
LLVM_ENABLE_SPHINX
LLVM_BUILD_DOCS
to external projects.
Differential Revision: https://reviews.llvm.org/D158483
---
llvm/cmake/modules/LLVMExternalProjectUtils.cmake | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
index 4b5b600307ec93b..08c11d5d015c9f6 100644
--- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -344,6 +344,8 @@ function(llvm_ExternalProject_Add name source_dir)
-DPACKAGE_VERSION=${PACKAGE_VERSION}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
+ -DLLVM_ENABLE_SPHINX=${LLVM_ENABLE_SPHINX}
+ -DLLVM_BUILD_DOCS=${LLVM_BUILD_DOCS}
-DCMAKE_EXPORT_COMPILE_COMMANDS=1
${cmake_args}
${PASSTHROUGH_VARIABLES}
More information about the llvm-commits
mailing list