Teach COMPATIBLE_INTERFACE_* checks to use Help .rst documents
These checks want to know if named target properties are builtin, which is now known by checking the Help/prop_tgt directory. (Previously the check could be confused by a define_property call in the project.)
This commit is contained in:
parent
ec6df3675e
commit
b336a1ebe4
|
@ -6964,13 +6964,16 @@ void checkPropertyConsistency(cmTarget *depender, cmTarget *dependee,
|
||||||
|
|
||||||
std::vector<std::string> props;
|
std::vector<std::string> props;
|
||||||
cmSystemTools::ExpandListArgument(prop, props);
|
cmSystemTools::ExpandListArgument(prop, props);
|
||||||
|
std::string pdir =
|
||||||
|
dependee->GetMakefile()->GetRequiredDefinition("CMAKE_ROOT");
|
||||||
|
pdir += "/Help/prop_tgt/";
|
||||||
|
|
||||||
for(std::vector<std::string>::iterator pi = props.begin();
|
for(std::vector<std::string>::iterator pi = props.begin();
|
||||||
pi != props.end(); ++pi)
|
pi != props.end(); ++pi)
|
||||||
{
|
{
|
||||||
if (depender->GetMakefile()->GetCMakeInstance()
|
std::string pname = cmSystemTools::HelpFileName(*pi);
|
||||||
->IsPropertyDefined(pi->c_str(),
|
std::string pfile = pdir + pname + ".rst";
|
||||||
cmProperty::TARGET))
|
if(cmSystemTools::FileExists(pfile.c_str(), true))
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Target \"" << dependee->GetName() << "\" has property \""
|
e << "Target \"" << dependee->GetName() << "\" has property \""
|
||||||
|
|
Loading…
Reference in New Issue