LINK_OPTIONS: Add new family of properties

This family enable to manage link flags

Three new properties:
* directory property: LINK_OPTIONS
* target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS

Two new commands
* add_link_options(): to populate directory property
* target_link_options(): to populate target properties

Fixes: #16543
This commit is contained in:
Marc Chevrier
2018-04-24 17:01:01 +02:00
parent 8e28d2630a
commit c1f5a44b28
84 changed files with 921 additions and 34 deletions
@@ -7,6 +7,7 @@
#include <sstream>
#include <utility>
#include "cmAlgorithms.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorExpressionDAGChecker.h"
#include "cmGeneratorTarget.h"
@@ -169,6 +170,11 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties(
end = "\\\n";
}
os << "\n";
} else if (property.first == "INTERFACE_LINK_OPTIONS") {
os << "LOCAL_EXPORT_LDFLAGS := ";
std::vector<std::string> linkFlagsList;
cmSystemTools::ExpandListArgument(property.second, linkFlagsList);
os << cmJoin(linkFlagsList, " ") << "\n";
} else {
os << "# " << property.first << " " << (property.second) << "\n";
}