Ignore compiler flags when generating resource macro

svn path=/trunk/; revision=29682
This commit is contained in:
Hervé Poussineau 2007-10-19 14:16:18 +00:00
parent e7d0bd05c2
commit 7e9e19c6f6
2 changed files with 21 additions and 12 deletions

View file

@ -766,12 +766,16 @@ MingwModuleHandler::GenerateMacro (
const char* assignmentOperation,
const string& macro,
const IfableData& data,
set<string> *used_defs )
set<string> *used_defs,
bool generatingCompilerMacro )
{
size_t i;
bool generateAssignment;
generateAssignment = (use_pch && module.pch != NULL ) || data.includes.size () > 0 || data.defines.size () > 0 || data.compilerFlags.size () > 0;
if ( generatingCompilerMacro )
generateAssignment = (use_pch && module.pch != NULL ) || data.includes.size () > 0 || data.defines.size () > 0 || data.compilerFlags.size () > 0;
else
generateAssignment = (use_pch && module.pch != NULL ) || data.includes.size () > 0 || data.defines.size () > 0;
if ( generateAssignment )
{
fprintf ( fMakefile,
@ -787,15 +791,17 @@ MingwModuleHandler::GenerateMacro (
backend->GetFullPath ( *GetPrecompiledHeaderFilename () ).c_str () );
}
string compilerParameters = GenerateCompilerParametersFromVector ( data.compilerFlags );
if ( compilerParameters.size () > 0 )
if ( generatingCompilerMacro )
{
fprintf (
fMakefile,
" %s",
compilerParameters.c_str () );
string compilerParameters = GenerateCompilerParametersFromVector ( data.compilerFlags );
if ( compilerParameters.size () > 0 )
{
fprintf (
fMakefile,
" %s",
compilerParameters.c_str () );
}
}
for ( i = 0; i < data.includes.size(); i++ )
{
const Include& include = *data.includes[i];
@ -845,11 +851,13 @@ MingwModuleHandler::GenerateMacros (
GenerateMacro ( assignmentOperation,
cflagsMacro,
data,
&used_defs );
&used_defs,
true );
GenerateMacro ( assignmentOperation,
windresflagsMacro,
data,
NULL );
NULL,
false );
if ( linkerFlags != NULL )
{

View file

@ -137,7 +137,8 @@ private:
void GenerateMacro ( const char* assignmentOperation,
const std::string& macro,
const IfableData& data,
std::set<std::string>* used_defs );
std::set<std::string>* used_defs,
bool generatingCompilerMacro );
void GenerateMacros ( const char* op,
const IfableData& data,
const std::vector<LinkerFlag*>* linkerFlags,