[llvm] r354060 - [CMake] Fix ability to use LLVM_ENABLE_PROJECTS with LLVM_EXTERNAL_PROJECTS

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 17:11:43 PST 2019


This fixes the LLVM_EXTERNAL_PROJECTS with LLVM_ENABLE_PROJECTS case but breaks the LLVM_EXTERNAL_PROJECTS without LLVM_ENABLE_PROJECTS case. We iterate over the combination of LLVM_ENABLE_PROJECTS and LLVM_EXTERNAL_PROJECTS, but then we only look up the items from LLVM_ENABLE_PROJECTS in that combined list, so anything that's in LLVM_EXTERNAL_PROJECTS but not in LLVM_ENABLE_PROJECTS (e.g. because it doesn't live side-by-side) gets disabled.

One option to fix this would be to change the lookup to search in LLVM_EXTERNAL_PROJECTS as well, and then change the LLVM_EXTERNAL_*_SOURCE_DIR setting in this loop to be CACHEd, so that it doesn't override a user's setting. That should keep both cases working. What do you think?

From: llvm-commits <llvm-commits-bounces at lists.llvm.org> on behalf of Chris Bieneman via llvm-commits <llvm-commits at lists.llvm.org>
Reply-To: Chris Bieneman <chris.bieneman at me.com>
Date: Thursday, February 14, 2019 at 2:57 PM
To: "llvm-commits at lists.llvm.org" <llvm-commits at lists.llvm.org>
Subject: [llvm] r354060 - [CMake] Fix ability to use LLVM_ENABLE_PROJECTS with LLVM_EXTERNAL_PROJECTS

Author: cbieneman
Date: Thu Feb 14 12:57:17 2019
New Revision: 354060

URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D354060-26view-3Drev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=4Vlbja-cwHg4BR5iGcPPSY0HiVU411Nuh0c1lGkXVqc&s=32t3xPHPVY9Rh0eIJaZUSvDcHl5aVmMN1G5ZYHUgd_s&e=
Log:
[CMake] Fix ability to use LLVM_ENABLE_PROJECTS with LLVM_EXTERNAL_PROJECTS

LLVM r353148, changed the circumstances in which the project source directory variables are created to only create them for LLVM projects. This patch initializes the directory variables for projects specified in `LLVM_EXTERNAL_PROJECTS` as well.

Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_CMakeLists.txt-3Frev-3D354060-26r1-3D354059-26r2-3D354060-26view-3Ddiff&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=4Vlbja-cwHg4BR5iGcPPSY0HiVU411Nuh0c1lGkXVqc&s=1vi2z3nIlyyCbenQQhieMECxeIuoL_uOn6ov7gJaMms&e=
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Feb 14 12:57:17 2019
@@ -130,7 +130,7 @@ mark_as_advanced(LLVM_ENABLE_PROJECTS_US
if (LLVM_ENABLE_PROJECTS_USED OR NOT LLVM_ENABLE_PROJECTS STREQUAL "")
   set(LLVM_ENABLE_PROJECTS_USED ON CACHE BOOL "" FORCE)
-  foreach(proj ${LLVM_ALL_PROJECTS})
+  foreach(proj ${LLVM_ALL_PROJECTS} ${LLVM_EXTERNAL_PROJECTS})
     string(TOUPPER "${proj}" upper_proj)
     string(REGEX REPLACE "-" "_" upper_proj ${upper_proj})
     if ("${proj}" IN_LIST LLVM_ENABLE_PROJECTS)


_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=4Vlbja-cwHg4BR5iGcPPSY0HiVU411Nuh0c1lGkXVqc&s=tzSy2Djkr60mcLcu9eUj39uP2-BlEKldsbiPE_WE1GI&e=

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190220/879d9583/attachment.html>


More information about the llvm-commits mailing list