From 9ae4897cfe935598333a5f709e967fefc4c161aa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 31 May 2017 16:35:50 +0200 Subject: C++ modules work: add target types --- build2/cc/utility.ixx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'build2/cc/utility.ixx') diff --git a/build2/cc/utility.ixx b/build2/cc/utility.ixx index bc9cd05..b15791a 100644 --- a/build2/cc/utility.ixx +++ b/build2/cc/utility.ixx @@ -7,20 +7,24 @@ namespace build2 namespace cc { inline otype - compile_type (const target& t) + compile_type (const target& t, bool mod) { + using namespace bin; + return - t.is_a () ? otype::e : - t.is_a () ? otype::a : + t.is_a (mod ? bmie::static_type : obje::static_type) ? otype::e : + t.is_a (mod ? bmia::static_type : obja::static_type) ? otype::a : otype::s; } inline otype link_type (const target& t) { + using namespace bin; + return - t.is_a () ? otype::e : - t.is_a () ? otype::a : + t.is_a () ? otype::e : + t.is_a () ? otype::a : otype::s; } } -- cgit v1.1