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

Offline LETARTARE

  • Regular
  • ***
  • Posts: 394
  • L'ami de l'homme.The friend of man.
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 »
C::B  : svn11831, wx2.8, 3.1.1, plugins : QtPregen-2.6.2-sdk143
1-Vista Business Pack 2 32bits : gcc-8.1.0,
2-OpenSuse-15.1-Leap 64bits :  gcc-7.4.1,
=> !! The messages are translated by Deepl !!

Offline Miguel Gimenez

  • Regular
  • ***
  • Posts: 369
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

  • Regular
  • ***
  • Posts: 394
  • L'ami de l'homme.The friend of man.
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.
C::B  : svn11831, wx2.8, 3.1.1, plugins : QtPregen-2.6.2-sdk143
1-Vista Business Pack 2 32bits : gcc-8.1.0,
2-OpenSuse-15.1-Leap 64bits :  gcc-7.4.1,
=> !! The messages are translated by Deepl !!