Author Topic: Order of the targets of a project  (Read 2464 times)

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Order of the targets of a project
« on: November 07, 2019, 02:33:24 pm »
Hello,
I searched the Wiki without success !

I have a project "project.cbp" (C++) with three targets "lib1", "lib2", "core".
The targets "lib1" and "lib2" provide shared libraries without dependencies, "core" provides the final GUI executable and uses the two previous libraries on which it depends (link dependencies here). It is assumed that the inclusion and link paths are correctly filled in.

During the first construction, how to impose on'C::B' the following construction order: 'lib1' then 'lib2' then 'core' ?

Thank you in advance.
« Last Edit: November 07, 2019, 02:58:42 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Order of the targets of a project
« Reply #1 on: November 07, 2019, 05:29:29 pm »
Go to Project -> Properties -> Build targets. There you have a button labeled "Re-order..."; When you select the All virtual target the targets are built from top to bottom
« Last Edit: November 07, 2019, 05:48:11 pm by Miguel Gimenez »

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Order of the targets of a project
« Reply #2 on: November 07, 2019, 06:28:00 pm »
Good evening,
Thank you for your reply.

I did a test with three targets and a virtual 'All' => 'Log4qt', 'QSerial', 'QGLViewer' and the log is
Quote
-------------- Build: Log4qt in gcv-19.11-qt597-qgl271-win32-32 (compiler: GNU GCC Compiler 5.3.0 (qt59x))---------------

Target is up to date.
[100.0%] Running target post-build steps
cmd /C xcopy /D /Y lib\Log4qt.dll BuildCB\core_597\
lib\Log4qt.dll
1 fichier(s) copi‚(s)

-------------- Build: QGLViewer in gcv-19.11-qt597-qgl271-win32-32 (compiler: GNU GCC Compiler 5.3.0 (qt59x))---------------

Target is up to date.
[100.0%] Running target post-build steps
cmd /C xcopy /D /Y lib\QGLViewer.dll BuildCB\core_597\
lib\QGLViewer.dll
1 fichier(s) copi‚(s)

-------------- Build: QSerial in gcv-19.11-qt597-qgl271-win32-32 (compiler: GNU GCC Compiler 5.3.0 (qt59x))---------------

Target is up to date.
[100.0%] Running target post-build steps
cmd /C xcopy /D /Y lib\QSerial.dll BuildCB\core_597\
lib\QSerial.dll
1 fichier(s) copi‚(s)
Process terminated with status 0 (0 minute(s), 15 second(s))
0 error(s), 0 warning(s) (0 minute(s), 15 second(s))
It is noted that the order of execution is different from the virtual !
But perhaps hold is the use of the plugin 'QtPregen' to compile projects based on QT5,I will try to explore why.
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl