summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkItem.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLinkItem.cxx')
-rw-r--r--Source/cmLinkItem.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmLinkItem.cxx b/Source/cmLinkItem.cxx
index 4e50d70..62e7ef4 100644
--- a/Source/cmLinkItem.cxx
+++ b/Source/cmLinkItem.cxx
@@ -32,7 +32,11 @@ bool operator<(cmLinkItem const& l, cmLinkItem const& r)
{
// Order among targets.
if (l.Target && r.Target) {
- return l.Target < r.Target;
+ if (l.Target != r.Target) {
+ return l.Target < r.Target;
+ }
+ // Order identical targets via cross-config.
+ return l.Cross < r.Cross;
}
// Order targets before strings.
if (l.Target) {
@@ -42,10 +46,10 @@ bool operator<(cmLinkItem const& l, cmLinkItem const& r)
return false;
}
// Order among strings.
- if (l.String < r.String) {
- return true;
+ if (l.String != r.String) {
+ return l.String < r.String;
}
- // Order among cross-config.
+ // Order identical strings via cross-config.
return l.Cross < r.Cross;
}