[CMake] Main program not getting rebuilt when library changes.

Bill Greene w.h.greene at gmail.com
Tue Oct 7 11:18:42 EDT 2014


>cmake --build . --config Debug --target cmTestMain

Just as before, this re-compiles the cpp file and re-builds the lib but
does not re-link the exe.

>cmake --build . --config Debug --target cmTestMain -- -verbosity:diag >log
2>&1

I looked through this log file fairly carefully but, unfortunately, my
understanding of MSBuild is too
limited to say anything intelligent about it. I'll compress it and send it
on to you directly.

Thanks again for looking into this.

Bill

On Tue, Oct 7, 2014 at 9:33 AM, Brad King <brad.king at kitware.com> wrote:

> On Mon, Oct 6, 2014 at 5:47 PM, Bill Greene wrote:
> >>Another thing to try is to run cmake --build . and see if that works.
> > That appears to compile the lib cpp file and rebuild the library just
> fine
> > but it also doesn't re-link the main program.
>
> I also cannot reproduce this from Bill H's example.  Both the .lib and
> .exe file are rebuilt after touching only the lib .cpp file.
>
> Try building the main target directly after touching the lib .cpp file:
>
>  cmake --build . --config Debug --target cmTestMain
>
> If that reproduces the issue then we can ask msbuild for verbose logging
> info.  Touch the lib .cpp file again and then run:
>
>  cmake --build . --config Debug --target cmTestMain -- -verbosity:diag
> >log 2>&1
>
> The log file will be big and verbose.  If you see something stand out
> in it then please reply with a relevant subset of the log.  Otherwise
> please zip it up and send the log to me and Bill H. off-list since
> it will likely be too big to attach on-list.
>
> Thanks,
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141007/bc5d2938/attachment.html>


More information about the CMake mailing list