0dfe395e3c
Allow setting build properties based on the features available for a target. The availability of features is determined at generate-time by evaluating the link implementation. Ensure that the <LANG>_STANDARD determined while evaluating COMPILE_FEATURES in the link implementation is not lower than that provided by the INTERFACE of the link implementation. This is similar to handling of transitive properties such as POSITION_INDEPENDENT_CODE.
22 lines
212 B
C++
22 lines
212 B
C++
|
|
#if !HAVE_OVERRIDE_CONTROL
|
|
#error "Expect override control feature"
|
|
#else
|
|
|
|
struct A
|
|
{
|
|
virtual int getA() { return 7; }
|
|
};
|
|
|
|
struct B final : A
|
|
{
|
|
int getA() override { return 42; }
|
|
};
|
|
|
|
#endif
|
|
|
|
int main()
|
|
{
|
|
|
|
}
|