<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello Paul and Shoaib,<div><br></div><div>I'm answering to the both of you.</div><div><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 4, 2019 at 7:13 AM Paul Smith <<a href="mailto:paul@mad-scientist.net">paul@mad-scientist.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="text-align:left;direction:ltr"><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div>Now although I don't understand the exact reasons behind that, over the years came to accept that depedencies between the lib and the resulting artifcats are not working. Like, when I change a source file to mylib, the lib will get rebuilt but the resulting test tool won't be relinked.</div></blockquote><div><br></div><div>This is definitely not true, as stated.  I feel like I must be missing something about your stated environment because this is really basic, fundamental CMake behavior, which has always worked.</div></div></blockquote><div><br></div><div>First of all, thanks for the information. I was not aware that this is supposed to work. As I said, I've been struggling with this issue for years now and I recall posting this to this list too but the only explanation I ever found was something along the lines of "dependencies would exist to objects inside the lib, not the lib as it is a static archive". But I'm pulling this out of my 'memory' now, nothing to rely on. All I remembered is that this is not supposed to work. But now you say the opposite, which gives me a little hope.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="text-align:left;direction:ltr"><div></div><div>If in your environment you are not seeing executables rebuilt when libraries they depend on are updated, then there is something more complex about it than the straightforward case you provide above.</div></div></blockquote><div><br></div><div>I have seen this in two major projects I have been working on in the last years. Both were Linux and Windows, MSVC 14 and 15 on Windows. And I do believe the issue is on Windows. I am not sure which CMake version I have seen this first on. Let's make it 3.10.x cause this was when I posted this to the list last time but by then I was already having the problem for a longer time.</div><div><br></div><div><div>Today I am using CMake version 3.13.2 but I have been using many different versions up to this one.</div><div> </div></div><div>Both projects were large but not huge, having about 10 - 15 targets plus additional 50 unit tests plus another 5 test tools. Unfortunately I cannot publish the projects themselves but one that I currently see the issue with is mredis (<a href="https://github.com/MrMoose/mredis">https://github.com/MrMoose/mredis</a>) which, among others, is pulled in as a submodule. C++ only, some protobuf code generation is involved but not in the targets that I'm talking about.</div><div><br></div><div>Since the issue has been persisting for so long now, the projects and CMakeLists have substantially changed many times, so it's really hard to come up with something I would consider 'strange' or 'different' as a possible explanation.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div></div></div></div></div>