[CMake] Build-order in Visual Studio

2009-01-26 Thread Micha Renner
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@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Build-order in Visual Studio

2009-01-26 Thread Dmytro Ovdiienko
Micha,

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

2009/1/26 Micha Renner micha.ren...@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@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Build-order in Visual Studio

2009-01-26 Thread Micha Renner
Am Montag, den 26.01.2009, 16:22 +0200 schrieb Dmytro Ovdiienko:
 Micha,
 
 Use target_link_libraries and add_dependencies to fix project build
 order.
 

I think, that this doesn't work in the case here.
For target_link_libraries I need a library. If prog is first in build
process then there are no libs.
add_dependencies helps if all projects would be in one CMakeList-file.

Michael

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake