Exemple #1
0
def get_fake_env(sdir='', bdir=None, prefix='', opts=None):
    if opts is None:
        opts = get_fake_options(prefix)
    env = Environment(sdir, bdir, opts)
    env.coredata.compiler_options.host['c']['args'] = FakeCompilerOptions()
    env.machines.host.cpu_family = 'x86_64' # Used on macOS inside find_library
    return env
Exemple #2
0
 def test_compiler_cpp_stds(self):
     '''
     Test that C++ stds specified for this compiler can all be used. Can't
     be an ordinary test because it requires passing options to meson.
     '''
     testdir = os.path.join(self.common_test_dir, '2 cpp')
     env = Environment(testdir, self.builddir, self.meson_command,
                       get_fake_options(), [])
     cpp = env.detect_cpp_compiler(False)
     self._test_stds_impl(testdir, cpp, 'cpp')
Exemple #3
0
def get_fake_env(sdir, bdir, prefix):
    env = Environment(sdir, bdir, get_fake_options(prefix))
    env.coredata.compiler_options['c_args'] = FakeCompilerOptions()
    return env
Exemple #4
0
def get_fake_env(sdir, bdir, prefix, opts=None):
    if opts is None:
        opts = get_fake_options(prefix)
    env = Environment(sdir, bdir, opts)
    env.coredata.compiler_options['c_args'] = FakeCompilerOptions()
    return env