cmGeneratorTarget: Copy the policy map from the cmTarget.
This commit is contained in:
parent
c6e8695508
commit
d74bca5a8f
|
@ -308,6 +308,8 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
|
||||||
this->DLLPlatform = (this->Makefile->IsOn("WIN32") ||
|
this->DLLPlatform = (this->Makefile->IsOn("WIN32") ||
|
||||||
this->Makefile->IsOn("CYGWIN") ||
|
this->Makefile->IsOn("CYGWIN") ||
|
||||||
this->Makefile->IsOn("MINGW"));
|
this->Makefile->IsOn("MINGW"));
|
||||||
|
|
||||||
|
this->PolicyMap = t->PolicyMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmGeneratorTarget::~cmGeneratorTarget()
|
cmGeneratorTarget::~cmGeneratorTarget()
|
||||||
|
|
|
@ -33,6 +33,14 @@ public:
|
||||||
bool IsImported() const;
|
bool IsImported() const;
|
||||||
const char *GetLocation(const std::string& config) const;
|
const char *GetLocation(const std::string& config) const;
|
||||||
|
|
||||||
|
#define DECLARE_TARGET_POLICY(POLICY) \
|
||||||
|
cmPolicies::PolicyStatus GetPolicyStatus ## POLICY () const \
|
||||||
|
{ return this->PolicyMap.Get(cmPolicies::POLICY); }
|
||||||
|
|
||||||
|
CM_FOR_EACH_TARGET_POLICY(DECLARE_TARGET_POLICY)
|
||||||
|
|
||||||
|
#undef DECLARE_TARGET_POLICY
|
||||||
|
|
||||||
/** Get the location of the target in the build tree with a placeholder
|
/** Get the location of the target in the build tree with a placeholder
|
||||||
referencing the configuration in the native build system. This
|
referencing the configuration in the native build system. This
|
||||||
location is suitable for use as the LOCATION target property. */
|
location is suitable for use as the LOCATION target property. */
|
||||||
|
@ -641,6 +649,7 @@ private:
|
||||||
typedef std::map<OutputNameKey, std::string> OutputNameMapType;
|
typedef std::map<OutputNameKey, std::string> OutputNameMapType;
|
||||||
mutable OutputNameMapType OutputNameMap;
|
mutable OutputNameMapType OutputNameMap;
|
||||||
mutable std::set<cmLinkItem> UtilityItems;
|
mutable std::set<cmLinkItem> UtilityItems;
|
||||||
|
cmPolicies::PolicyMap PolicyMap;
|
||||||
mutable bool PolicyWarnedCMP0022;
|
mutable bool PolicyWarnedCMP0022;
|
||||||
mutable bool DebugIncludesDone;
|
mutable bool DebugIncludesDone;
|
||||||
mutable bool DebugCompileOptionsDone;
|
mutable bool DebugCompileOptionsDone;
|
||||||
|
|
|
@ -230,6 +230,23 @@ class cmPolicy;
|
||||||
#define CM_FOR_EACH_POLICY_ID(POLICY) \
|
#define CM_FOR_EACH_POLICY_ID(POLICY) \
|
||||||
CM_FOR_EACH_POLICY_TABLE(POLICY, CM_SELECT_ID)
|
CM_FOR_EACH_POLICY_TABLE(POLICY, CM_SELECT_ID)
|
||||||
|
|
||||||
|
#define CM_FOR_EACH_TARGET_POLICY(F) \
|
||||||
|
F(CMP0003) \
|
||||||
|
F(CMP0004) \
|
||||||
|
F(CMP0008) \
|
||||||
|
F(CMP0020) \
|
||||||
|
F(CMP0021) \
|
||||||
|
F(CMP0022) \
|
||||||
|
F(CMP0027) \
|
||||||
|
F(CMP0038) \
|
||||||
|
F(CMP0041) \
|
||||||
|
F(CMP0042) \
|
||||||
|
F(CMP0046) \
|
||||||
|
F(CMP0052) \
|
||||||
|
F(CMP0060) \
|
||||||
|
F(CMP0063) \
|
||||||
|
F(CMP0065)
|
||||||
|
|
||||||
|
|
||||||
/** \class cmPolicies
|
/** \class cmPolicies
|
||||||
* \brief Handles changes in CMake behavior and policies
|
* \brief Handles changes in CMake behavior and policies
|
||||||
|
|
|
@ -26,23 +26,6 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CM_FOR_EACH_TARGET_POLICY(F) \
|
|
||||||
F(CMP0003) \
|
|
||||||
F(CMP0004) \
|
|
||||||
F(CMP0008) \
|
|
||||||
F(CMP0020) \
|
|
||||||
F(CMP0021) \
|
|
||||||
F(CMP0022) \
|
|
||||||
F(CMP0027) \
|
|
||||||
F(CMP0038) \
|
|
||||||
F(CMP0041) \
|
|
||||||
F(CMP0042) \
|
|
||||||
F(CMP0046) \
|
|
||||||
F(CMP0052) \
|
|
||||||
F(CMP0060) \
|
|
||||||
F(CMP0063) \
|
|
||||||
F(CMP0065)
|
|
||||||
|
|
||||||
class cmake;
|
class cmake;
|
||||||
class cmMakefile;
|
class cmMakefile;
|
||||||
class cmSourceFile;
|
class cmSourceFile;
|
||||||
|
|
Loading…
Reference in New Issue