Now this seems strange:
I've setup a simple console project with a "Release" and "Debug" target. I've attached build scripts to the project and both targets (thus, 3 scripts) and batch files as pre- and post-build steps to the project and both targets (thus 6 batch files). All of them simply write to the BuildLog a message (e.g. "Project.Post.Batch" for the project's post batch file). Now look at the attached output what happens if I compile The target "All" -> which includes "Debug" and "Release":
-------------- Build: Debug in MyCon ---------------
Project.Script.SetBuildOptions
Target.Script.Debug.SetBuildOptions
Target.Script.Debug.UnsetBuildOptions
Target.Script.Release.SetBuildOptions
Target.Script.Release.UnsetBuildOptions
Project.Script.UnsetBuildOptions
Project.Script.SetBuildOptions
Target.Script.Debug.SetBuildOptions
Target.Script.Debug.UnsetBuildOptions
Target.Script.Release.SetBuildOptions
Target.Script.Release.UnsetBuildOptions
Project.Script.UnsetBuildOptions
Running project pre-build steps
project_pre.bat
"Project.Pre.Batch"
Running target pre-build steps
target_debug_pre.bat
"Target.Debug.Pre.Batch"
mingw32-g++.exe -Wall -g -ID:\Devel\GCC345\include -c main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LD:\Devel\GCC345\lib -o .\MyCon.exe obj\Debug\main.o
Running target post-build steps
target_debug_post.bat
"Target.Debug.Post.Batch"
-------------- Build: Release in MyCon ---------------
Running target pre-build steps
target_release_pre.bat
"Target.Release.Pre.Batch"
mingw32-g++.exe -Wall -O2 -s -ID:\Devel\GCC345\include -c main.cpp -o obj\Release\main.o
mingw32-g++.exe -LD:\Devel\GCC345\lib -o .\MyCond.exe obj\Release\main.o
Running target post-build steps
target_release_post.bat
"Target.Release.Post.Batch"
Running project post-build steps
project_post.bat
"Project.Post.Batch"
Project.Script.SetBuildOptions
Target.Script.Debug.SetBuildOptions
Target.Script.Debug.UnsetBuildOptions
Target.Script.Release.SetBuildOptions
Target.Script.Release.UnsetBuildOptions
Project.Script.UnsetBuildOptions
Project.Script.SetBuildOptions
Target.Script.Debug.SetBuildOptions
Target.Script.Debug.UnsetBuildOptions
Target.Script.Release.SetBuildOptions
Target.Script.Release.UnsetBuildOptions
Project.Script.UnsetBuildOptions
Process terminated with status 0 (0 minutes, 4 seconds)
0 errors, 0 warnings
Does this order make any sense, or is the output to the log time-shifted for some reason?!
With regards, Morten.
Ps.: I've attached the project for your reference...
[attachment deleted by admin]