add_subdirectory: Run subdirectory install rules in correct order

Before this change, install rules created by add_subdirectory()
would be executed after all of the top-level install rules, even
if they were declared before the top-level rules. This change
adds a new policy, CMP0082, which interleaves the add_subdirectory()
install rules with the other install rules so they are run in the
correct order.
This commit is contained in:
Kyle Edwards
2018-10-02 16:38:26 -04:00
parent 514f0b572e
commit fc8955e889
14 changed files with 235 additions and 19 deletions
+2 -2
View File
@@ -37,9 +37,9 @@ void cmInstallScriptGenerator::AddScriptInstallRule(std::ostream& os,
std::string const& script)
{
if (this->Code) {
os << indent.Next() << script << "\n";
os << indent << script << "\n";
} else {
os << indent.Next() << "include(\"" << script << "\")\n";
os << indent << "include(\"" << script << "\")\n";
}
}