Skip to content

Batch build uses same settings for all configurations #993

@MaartenBent

Description

@MaartenBent

I have multiple c++ projects, each with multiple configurations. Batch Build dialog shows the following (which is correct):

P1|Debug_Win32
P1|Debug_x64
P1|Release_Win32
P1|Release_x64
P2|Debug_Win32
P2|Release_Win32
P3|Debug_Win32
P3|Debug_x64
P3|Release_Win32
P3|Release_x64

But when cleaning (or building) the wrong settings are used for some projects.
When cleaning, I get the following output:

C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P1.mk"  clean
----------Cleaning project:[ P1 - Debug_Win32 ]----------
rm -f -r build-gcc/Win32/temp/Release/P1/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P1.mk"  clean
----------Cleaning project:[ P1 - Debug_x64 ]----------
rm -f -r build-gcc/Win32/temp/Release/P1/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P1.mk"  clean
----------Cleaning project:[ P1 - Release_Win32 ]----------
rm -f -r build-gcc/Win32/temp/Release/P1/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P1.mk"  clean
----------Cleaning project:[ P1 - Release_x64 ]----------
rm -f -r build-gcc/Win32/temp/Release/P1/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P2.mk"  clean
----------Cleaning project:[ P2 - Debug_Win32 ]----------
rm -f -r build-gcc/Win32/temp/Release/P2/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P2.mk"  clean
----------Cleaning project:[ P2 - Release_Win32 ]----------
rm -f -r build-gcc/Win32/temp/Release/P2/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P3.mk"  clean
----------Cleaning project:[ P3 - Debug_Win32 ]----------
rm -f -r build-gcc/Win32/temp/Release/P3/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P3.mk"  clean
----------Cleaning project:[ P3 - Debug_x64 ]----------
rm -f -r build-gcc/Win32/temp/Release/P3/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P3.mk"  clean
----------Cleaning project:[ P3 - Release_Win32 ]----------
rm -f -r build-gcc/Win32/temp/Release/P3/
====0 errors, 0 warnings====
C:\WINDOWS\system32\cmd.exe /C C:/TDM-GCC-64/bin/mingw32-make.exe -j4 SHELL=cmd.exe -e -f  "P3.mk"  clean
----------Cleaning project:[ P3 - Release_x64 ]----------
rm -f -r build-gcc/Win32/temp/Release/P3/
====0 errors, 0 warnings====

It seems the selected build configuration is used for all configurations (Release_Win32 was selected in the workspace for the example above). The Win32 and Release parts in the path should be x64 and Debug for some of the projects, as specified in the general project settings. The same happens when building.

Small update:
When building, the correct parameters are used for all projects. Only the directories are incorrect.
I have set the Intermediate Folder to $(VS_IntDir), which is specified in the Environment as VS_IntDir=$(VS_ProjectDir)build-gcc/$(VS_Platform)/temp/$(VS_Configuration)/$(VS_ProjectName). So it seems like the environment variables are not updated for each build.
All environment variables for p1 Release_Win32:

VS_ProjectName=p1
VS_Configuration=Release
VS_Platform=Win32
VS_ProjectDir=$(WorkspacePath)
VS_IntDir=$(VS_ProjectDir)build-gcc/$(VS_Platform)/temp/$(VS_Configuration)/$(VS_ProjectName)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions