<html xmlns:v="urn:schemas-microsoft-com:vml" 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:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@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;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",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.Code, li.Code, div.Code
        {mso-style-name:Code;
        mso-style-link:"Code Char";
        margin-top:12.0pt;
        margin-right:.1in;
        margin-bottom:12.0pt;
        margin-left:.1in;
        mso-add-space:auto;
        background:#EDEDED;
        border:none;
        padding:0in;
        font-size:9.0pt;
        font-family:"Lucida Console";
        color:#44546A;}
p.CodeCxSpFirst, li.CodeCxSpFirst, div.CodeCxSpFirst
        {mso-style-name:CodeCxSpFirst;
        mso-style-link:"Code Char";
        mso-style-type:export-only;
        margin-top:12.0pt;
        margin-right:.1in;
        margin-bottom:0in;
        margin-left:.1in;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        background:#EDEDED;
        border:none;
        padding:0in;
        font-size:9.0pt;
        font-family:"Lucida Console";
        color:#44546A;}
p.CodeCxSpMiddle, li.CodeCxSpMiddle, div.CodeCxSpMiddle
        {mso-style-name:CodeCxSpMiddle;
        mso-style-link:"Code Char";
        mso-style-type:export-only;
        margin-top:0in;
        margin-right:.1in;
        margin-bottom:0in;
        margin-left:.1in;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        background:#EDEDED;
        border:none;
        padding:0in;
        font-size:9.0pt;
        font-family:"Lucida Console";
        color:#44546A;}
p.CodeCxSpLast, li.CodeCxSpLast, div.CodeCxSpLast
        {mso-style-name:CodeCxSpLast;
        mso-style-link:"Code Char";
        mso-style-type:export-only;
        margin-top:0in;
        margin-right:.1in;
        margin-bottom:12.0pt;
        margin-left:.1in;
        mso-add-space:auto;
        background:#EDEDED;
        border:none;
        padding:0in;
        font-size:9.0pt;
        font-family:"Lucida Console";
        color:#44546A;}
span.CodeChar
        {mso-style-name:"Code Char";
        mso-style-link:Code;
        font-family:"Lucida Console";
        color:#44546A;
        background:#EDEDED;}
span.mono
        {mso-style-name:mono;
        mso-style-priority:1;
        font-family:"Lucida Console";
        color:#44546A;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.emailstyle17
        {mso-style-name:emailstyle17;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.htmlpreformattedchar
        {mso-style-name:htmlpreformattedchar;
        font-family:"Courier New";}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#44546A;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        color:#323E4F;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#44546A">Have a look at the code I quoted from
</span><span class="mono"><span style="font-size:10.0pt">CPackRPM.cmake</span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#44546A">:<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid windowtext 1.0pt;padding:1.0pt 4.0pt 1.0pt 4.0pt;background:#EDEDED;margin-left:.1in;margin-right:.1in">
<p class="Code" style="mso-margin-top-alt:12.0pt;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;mso-add-space:auto;background:#EDEDED">
if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)<br>
      set(RPMBUILD_FLAGS "-bb")<o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#44546A">If
</span><span class="mono"><span style="font-size:10.0pt">CPACK_RPM_USER_BINARY_SPECFILE</span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#44546A"> is defined, then
</span><span class="mono"><span style="font-size:10.0pt">RPMBUILD_FLAGS</span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#44546A"> is
<b>not</b> set to </span><span class="mono"><span style="font-size:10.0pt">-bb</span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#44546A">.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#44546A"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:#44546A">___<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:#44546A">Rob<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#44546A"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Eric Noulard [mailto:eric.noulard@gmail.com]
<br>
<b>Sent:</b> Friday, March 22, 2019 7:57 AM<br>
<br>
</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Le mer. 6 mars 2019 à 21:33, Stewart, Robert <<a href="mailto:Robert.Stewart@sig.com">Robert.Stewart@sig.com</a>> a écrit :<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt">We've recently upgraded CMake from 2.8+ to 3.5+ (different versions on different platforms).  In so doing, our CMake invocation of CPack to create RPMs now fails and I'm hoping someone can help.  I have a spec
 file and I want to run rpmbuild -bb, but I can't figure out how to do it.<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
The result is that my attempt to port to the all-variable approach failed, so I'm setting CPACK_RPM_USER_BINARY_SPECFILE to refer to my spec file as before.  Unfortunately, when I do so, CPackRPM.cmake doesn't set RPMBUILD_FLAGS, and that leads to rpmbuild
 doing nothing useful.  The issue is in the following code:<br>
<br>
    # We should generate a USER spec file template:<br>
    #  - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE<br>
    #  - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE<br>
    if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)<br>
      set(RPMBUILD_FLAGS "-bb")<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I missed that. Do you mean that even though you <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">set(CPACK_RPM_USER_BINARY_SPECFILE /xxxx)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">CPackRPM does not process the spec file with rpmbuild -bb ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">AFAIU from the source:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">"-bb" flags are always setup when binary RPM is built.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/Internal/CPack/CPackRPM.cmake#L1658">https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/Internal/CPack/CPackRPM.cmake#L1658</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am confused. Could restate the problem.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Eric<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction,
 disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security
 or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments
 is free of viruses.<br>
</font>
</body>
</html>