<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">llvm-commits <llvm-commits-bounces@lists.llvm.org> on behalf of Chris Bieneman via llvm-commits <llvm-commits@lists.llvm.org><br>
<b>Reply-To: </b>Chris Bieneman <chris.bieneman@me.com><br>
<b>Date: </b>Thursday, February 14, 2019 at 2:57 PM<br>
<b>To: </b>"llvm-commits@lists.llvm.org" <llvm-commits@lists.llvm.org><br>
<b>Subject: </b>[llvm] r354060 - [CMake] Fix ability to use LLVM_ENABLE_PROJECTS with LLVM_EXTERNAL_PROJECTS<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Author: cbieneman<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Date: Thu Feb 14 12:57:17 2019<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">New Revision: 354060<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">URL: <a href="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=">
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=</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Log:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">[CMake] Fix ability to use LLVM_ENABLE_PROJECTS with LLVM_EXTERNAL_PROJECTS<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Modified:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">    llvm/trunk/CMakeLists.txt<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Modified: llvm/trunk/CMakeLists.txt<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">URL: <a href="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=">
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=</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">==============================================================================<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">--- llvm/trunk/CMakeLists.txt (original)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+++ llvm/trunk/CMakeLists.txt Thu Feb 14 12:57:17 2019<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">@@ -130,7 +130,7 @@ mark_as_advanced(LLVM_ENABLE_PROJECTS_US<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">if (LLVM_ENABLE_PROJECTS_USED OR NOT LLVM_ENABLE_PROJECTS STREQUAL "")<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">   set(LLVM_ENABLE_PROJECTS_USED ON CACHE BOOL "" FORCE)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">-  foreach(proj ${LLVM_ALL_PROJECTS})<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+  foreach(proj ${LLVM_ALL_PROJECTS} ${LLVM_EXTERNAL_PROJECTS})<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">     string(TOUPPER "${proj}" upper_proj)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">     string(REGEX REPLACE "-" "_" upper_proj ${upper_proj})<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">     if ("${proj}" IN_LIST LLVM_ENABLE_PROJECTS)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">_______________________________________________<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">llvm-commits mailing list<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><a href="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=">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=</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
</div>
</body>
</html>