aboutsummaryrefslogtreecommitdiff
path: root/build/cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-01 13:39:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-01 13:42:10 +0200
commit7996c2bfc2d7e998e2f9f1236d457ec7bea8ad8a (patch)
treedca79d3657bec47d4cd5db85899a70d3d49c079e /build/cxx
parentf355a4379f035df61a7702f5ff805eefb004fb20 (diff)
Implement support for definition target type aliases
For example: define cli=file Currently, the semantics is that of a real alias with only name differences that are used for display. See tests/define/buildfile for more use cases.
Diffstat (limited to 'build/cxx')
-rw-r--r--build/cxx/target12
-rw-r--r--build/cxx/target.cxx18
2 files changed, 18 insertions, 12 deletions
diff --git a/build/cxx/target b/build/cxx/target
index bcc5ff1..fe27c79 100644
--- a/build/cxx/target
+++ b/build/cxx/target
@@ -17,8 +17,8 @@ namespace build
using file::file;
public:
- virtual const target_type& type () const {return static_type;}
static const target_type static_type;
+ virtual const target_type& dynamic_type () const {return static_type;}
};
class ixx: public file
@@ -27,8 +27,8 @@ namespace build
using file::file;
public:
- virtual const target_type& type () const {return static_type;}
static const target_type static_type;
+ virtual const target_type& dynamic_type () const {return static_type;}
};
class txx: public file
@@ -37,8 +37,8 @@ namespace build
using file::file;
public:
- virtual const target_type& type () const {return static_type;}
static const target_type static_type;
+ virtual const target_type& dynamic_type () const {return static_type;}
};
class cxx: public file
@@ -47,8 +47,8 @@ namespace build
using file::file;
public:
- virtual const target_type& type () const {return static_type;}
static const target_type static_type;
+ virtual const target_type& dynamic_type () const {return static_type;}
};
//@@ TMP
@@ -59,8 +59,8 @@ namespace build
using file::file;
public:
- virtual const target_type& type () const {return static_type;}
static const target_type static_type;
+ virtual const target_type& dynamic_type () const {return static_type;}
};
class c: public file
@@ -69,8 +69,8 @@ namespace build
using file::file;
public:
- virtual const target_type& type () const {return static_type;}
static const target_type static_type;
+ virtual const target_type& dynamic_type () const {return static_type;}
};
}
}
diff --git a/build/cxx/target.cxx b/build/cxx/target.cxx
index c23fdd0..e3d98e7 100644
--- a/build/cxx/target.cxx
+++ b/build/cxx/target.cxx
@@ -19,7 +19,8 @@ namespace build
&target_factory<hxx>,
&target_extension_var<hxx_ext_var>,
&search_file,
- false
+ false,
+ nullptr
};
constexpr const char ixx_ext_var[] = "ixx.ext";
@@ -31,7 +32,8 @@ namespace build
&target_factory<ixx>,
&target_extension_var<ixx_ext_var>,
&search_file,
- false
+ false,
+ nullptr
};
constexpr const char txx_ext_var[] = "txx.ext";
@@ -43,7 +45,8 @@ namespace build
&target_factory<txx>,
&target_extension_var<txx_ext_var>,
&search_file,
- false
+ false,
+ nullptr
};
constexpr const char cxx_ext_var[] = "cxx.ext";
@@ -55,7 +58,8 @@ namespace build
&target_factory<cxx>,
&target_extension_var<cxx_ext_var>,
&search_file,
- false
+ false,
+ nullptr
};
constexpr const char h_ext_var[] = "h.ext";
@@ -67,7 +71,8 @@ namespace build
&target_factory<h>,
&target_extension_var<h_ext_var>,
&search_file,
- false
+ false,
+ nullptr
};
constexpr const char c_ext_var[] = "c.ext";
@@ -79,7 +84,8 @@ namespace build
&target_factory<c>,
&target_extension_var<c_ext_var>,
&search_file,
- false
+ false,
+ nullptr
};
}
}