Override make/gcc/g++ from workspace
Posted: Wed Sep 03, 2008 12:33 pm
Hello,
I wonder if it is possible to override the GCC/G++ compiler used from the workspace environment variable or better, from the project settings (which depend on the current configuration)
I would like to have a workspace that contains projects with the configurations :
x86 debug
x86 release
amd64 debug
amd64 release
and x86 and amd64 have different compilers.
it is almost possible, by setting the following env variables :
but the problem is that the definition is overriden in the makefile :
Any idea ?
I think that the easiest would be to add a setting for it in the project, like this :
Also, the make command is "special" for me, I wonder if there could be a setting for it also ?
I can dig in the code if necessary
I wonder if it is possible to override the GCC/G++ compiler used from the workspace environment variable or better, from the project settings (which depend on the current configuration)
I would like to have a workspace that contains projects with the configurations :
x86 debug
x86 release
amd64 debug
amd64 release
and x86 and amd64 have different compilers.
it is almost possible, by setting the following env variables :
Code: Select all
DebugLinkerName g++.exe
LinkerName $($(ConfigurationName)LinkerName)
but the problem is that the definition is overriden in the makefile :
Code: Select all
##
## Auto Generated makefile, please do not edit
##
DebugLinkerName:=g++-1
LinkerName:=$($(ConfigurationName)Linkername)
ProjectName:=test
## Debug
ifeq ($(type),Debug)
ConfigurationName :=Debug
IntermediateDirectory :=./Debug
OutDir := $(IntermediateDirectory)
LinkerName:=g++
...
I think that the easiest would be to add a setting for it in the project, like this :
Code: Select all
<Compiler Required="yes" Options="-g" Path="toolchains/x86/bin/g++.exe">
<IncludePath Value="."/>
</Compiler>
I can dig in the code if necessary