[CMake] Question about MSVC link-process

Vladimir Sysoev vladimir.sysoev at gmail.com
Wed Apr 9 02:40:54 EDT 2008


Ilya,
may be it helps you.

   - *ADD_DEPENDENCIES*: Add a dependency between top-level targets.

     ADD_DEPENDENCIES(target-name depend-target1
                      depend-target2 ...)

   Make a top-level target depend on other top-level targets. A top-level
   target is one created by ADD_EXECUTABLE, ADD_LIBRARY, or ADD_CUSTOM_TARGET.
   Adding dependencies with this command can be used to make sure one target is
   built before another target. See the DEPENDS option of ADD_CUSTOM_TARGET and
   ADD_CUSTOM_COMMAND for adding file-level dependencies in custom rules. See
   the OBJECT_DEPENDS option in SET_SOURCE_FILES_PROPERTIES to add file-level
   dependencies to object files.

-vladimir

On Wed, Apr 9, 2008 at 10:13 AM, Ilya Shvetsov <chvetsov at kranx.com> wrote:

> On Wed, 09 Apr 2008 07:32:59 +0300, Vladimir Sysoev <
> vladimir.sysoev at gmail.com> wrote:
>
>  Ilya,
> > I suppose you have to specify your libraries as dependency to target.
> >
> > - vladimir
> >
> >
> I did.
> I give example just to show.
>
> Project(Exmple)
> ADD_EXECUTABLE(Example main.cpp)
> TARGET_LINK_LIBRARIES(Example libA.lib libB.lib libC.lib)
>
>
> When some of lib*.lib is changed target 'Example' is not relinked.
> And I'm looking for way to force relinking
>
> --
> Ilya Shvetsov
> KranX Productions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080409/8ef3be0f/attachment.htm>


More information about the CMake mailing list