1 # ------------------------------------------------------------------------
2 # Copyright 2015 Intel Corporation
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # ------------------------------------------------------------------------
17 from .configuration import Configuration
19 # Default (very simple) compiler configuration
20 class DefaultConfiguration(Configuration):
21 def __init__(self, context):
22 Configuration.__init__(self, context)
24 # ------------------------------------------------------------
25 # Return test program to be used when checking for basic C++11
27 # ------------------------------------------------------------
28 def _c99_test_program(self):
30 // Some headers found in C99.
40 uint64_t q; // C99 type
43 // Designated initializer.
44 struct foo bar = { .b = false, .q = UINT64_MAX };
46 // Implicitly initialized field.
51 # --------------------------------------------------------------
52 # Get list of flags that could potentially enable C99 support.
54 # The default configuration assumes that no flag is needed to
56 # --------------------------------------------------------------
60 # ------------------------------------------------------------
61 # Return test program to be used when checking for basic C++11
63 # ------------------------------------------------------------
64 def _cxx11_test_program(self):
77 # --------------------------------------------------------------
78 # Get list of flags that could potentially enable C++11 support.
80 # The default configuration assumes that no flag is needed to
81 # enable C++11 support.
82 # --------------------------------------------------------------
83 def _cxx11_flags(self):