Imported Upstream version 2.8.11
This commit is contained in:
parent
605faadf5a
commit
8bad2bfad4
@ -1,3 +1,17 @@
|
|||||||
|
Changes in CMake 2.8.11 (since 2.8.11-rc4)
|
||||||
|
----------------------------------------
|
||||||
|
None
|
||||||
|
|
||||||
|
Changes in CMake 2.8.11-rc4 (since 2.8.11-rc3)
|
||||||
|
----------------------------------------------
|
||||||
|
Brad King (1):
|
||||||
|
target_link_libraries: Update usage requirements documentation
|
||||||
|
|
||||||
|
Stephen Kelly (3):
|
||||||
|
Centralize maintenance of usage requirement include directories
|
||||||
|
Fix include dir propagation from conditionally linked targets
|
||||||
|
Memoize usage requirement include directories in a config-specific map
|
||||||
|
|
||||||
Changes in CMake 2.8.11-rc3 (since 2.8.11-rc2)
|
Changes in CMake 2.8.11-rc3 (since 2.8.11-rc2)
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
Brad King (1):
|
Brad King (1):
|
||||||
|
@ -3,4 +3,4 @@ set(CMake_VERSION_MAJOR 2)
|
|||||||
set(CMake_VERSION_MINOR 8)
|
set(CMake_VERSION_MINOR 8)
|
||||||
set(CMake_VERSION_PATCH 11)
|
set(CMake_VERSION_PATCH 11)
|
||||||
set(CMake_VERSION_TWEAK 0)
|
set(CMake_VERSION_TWEAK 0)
|
||||||
set(CMake_VERSION_RC 3)
|
#set(CMake_VERSION_RC 0)
|
||||||
|
@ -142,7 +142,7 @@ public:
|
|||||||
std::vector<IncludeDirectoriesEntry*> IncludeDirectoriesEntries;
|
std::vector<IncludeDirectoriesEntry*> IncludeDirectoriesEntries;
|
||||||
std::vector<cmValueWithOrigin> LinkInterfaceIncludeDirectoriesEntries;
|
std::vector<cmValueWithOrigin> LinkInterfaceIncludeDirectoriesEntries;
|
||||||
|
|
||||||
std::vector<IncludeDirectoriesEntry*>
|
std::map<std::string, std::vector<IncludeDirectoriesEntry*> >
|
||||||
CachedLinkInterfaceIncludeDirectoriesEntries;
|
CachedLinkInterfaceIncludeDirectoriesEntries;
|
||||||
std::map<std::string, std::string> CachedLinkInterfaceCompileDefinitions;
|
std::map<std::string, std::string> CachedLinkInterfaceCompileDefinitions;
|
||||||
|
|
||||||
@ -164,6 +164,19 @@ void deleteAndClear(
|
|||||||
entries.clear();
|
entries.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void deleteAndClear(
|
||||||
|
std::map<std::string,
|
||||||
|
std::vector<cmTargetInternals::IncludeDirectoriesEntry*> > &entries)
|
||||||
|
{
|
||||||
|
for (std::map<std::string,
|
||||||
|
std::vector<cmTargetInternals::IncludeDirectoriesEntry*> >::iterator
|
||||||
|
it = entries.begin(), end = entries.end(); it != end; ++it)
|
||||||
|
{
|
||||||
|
deleteAndClear(it->second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmTargetInternals::~cmTargetInternals()
|
cmTargetInternals::~cmTargetInternals()
|
||||||
{
|
{
|
||||||
@ -2706,6 +2719,19 @@ void cmTarget::SetProperty(const char* prop, const char* value)
|
|||||||
new cmTargetInternals::IncludeDirectoriesEntry(cge));
|
new cmTargetInternals::IncludeDirectoriesEntry(cge));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (strcmp(prop, "LINK_LIBRARIES") == 0)
|
||||||
|
{
|
||||||
|
this->Internal->LinkInterfaceIncludeDirectoriesEntries.clear();
|
||||||
|
if (cmGeneratorExpression::IsValidTargetName(value)
|
||||||
|
|| cmGeneratorExpression::Find(value) != std::string::npos)
|
||||||
|
{
|
||||||
|
cmListFileBacktrace lfbt;
|
||||||
|
this->Makefile->GetBacktrace(lfbt);
|
||||||
|
cmValueWithOrigin entry(value, lfbt);
|
||||||
|
this->Internal->LinkInterfaceIncludeDirectoriesEntries.push_back(entry);
|
||||||
|
}
|
||||||
|
// Fall through
|
||||||
|
}
|
||||||
this->Properties.SetProperty(prop, value, cmProperty::TARGET);
|
this->Properties.SetProperty(prop, value, cmProperty::TARGET);
|
||||||
this->MaybeInvalidatePropertyCache(prop);
|
this->MaybeInvalidatePropertyCache(prop);
|
||||||
}
|
}
|
||||||
@ -2727,6 +2753,18 @@ void cmTarget::AppendProperty(const char* prop, const char* value,
|
|||||||
new cmTargetInternals::IncludeDirectoriesEntry(ge.Parse(value)));
|
new cmTargetInternals::IncludeDirectoriesEntry(ge.Parse(value)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (strcmp(prop, "LINK_LIBRARIES") == 0)
|
||||||
|
{
|
||||||
|
if (cmGeneratorExpression::IsValidTargetName(value)
|
||||||
|
|| cmGeneratorExpression::Find(value) != std::string::npos)
|
||||||
|
{
|
||||||
|
cmListFileBacktrace lfbt;
|
||||||
|
this->Makefile->GetBacktrace(lfbt);
|
||||||
|
cmValueWithOrigin entry(value, lfbt);
|
||||||
|
this->Internal->LinkInterfaceIncludeDirectoriesEntries.push_back(entry);
|
||||||
|
}
|
||||||
|
// Fall through
|
||||||
|
}
|
||||||
this->Properties.AppendProperty(prop, value, cmProperty::TARGET, asString);
|
this->Properties.AppendProperty(prop, value, cmProperty::TARGET, asString);
|
||||||
this->MaybeInvalidatePropertyCache(prop);
|
this->MaybeInvalidatePropertyCache(prop);
|
||||||
}
|
}
|
||||||
@ -2762,12 +2800,6 @@ void cmTarget::AppendBuildInterfaceIncludes()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
void cmTarget::AppendTllInclude(const cmValueWithOrigin &entry)
|
|
||||||
{
|
|
||||||
this->Internal->LinkInterfaceIncludeDirectoriesEntries.push_back(entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmTarget::InsertInclude(const cmValueWithOrigin &entry,
|
void cmTarget::InsertInclude(const cmValueWithOrigin &entry,
|
||||||
bool before)
|
bool before)
|
||||||
@ -2939,25 +2971,33 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
|
|||||||
ge.Parse(it->Value);
|
ge.Parse(it->Value);
|
||||||
std::string result = cge->Evaluate(this->Makefile, config,
|
std::string result = cge->Evaluate(this->Makefile, config,
|
||||||
false, this, 0, 0);
|
false, this, 0, 0);
|
||||||
if (!cmGeneratorExpression::IsValidTargetName(result.c_str())
|
if (!this->Makefile->FindTargetToUse(result.c_str()))
|
||||||
|| !this->Makefile->FindTargetToUse(result.c_str()))
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::string includeGenex = "$<TARGET_PROPERTY:" +
|
||||||
|
it->Value + ",INTERFACE_INCLUDE_DIRECTORIES>";
|
||||||
|
if (cmGeneratorExpression::Find(it->Value) != std::string::npos)
|
||||||
|
{
|
||||||
|
// Because it->Value is a generator expression, ensure that it
|
||||||
|
// evaluates to the non-empty string before being used in the
|
||||||
|
// TARGET_PROPERTY expression.
|
||||||
|
includeGenex = "$<$<BOOL:" + it->Value + ">:" + includeGenex + ">";
|
||||||
|
}
|
||||||
cmGeneratorExpression ge(it->Backtrace);
|
cmGeneratorExpression ge(it->Backtrace);
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(
|
||||||
"$<TARGET_PROPERTY:" +
|
includeGenex);
|
||||||
it->Value + ",INTERFACE_INCLUDE_DIRECTORIES>");
|
|
||||||
|
|
||||||
this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries.push_back(
|
this->Internal
|
||||||
|
->CachedLinkInterfaceIncludeDirectoriesEntries[configString].push_back(
|
||||||
new cmTargetInternals::IncludeDirectoriesEntry(cge,
|
new cmTargetInternals::IncludeDirectoriesEntry(cge,
|
||||||
it->Value));
|
it->Value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processIncludeDirectories(this,
|
processIncludeDirectories(this,
|
||||||
this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries,
|
this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries[configString],
|
||||||
includes,
|
includes,
|
||||||
uniqueIncludes,
|
uniqueIncludes,
|
||||||
&dagChecker,
|
&dagChecker,
|
||||||
@ -2967,7 +3007,7 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
|
|||||||
if (!this->Makefile->IsGeneratingBuildSystem())
|
if (!this->Makefile->IsGeneratingBuildSystem())
|
||||||
{
|
{
|
||||||
deleteAndClear(
|
deleteAndClear(
|
||||||
this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries);
|
this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -495,7 +495,6 @@ public:
|
|||||||
std::vector<std::string> GetIncludeDirectories(const char *config);
|
std::vector<std::string> GetIncludeDirectories(const char *config);
|
||||||
void InsertInclude(const cmValueWithOrigin &entry,
|
void InsertInclude(const cmValueWithOrigin &entry,
|
||||||
bool before = false);
|
bool before = false);
|
||||||
void AppendTllInclude(const cmValueWithOrigin &entry);
|
|
||||||
|
|
||||||
void AppendBuildInterfaceIncludes();
|
void AppendBuildInterfaceIncludes();
|
||||||
|
|
||||||
|
@ -259,14 +259,6 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
|
|||||||
// Handle normal case first.
|
// Handle normal case first.
|
||||||
if(this->CurrentProcessingState != ProcessingLinkInterface)
|
if(this->CurrentProcessingState != ProcessingLinkInterface)
|
||||||
{
|
{
|
||||||
{
|
|
||||||
cmListFileBacktrace lfbt;
|
|
||||||
this->Makefile->GetBacktrace(lfbt);
|
|
||||||
cmValueWithOrigin entry(this->Target->GetDebugGeneratorExpressions(lib,
|
|
||||||
llt),
|
|
||||||
lfbt);
|
|
||||||
this->Target->AppendTllInclude(entry);
|
|
||||||
}
|
|
||||||
this->Makefile
|
this->Makefile
|
||||||
->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
|
->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
|
||||||
if (this->CurrentProcessingState != ProcessingPublicInterface)
|
if (this->CurrentProcessingState != ProcessingPublicInterface)
|
||||||
|
@ -97,14 +97,17 @@ public:
|
|||||||
"Calls to other signatures of this command may set the property "
|
"Calls to other signatures of this command may set the property "
|
||||||
"making any libraries linked exclusively by this signature private."
|
"making any libraries linked exclusively by this signature private."
|
||||||
"\n"
|
"\n"
|
||||||
"Target usage requirements are also consumed by this command. If the "
|
"CMake will also propagate \"usage requirements\" from linked library "
|
||||||
"<target> is linked to another target which has "
|
"targets. "
|
||||||
"a populated INTERFACE_INCLUDE_DIRECTORIES, the content of it is "
|
"Usage requirements affect compilation of sources in the <target>. "
|
||||||
"appended to the INCLUDE_DIRECTORIES of <target>. Similarly, the "
|
"They are specified by properties defined on linked targets. "
|
||||||
"INTERFACE_COMPILE_DEFINITONS of a dependee are added to the "
|
"During generation of the build system, CMake integrates "
|
||||||
"COMPILE_DEFINITONS of <target>, and the "
|
"usage requirement property values with the corresponding "
|
||||||
"INTERFACE_POSITION_INDEPENDENT_CODE property is used to determine the "
|
"build properties for <target>:\n"
|
||||||
"POSITION_INDEPENDENT_CODE property of <target>."
|
" INTERFACE_COMPILE_DEFINITONS: Appends to COMPILE_DEFINITONS\n"
|
||||||
|
" INTERFACE_INCLUDE_DIRECTORIES: Appends to INCLUDE_DIRECTORIES\n"
|
||||||
|
" INTERFACE_POSITION_INDEPENDENT_CODE: Sets POSITION_INDEPENDENT_CODE\n"
|
||||||
|
" or checked for consistency with existing value\n"
|
||||||
"\n"
|
"\n"
|
||||||
" target_link_libraries(<target> LINK_INTERFACE_LIBRARIES\n"
|
" target_link_libraries(<target> LINK_INTERFACE_LIBRARIES\n"
|
||||||
" [[debug|optimized|general] <lib>] ...)\n"
|
" [[debug|optimized|general] <lib>] ...)\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user