From: Hans Wennborg Date: Mon, 27 May 2019 09:03:00 +0000 (+0000) Subject: Cmake: allow using LLVM_EXTERNAL_PROJECTS with LLVM_ENABLE_PROJECTS X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=096b2564f307e5fd20d6d3f28d7b93d0d7968aa3;p=llvm Cmake: allow using LLVM_EXTERNAL_PROJECTS with LLVM_ENABLE_PROJECTS The current code iterates over the combination of LLVM_EXTERNAL_PROJECTS and LLVM_ENABLE_PROJECTS, but then disables projects that are only in the former. If a project is in LLVM_EXTERNAL_PROJECTS, it should be enabled. See also llvm-commits thread on r354060. Differential revision: https://reviews.llvm.org/D62289 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361751 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f8ddd87e02..895f9ab7189 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,9 @@ if (LLVM_ENABLE_PROJECTS_USED OR NOT LLVM_ENABLE_PROJECTS STREQUAL "") message(FATAL_ERROR "LLVM_ENABLE_PROJECTS requests ${proj} but directory not found: ${PROJ_DIR}") endif() set(LLVM_EXTERNAL_${upper_proj}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${proj}" CACHE STRING "") + elseif ("${proj}" IN_LIST LLVM_EXTERNAL_PROJECTS) + message(STATUS "${proj} project is enabled") + set(SHOULD_ENABLE_PROJECT TRUE) else() message(STATUS "${proj} project is disabled") set(SHOULD_ENABLE_PROJECT FALSE)