mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
- add option to macro to specify for which backend this macro is intended
If the macro is for all backends, then you dont need to set this option However, if this macro is for gcc only then put an option, i.e.: <define name="__USE_W32API" backend="mingw" /> for msvc backend set backend="msvc" -Currently filtering is only implemented for msvc backend svn path=/trunk/; revision=27303
This commit is contained in:
@@ -195,6 +195,9 @@ MSVCBackend::_generate_vcproj ( const Module& module )
|
||||
const vector<Define*>& defs = data.defines;
|
||||
for ( i = 0; i < defs.size(); i++ )
|
||||
{
|
||||
if ( defs[i]->backend != "" && defs[i]->backend != "msvc" )
|
||||
continue;
|
||||
|
||||
if ( defs[i]->value[0] )
|
||||
common_defines.insert( defs[i]->name + "=" + defs[i]->value );
|
||||
else
|
||||
|
||||
@@ -44,13 +44,15 @@ Define::Define ( const Project& project,
|
||||
|
||||
Define::Define ( const Project& project,
|
||||
const Module* module,
|
||||
const std::string name_ )
|
||||
const std::string name_,
|
||||
const std::string backend_)
|
||||
: project(project),
|
||||
module(module),
|
||||
node(NULL)
|
||||
{
|
||||
name = name_;
|
||||
value = "";
|
||||
backend = backend_;
|
||||
}
|
||||
|
||||
Define::~Define ()
|
||||
@@ -62,9 +64,11 @@ Define::Initialize()
|
||||
{
|
||||
const XMLAttribute* att = node->GetAttribute ( "name", true );
|
||||
const XMLAttribute* empty = node->GetAttribute ( "empty", false );
|
||||
const XMLAttribute* bck = node->GetAttribute ( "backend", false );
|
||||
assert(att);
|
||||
name = att->value;
|
||||
value = node->value;
|
||||
value = node->value;
|
||||
if ( bck ) backend = bck->value;
|
||||
if( empty ) value = " ";
|
||||
}
|
||||
|
||||
|
||||
@@ -390,6 +390,7 @@ public:
|
||||
const XMLElement* node;
|
||||
std::string name;
|
||||
std::string value;
|
||||
std::string backend;
|
||||
|
||||
Define ( const Project& project,
|
||||
const XMLElement& defineNode );
|
||||
@@ -398,7 +399,8 @@ public:
|
||||
const XMLElement& defineNode );
|
||||
Define ( const Project& project,
|
||||
const Module* module,
|
||||
const std::string name_ );
|
||||
const std::string name_,
|
||||
const std::string backend_ = "" );
|
||||
~Define();
|
||||
void ProcessXML();
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user