No subject


Tue Jan 15 14:41:49 EST 2013


package even if
some target may fail then you could simply make the building of those
targets optional
using

option(BUILD_OPTIONAL_TARGET "Build Optional Target" OFF)

then
if(BUILD_OPTIONAL_TARGET)
  add_executable(...)
endif()

Then set BUILD_OPTIONAL_TARGET to OFF if you don't care of those when
building a package.

Currently CMake (and not CPack) is not  tracking down target that
"are built but not installed"
it may be doable but this would be a new feature.
I don't really know the portion of CMake code handling manifest files
but AFAIRemember this was handled **at install time** so that the
list of "to be installed files/target" is unknown at CMake time.

What "may be possible" is to add a new "package/fast" target
which would depend on "preinstall/fast and install/fast" instead of
"preinstall" so that
you will avoid the build of "all"

The trouble is, the fast target does not build **anything** so you'll
have to do:

make -k all
make package/fast

to achieve what you want.

--=20
Erk
Le gouvernement repr=C3=A9sentatif n'est pas la d=C3=A9mocratie --
http://www.le-message.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensour=
ce/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.=
org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

=20

=20

----------MB_8CFD2B69279A96E_19F8_161E1_Webmail-d112.sysops.aol.com
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<font color=3D'black' size=3D'2' face=3D'arial'><font size=3D"2">My advice =
to you would <font size=3D"2">be not to ignore the errors.<br>
<br>
<font size=3D"2">If you want to i<font size=3D"2">gnore them anyway, you're=
 on your own. Or maybe somebody else who is also ignoring errors like these=
 will s<font size=3D"2">tep up with some alternate advice. </font>;-)</font=
></font><br>
</font></font><font color=3D"black" face=3D"arial" size=3D"2">

<div> <br>
<font size=3D"2">You can <font size=3D"2">o<font size=3D"2">verride what CP=
ack calls for "make install" -- <font size=3D"2">you can tell it to run som=
ething else that won't do a "make all" first.</font></font></font></font> B=
ut it <font size=3D"2">would probably be easier to just fix the errors.</fo=
nt><br>

</div>



<div> <br>
<br>
<font size=3D"2"><font size=3D"2">D<br>
<br>
</font></font>
</div>



<div> <br>

</div>


</font>
<div style=3D"font-family:arial,helvetica;font-size:10pt;color:black"><font=
 color=3D"black" face=3D"arial" size=3D"2">-----Original Message-----<br>

From: NoRulez &lt;norulez at me.com&gt;<br>

To: David Cole &lt;dlrdave at aol.com&gt;<br>

Cc: eric.noulard &lt;eric.noulard at gmail.com&gt;; cmake &lt;cmake at cmake.org&=
gt;<br>

Sent: Wed, Feb 6, 2013 2:19 pm<br>

Subject: Re: [CMake] Running CPack and ignore exit codes<br>

<br>








</font>
<div id=3D"AOLMsgPart_1_2fde2055-0b9f-4b5f-8e96-a504c3f8006c"><font color=
=3D"black" face=3D"arial" size=3D"2">



<div>Ok, when I have the following situation:</div>



<div><br>

</div>



<div>prj1 (install target)</div>



<div>prj2 (not install target but produce compile error, so this could be i=
gnored)</div>



<div>prj3&nbsp;<span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26,=
 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); =
-webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">(install t=
arget)</span></div>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); ">prj4 (</span><span s=
tyle=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-co=
mposition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-fr=
ame-color: rgba(77, 128, 180, 0.230469); ">install target)</span></div>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); "><br>

</span></div>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); ">At the moment I call=
 "cpack -G ZIP" (normally I call cpack from within a CTestScript) and it st=
ops by prj2 without building the zip archive.</span></div>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); ">If the prj2 doesn't =
have errors it runs smoothly.</span></div>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); "><br>

</span></div>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); ">Did this mean that I=
 must know (at CTestScript time) which projects should be build?</span></di=
v>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); ">e.g.: cpack -G ZIP p=
rj1 prj2 prj3?</span></div>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); "><br>

</span></div>



<div><span style=3D"-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969)=
; -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-co=
mposition-frame-color: rgba(77, 128, 180, 0.230469); ">Best Regards</span><=
/div>



<div><br>

</div>



<div>Am 06.02.2013 um 19:58 schrieb David Cole &lt;<a href=3D"mailto:dlrdav=
e at aol.com">dlrdave at aol.com</a>&gt;:<br>

<br>

</div>



<div><span></span></div>

</font><blockquote type=3D"cite"><font color=3D"black" face=3D"arial" size=
=3D"2">
</font>
<div><font color=3D"black" face=3D"arial" size=3D"2"><font color=3D"black" =
face=3D"arial" size=3D"2">CPack does call "make install"<font size=3D"2"> -=
- and make install first doe<font size=3D"2">s a make all to get everything=
 up to date.....<br>


<br>


<font size=3D"2">So even calling just cpack by <font size=3D"2">its<font si=
ze=3D"2">elf in this situation is no good.</font></font></font><br>


</font></font></font></font><font color=3D"black" face=3D"arial" size=3D"2"=
>



<div> <br>



</div>







<div> <br>



</div>







<div> <br>



</div>







<div style=3D"font-family:arial,helvetica;font-size:10pt;color:black">-----=
Original Message-----<br>



From: Eric Noulard &lt;<a href=3D"mailto:eric.noulard at gmail.com">eric.noula=
rd at gmail.com</a>&gt;<br>



To: NoRulez &lt;<a href=3D"mailto:norulez at me.com">norulez at me.com</a>&gt;<br=
>



Cc: CMake ML &lt;<a href=3D"mailto:cmake at cmake.org">cmake at cmake.org</a>&gt;=
<br>



Sent: Wed, Feb 6, 2013 1:57 pm<br>



Subject: Re: [CMake] Running CPack and ignore exit codes<br>



<br>













<div id=3D"AOLMsgPart_0_3fbc84b6-f28a-44d6-8ddd-b4ae9b79c5f3" style=3D"marg=
in: 0px;font-family: Tahoma, Verdana, Arial, Sans-Serif;font-size: 12px;col=
or: #000;background-color: #fff;">

<pre style=3D"font-size: 9pt;"><tt>2013/2/6 NoRulez &lt;<a href=3D"mailto:n=
orulez at me.com">norulez at me.com</a>&gt;:
&gt; Because CPack runs the default (all) target.

Ok now I think I get it.

AIFAIK, CPack does NOT run "all" target.

"make package" does.

You should be able to call CPack explicitely without problem, try:

cpack

in your build dir. However this won't try to build anything.

&gt; It could be that a target doesn't build because of compile or link err=
ors and=20
are not an install target (unit tests for example or other sub projects whi=
ch=20
are not required).

You'll build a package with a failing unit test !! :-]

&gt; CPack should build as much as possible and only break if an install ta=
rget has=20
errors.

Like I said, CPack does not build anything per se, the "package"
target depends on "all"
so that the build tool (make,  Visual Studio, XCode etc...) does build all.

&gt; Currently it is not possible to run cpack and create packages for such=
=20
situation.

True but I'm not sure I would personnally want to build a package out
of a partially buildable project.
Other may have other opinion though.



More information about the CMake mailing list