[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] List all binaries associated with a target.
From:       Klaim_-_Joël_Lamotte <mjklaim () gmail ! com>
Date:       2015-03-25 0:09:36
Message-ID: CAOU91OOT-CVWtt+Me-XJV2e4JR5+gTziobq4++FCV-s-z7K+Lw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Sun, Mar 22, 2015 at 1:22 PM, Roman Bolshakov <roolebo@gmail.com> wrote:

> 2015-03-16 23:22 GMT+03:00 Klaim - Joël Lamotte <mjklaim@gmail.com>:
>
>> Then you can invoke top-level cmake_install.cmake to install a subset
>>> of your project:
>>> DESTDIR=/destination/install/path cmake -DCOMPONENT=A -P
>>> cmake_install.cmake
>>>
>>>
>> It is not clear to me how all this would help installing automatically a
>> library and it's dependencies
>> when I modify then build the library.
>> If my understanding is correct, all this need to be triggered by cmake
>> install command, right?
>> Also, the main issue is gathering binaries so that they can be debugged
>> on windows (as you
>> point later) without having to move files around, in particular
>> dependencies binaries that
>> can and will change through developement.
>>
> cmake install is not completely automatic (you need to define install
> commands for dependencies and all targets explicitly) and is, indeed, a
> separate step from build. If you're fine with explicit definition of
> dependencies you might consider to tether build and install by an external
> script. It would kick off build and if it succeeds it would proceed to the
> cmake install-based pre-test packaging and start testing after then.
>

But then it would be an issue with debugging, which is what I am trying to
fix here.
If I compile only one target I don't need to install everything, just the
changed binaries after compilation
of the target and linking it's dependencies.
It looks to me that at least on windows there is a missing feature in CMake
to trigger that and it makes debugging painful without an external
script doing the job. That script needs to know things that CMake knows but
must be run post-build time, which is what I
was doing until recently. The script is non-trivial because it needs to
know which paths are the dependencies and the target, depending
on the build (tbb.dll vs tbb_debug.dll) and either it have some table
somewhere with the paths (unflexible but work if you have a fixed
dependencies package)
or it needs to guess it (impossible)
or it needs to be feed with these paths (from CMake, which is what I am
trying to attempt but am failing).

After searching a lot online and trying different alternatives I am not
satisfied with any solution. I also asked to our build system (using cmake)
specialist in the company I work for and there seem to be no good solution.

[Attachment #5 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar \
22, 2015 at 1:22 PM, Roman Bolshakov <span dir="ltr">&lt;<a \
href="mailto:roolebo@gmail.com" target="_blank">roolebo@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div dir="ltr"><span class="">2015-03-16 23:22 GMT+03:00 \
Klaim - Joël Lamotte <span dir="ltr">&lt;<a href="mailto:mjklaim@gmail.com" \
target="_blank">mjklaim@gmail.com</a>&gt;</span>:</span><div class="gmail_extra"><div \
class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 \
0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div \
class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Then you can \
invoke top-level cmake_install.cmake to install a subset<br> of your project:<br>
DESTDIR=/destination/install/path cmake -DCOMPONENT=A -P cmake_install.cmake<br>
<br></blockquote><div><br></div></span><div>It is not clear to me how all this would \
help installing automatically a library and it&#39;s dependencies</div><div>when I \
modify then build the library.</div><div>If my understanding is correct, all this \
need to be triggered by cmake install command, right?</div><div>Also, the main issue \
is gathering binaries so that they can be debugged on windows (as you</div><div>point \
later) without having to move files around, in particular dependencies binaries that  \
</div><div>can and will change through \
developement.</div></div></div></div></blockquote></span><div>cmake install is not \
completely automatic (you need to define install commands for dependencies and all \
targets explicitly) and is, indeed, a separate step from build. If you&#39;re fine \
with explicit definition of dependencies you might consider to tether build and \
install by an external script. It would kick off build and if it succeeds it would \
proceed to the cmake install-based pre-test packaging and start testing after \
then.</div></div></div></div> </blockquote></div><br></div><div \
class="gmail_extra">But then it would be an issue with debugging, which is what I am \
trying to fix here.</div><div class="gmail_extra">If I compile only one target I \
don&#39;t need to install everything, just the changed binaries after \
compilation</div><div class="gmail_extra">of the target and linking it&#39;s \
dependencies.</div><div class="gmail_extra">It looks to me that at least on windows \
there is a missing feature in CMake to trigger that and it makes debugging painful \
without an external</div><div class="gmail_extra">script doing the job. That script \
needs to know things that CMake knows but must be run post-build time, which is what \
I</div><div class="gmail_extra">was doing until recently. The script is non-trivial \
because it needs to know which paths are the dependencies and the target, \
depending</div><div class="gmail_extra">on the build (tbb.dll vs tbb_debug.dll) and \
either it have some table somewhere with the paths (unflexible but work if you have a \
fixed dependencies package)  </div><div class="gmail_extra">or it needs to guess it \
(impossible)</div><div class="gmail_extra">or it needs to be feed with these paths \
(from CMake, which is what I am trying to attempt but am failing).</div><div \
class="gmail_extra"><br></div><div class="gmail_extra">After searching a lot online \
and trying different alternatives I am not satisfied with any solution. I also asked \
to our build system (using cmake)</div><div class="gmail_extra">specialist in the \
company I work for and there seem to be no good solution.</div><div \
class="gmail_extra"><br></div></div>



-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic