mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Added -fvisibility=hidden parameter for gcc.
Should help a bit with endless missing DLL_LINKAGE attributes and (according to gcc docs) help a bit with library loading times.
This commit is contained in:
parent
db49798b4d
commit
13bc4cb24f
@ -100,9 +100,14 @@ endif()
|
|||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX OR NOT WIN32) #so far all *nix compilers support such parameters
|
if(CMAKE_COMPILER_IS_GNUCXX OR NOT WIN32) #so far all *nix compilers support such parameters
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set(CLANG_SPECIFIC_FLAGS "-Wno-mismatched-tags")
|
set(CLANG_SPECIFIC_FLAGS "-Wno-mismatched-tags")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wextra -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter -Wuninitialized -Wno-overloaded-virtual ${CLANG_SPECIFIC_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wextra -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter -Wuninitialized -Wno-overloaded-virtual ${CLANG_SPECIFIC_FLAGS}")
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32) # on Win everything goes into H3 root directory
|
if(WIN32) # on Win everything goes into H3 root directory
|
||||||
|
@ -1527,7 +1527,7 @@ struct ObstaclesRemoved : public CPackForClient //3014
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CatapultAttack : public CPackForClient //3015
|
struct DLL_LINKAGE CatapultAttack : public CPackForClient //3015
|
||||||
{
|
{
|
||||||
struct AttackInfo
|
struct AttackInfo
|
||||||
{
|
{
|
||||||
@ -1543,8 +1543,7 @@ struct CatapultAttack : public CPackForClient //3015
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
DLL_LINKAGE CatapultAttack();
|
CatapultAttack() {type = 3015;}
|
||||||
DLL_LINKAGE ~CatapultAttack();
|
|
||||||
|
|
||||||
DLL_LINKAGE void applyGs(CGameState *gs);
|
DLL_LINKAGE void applyGs(CGameState *gs);
|
||||||
void applyCl(CClient *cl);
|
void applyCl(CClient *cl);
|
||||||
|
@ -25,7 +25,7 @@ struct ArtSlotInfo;
|
|||||||
#include "GameConstants.h"
|
#include "GameConstants.h"
|
||||||
|
|
||||||
|
|
||||||
struct CPack
|
struct DLL_LINKAGE CPack
|
||||||
{
|
{
|
||||||
ui16 type;
|
ui16 type;
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ struct CPack
|
|||||||
logNetwork->errorStream() << "CPack serialized... this should not happen!";
|
logNetwork->errorStream() << "CPack serialized... this should not happen!";
|
||||||
}
|
}
|
||||||
void applyGs(CGameState *gs) { }
|
void applyGs(CGameState *gs) { }
|
||||||
virtual std::string toString() const { return boost::str(boost::format("{CPack: type '%d'}") % type); }
|
DLL_LINKAGE virtual std::string toString() const { return boost::str(boost::format("{CPack: type '%d'}") % type); }
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream & operator<<(std::ostream & out, const CPack * pack);
|
std::ostream & operator<<(std::ostream & out, const CPack * pack);
|
||||||
@ -197,4 +197,4 @@ struct ArtifactLocation
|
|||||||
{
|
{
|
||||||
h & artHolder & slot;
|
h & artHolder & slot;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1495,16 +1495,6 @@ DLL_LINKAGE void ObstaclesRemoved::applyGs( CGameState *gs )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_LINKAGE CatapultAttack::CatapultAttack()
|
|
||||||
{
|
|
||||||
type = 3015;
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_LINKAGE CatapultAttack::~CatapultAttack()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
DLL_LINKAGE void CatapultAttack::applyGs( CGameState *gs )
|
DLL_LINKAGE void CatapultAttack::applyGs( CGameState *gs )
|
||||||
{
|
{
|
||||||
if(gs->curB && gs->curB->siege != CGTownInstance::NONE) //if there is a battle and it's a siege
|
if(gs->curB && gs->curB->siege != CGTownInstance::NONE) //if there is a battle and it's a siege
|
||||||
|
@ -23,28 +23,28 @@ class CStackBasicDescriptor;
|
|||||||
|
|
||||||
namespace JsonRandom
|
namespace JsonRandom
|
||||||
{
|
{
|
||||||
struct RandomStackInfo
|
struct DLL_LINKAGE RandomStackInfo
|
||||||
{
|
{
|
||||||
std::vector<const CCreature *> allowedCreatures;
|
std::vector<const CCreature *> allowedCreatures;
|
||||||
si32 minAmount;
|
si32 minAmount;
|
||||||
si32 maxAmount;
|
si32 maxAmount;
|
||||||
};
|
};
|
||||||
|
|
||||||
si32 loadValue(const JsonNode & value, CRandomGenerator & rng, si32 defaultValue = 0);
|
DLL_LINKAGE si32 loadValue(const JsonNode & value, CRandomGenerator & rng, si32 defaultValue = 0);
|
||||||
TResources loadResources(const JsonNode & value, CRandomGenerator & rng);
|
DLL_LINKAGE TResources loadResources(const JsonNode & value, CRandomGenerator & rng);
|
||||||
std::vector<si32> loadPrimary(const JsonNode & value, CRandomGenerator & rng);
|
DLL_LINKAGE std::vector<si32> loadPrimary(const JsonNode & value, CRandomGenerator & rng);
|
||||||
std::map<SecondarySkill, si32> loadSecondary(const JsonNode & value, CRandomGenerator & rng);
|
DLL_LINKAGE std::map<SecondarySkill, si32> loadSecondary(const JsonNode & value, CRandomGenerator & rng);
|
||||||
|
|
||||||
ArtifactID loadArtifact(const JsonNode & value, CRandomGenerator & rng);
|
DLL_LINKAGE ArtifactID loadArtifact(const JsonNode & value, CRandomGenerator & rng);
|
||||||
std::vector<ArtifactID> loadArtifacts(const JsonNode & value, CRandomGenerator & rng);
|
DLL_LINKAGE std::vector<ArtifactID> loadArtifacts(const JsonNode & value, CRandomGenerator & rng);
|
||||||
|
|
||||||
SpellID loadSpell(const JsonNode & value, CRandomGenerator & rng, std::vector<SpellID> spells);
|
DLL_LINKAGE SpellID loadSpell(const JsonNode & value, CRandomGenerator & rng, std::vector<SpellID> spells);
|
||||||
std::vector<SpellID> loadSpells(const JsonNode & value, CRandomGenerator & rng, std::vector<SpellID> spells);
|
DLL_LINKAGE std::vector<SpellID> loadSpells(const JsonNode & value, CRandomGenerator & rng, std::vector<SpellID> spells);
|
||||||
|
|
||||||
CStackBasicDescriptor loadCreature(const JsonNode & value, CRandomGenerator & rng);
|
DLL_LINKAGE CStackBasicDescriptor loadCreature(const JsonNode & value, CRandomGenerator & rng);
|
||||||
std::vector<CStackBasicDescriptor> loadCreatures(const JsonNode & value, CRandomGenerator & rng);
|
DLL_LINKAGE std::vector<CStackBasicDescriptor> loadCreatures(const JsonNode & value, CRandomGenerator & rng);
|
||||||
std::vector<RandomStackInfo> evaluateCreatures(const JsonNode & value);
|
DLL_LINKAGE std::vector<RandomStackInfo> evaluateCreatures(const JsonNode & value);
|
||||||
|
|
||||||
std::vector<Bonus> loadBonuses(const JsonNode & value);
|
DLL_LINKAGE std::vector<Bonus> loadBonuses(const JsonNode & value);
|
||||||
std::vector<Component> loadComponents(const JsonNode & value);
|
DLL_LINKAGE std::vector<Component> loadComponents(const JsonNode & value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user