[CMake] Build-order in Visual Studio

Dmytro Ovdiienko dmitriy.ovdienko at gmail.com
Mon Jan 26 09:22:32 EST 2009


Micha,

Use *target_link_libraries<http://www.cmake.org/cmake/help/cmake2.6docs.html#command:target_link_libraries>
* and *add_dependencies<http://www.cmake.org/cmake/help/cmake2.6docs.html#command:add_dependencies>
* to fix project build order.

2009/1/26 Micha Renner <Micha.Renner at t-online.de>

> Hello,
>
> is it possible to influence the build-order of MSVC from
> CMakeLists.txt-files?
>
> The top-level CMakeLists.txt looks like this:
>
> ADD_SUBDIRECTORY(lib1)
> ADD_SUBDIRECTORY(lib2)
> ADD_SUBDIRECTORY(lib3)
> ADD_SUBDIRECTORY(lib4)
> ADD_SUBDIRECTORY(prog)
>
> prog depends on the libs. lib3 depends on lib1 and lib4 depends on lib2.
> After a cMake-run the build-order in Visual Studio is "pure" random,
> even the main-program is sometimes ZERO_CHECK.
>
> Michael
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090126/f964ed9c/attachment.htm>


More information about the CMake mailing list