aboutsummaryrefslogtreecommitdiff
path: root/butl/triplet.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-03-10 10:04:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-03-10 10:04:43 +0200
commita9844a31c639ed5e0c8efee92d644557b8410429 (patch)
tree938dbdcd635082d1c4c6140d54bc500cb7baa086 /butl/triplet.cxx
parentb211edb78d90939eefd6e784c940c9a6ad9ccc2f (diff)
Derive target class from target triplet for some targets
Diffstat (limited to 'butl/triplet.cxx')
-rw-r--r--butl/triplet.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/butl/triplet.cxx b/butl/triplet.cxx
index 8369539..39057a3 100644
--- a/butl/triplet.cxx
+++ b/butl/triplet.cxx
@@ -103,7 +103,7 @@ namespace butl
*c += system;
}
- // Finally, extract VERSION for some recognized systems.
+ // Extract VERSION for some recognized systems.
//
string::size_type v (0);
if (system.compare (0, (v = 6), "darwin") == 0 ||
@@ -118,5 +118,18 @@ namespace butl
version.assign (system, v, string::npos);
system.resize (system.size () - version.size ());
}
+
+ // Determine class for some recognized systems.
+ //
+ if (system.compare (0, 5, "linux") == 0)
+ class_ = "linux";
+ else if (vendor == "apple" && system == "darwin")
+ class_ = "macosx";
+ else if (system == "freebsd")
+ class_ = "freebsd";
+ else if (system.compare (0, 5, "win32") == 0 || system == "mingw32")
+ class_ = "windows";
+ else
+ class_ = "other";
}
}