Author Topic: Pre-build executing twice?  (Read 4135 times)

Offline filofel

  • Multiple posting newcomer
  • *
  • Posts: 11
Pre-build executing twice?
« on: April 10, 2008, 06:10:50 pm »
Hi!

Running nightly build 4977, I'm seeing pre-build commands executing twice for some projects.
(I'm not saying that this problem appeared with 4977, BTW, I don't know: I just started to use pre-build and post-build with this build.)

I have a workspace with several projects. Project NVDLinux is a dependency of project NVDCopy. Both have a dummy pre-Build that just echoes.
The first project, NVDLinux, executes its pre-build command only once.
Ditto if it is built separately.
The second project, NVDCopy, executes its prebuild commande twice:

-------------- Build: Release in NVDLinux ---------------

Running project pre-build steps
echo "NVDLinux Pre-build steps"
NVDLinux Pre-build steps
Target is up to date.

-------------- Build: Release in NVDCopy ---------------

Running project pre-build steps
echo "NVDCopy Pre-build steps"
NVDCopy Pre-build steps
Running project pre-build steps
echo "NVDCopy Pre-build steps"
NVDCopy Pre-build steps
Target is up to date.
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings

In both cases, the pre-build command is defined at the project level (rather than on one of the targets), and nothing specific is defined for the targets.

Looking at the cbp files, both have a single pre-build command, defined only once:
      <ExtraCommands>
         <Add before='echo &quot;NVDCopy Pre-build steps&quot;' />
      </ExtraCommands>

(and no, I didn't inadvertently copy the same command string in the Post-build field! :) )

Same problem occurs on some other projects, too.
I did several rounds of testing, varying the number of dependencies, etc., but couldn't find what triggers the problem and makes project NVDCopy "different" from the NVDLinux one.
Anybody seen this before?

TIA,

Phil.

Offline raybert

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Pre-build executing twice?
« Reply #1 on: April 23, 2009, 10:22:54 pm »
bump.

Is there any solution for this problem?

I'm seeing the same thing on svn 5456 on Linux and 8.02 on Windows.

Thanks,

~ray

mariocup

  • Guest
Re: Pre-build executing twice?
« Reply #2 on: April 24, 2009, 09:27:17 am »
Hi raybert,

could you provide the *.cbp and workspace file (without source code).


Offline raybert

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Pre-build executing twice?
« Reply #3 on: April 24, 2009, 05:48:26 pm »
Sure.  They're attached.  Below is a snippet from the output of building project 'simulator', target 'Linux-Debug'.  Notice that schema-gen gets executed twice.

I also noticed that the output for the pre-build steps appears before the "--- Build: ... ---" line for that project (minor issue).

Thanks for looking at it.

~ray

PS: I'm running svn 5456 on Fedora.  I believe this also happens with 8.02 on XP.

Code
-------------- Build: Linux-Debug in Build-tools ---------------

Linking stage skipped (build target has no object files to link)
Running project post-build steps
exe/revision -o ../revision.h -p ..
Running project pre-build steps
../build-tools/exe/schema-gen --make schema/schema.def --table schema/table.cpp --ids schema/ids.h
./schema/table.cpp: up to date
./schema/ids.h: up to date
Running project pre-build steps
../build-tools/exe/schema-gen --make schema/schema.def --table schema/table.cpp --ids schema/ids.h
./schema/table.cpp: up to date
./schema/ids.h: up to date

-------------- Build: Linux-Debug in simulator ---------------

g++ -O3 -Wall -fexceptions -ffast-math  -g -DENABLE_DEBUG_OUTPUT  -Wall   -I.. -I.  -c /home/ray/projects/vst/src/code/engine/main.cpp -o .o/debug/main.o


[attachment deleted by admin]