forked from pool/meson
This commit is contained in:
parent
b996db9e9e
commit
ccb7495013
@ -4,15 +4,15 @@
|
|||||||
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
|
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
|
||||||
|
|
||||||
def get_options(self):
|
def get_options(self):
|
||||||
+ c_stds = ['c++98', 'c++03', 'c++11']
|
+ cpp_stds = ['c++98', 'c++03', 'c++11', 'gnu++03', 'gnu++11']
|
||||||
+ g_stds = ['gnu++03', 'gnu++11']
|
|
||||||
+ if version_compare(self.version, '>=5.0.0'):
|
+ if version_compare(self.version, '>=5.0.0'):
|
||||||
+ c_stds += ['c++14', 'c++17', 'c++1z']
|
+ c_stds += ['c++14', 'c++17', 'c++1z', 'gnu++14', 'gnu++17', 'gnu++1z']
|
||||||
+ g_stds += ['gnu++14', 'gnu++17', 'gnu++1z']
|
+ else:
|
||||||
|
+ c_stds += ['c++1y', 'gnu++1y']
|
||||||
opts = {'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use',
|
opts = {'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use',
|
||||||
- ['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z',
|
- ['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z',
|
||||||
- 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z'],
|
- 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z'],
|
||||||
+ ['none'] + c_stds + g_stds,
|
+ ['none'] + cpp_stds,
|
||||||
'none'),
|
'none'),
|
||||||
'cpp_debugstl': coredata.UserBooleanOption('cpp_debugstl',
|
'cpp_debugstl': coredata.UserBooleanOption('cpp_debugstl',
|
||||||
'STL debug mode',
|
'STL debug mode',
|
||||||
@ -23,7 +23,7 @@
|
|||||||
version : '{version}',
|
version : '{version}',
|
||||||
default_options : ['warning_level=3',
|
default_options : ['warning_level=3',
|
||||||
- 'cpp_std=c++14'])
|
- 'cpp_std=c++14'])
|
||||||
+ 'cpp_std=c++11'])
|
+ 'cpp_std=c++1y'])
|
||||||
|
|
||||||
exe = executable('{exe_name}', '{source_name}',
|
exe = executable('{exe_name}', '{source_name}',
|
||||||
install : true)
|
install : true)
|
||||||
@ -32,7 +32,7 @@
|
|||||||
lib_cpp_meson_template = '''project('{project_name}', 'cpp',
|
lib_cpp_meson_template = '''project('{project_name}', 'cpp',
|
||||||
version : '{version}',
|
version : '{version}',
|
||||||
- default_options : ['warning_level=3', 'cpp_std=c++14'])
|
- default_options : ['warning_level=3', 'cpp_std=c++14'])
|
||||||
+ default_options : ['warning_level=3', 'cpp_std=c++11'])
|
+ default_options : ['warning_level=3', 'cpp_std=c++1y'])
|
||||||
|
|
||||||
# These arguments are only used to build the shared library
|
# These arguments are only used to build the shared library
|
||||||
# not the executables that use the library.
|
# not the executables that use the library.
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
'relative path, it is assumed to be a subdir of prefix.'
|
'relative path, it is assumed to be a subdir of prefix.'
|
||||||
--- a/mesonbuild/mesonlib.py
|
--- a/mesonbuild/mesonlib.py
|
||||||
+++ b/mesonbuild/mesonlib.py
|
+++ b/mesonbuild/mesonlib.py
|
||||||
@@ -935,6 +935,32 @@ def detect_subprojects(spdir_name, curre
|
@@ -935,6 +935,30 @@ def detect_subprojects(spdir_name, curre
|
||||||
result[basename] = [trial]
|
result[basename] = [trial]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@ -64,10 +64,8 @@
|
|||||||
+ if c != p:
|
+ if c != p:
|
||||||
+ break
|
+ break
|
||||||
+ new.append(c)
|
+ new.append(c)
|
||||||
+ # Don't convert '' into '.'
|
|
||||||
+ if not new:
|
+ if not new:
|
||||||
+ common = ''
|
+ raise ValueError("Can't mix absolute and relative paths") from None
|
||||||
+ break
|
|
||||||
+ new = os.path.join(*new)
|
+ new = os.path.join(*new)
|
||||||
+ common = pathlib.PurePath(new)
|
+ common = pathlib.PurePath(new)
|
||||||
+ return str(common)
|
+ return str(common)
|
||||||
@ -90,7 +88,7 @@
|
|||||||
return 1
|
return 1
|
||||||
--- a/run_unittests.py
|
--- a/run_unittests.py
|
||||||
+++ b/run_unittests.py
|
+++ b/run_unittests.py
|
||||||
@@ -427,6 +427,26 @@ class InternalTests(unittest.TestCase):
|
@@ -427,6 +427,24 @@ class InternalTests(unittest.TestCase):
|
||||||
kwargs = {'sources': [1, 2, 3], 'pch_sources': [4, 5, 6]}
|
kwargs = {'sources': [1, 2, 3], 'pch_sources': [4, 5, 6]}
|
||||||
self.assertEqual([[1, 2, 3], [4, 5, 6]], extract(kwargs, 'sources', 'pch_sources'))
|
self.assertEqual([[1, 2, 3], [4, 5, 6]], extract(kwargs, 'sources', 'pch_sources'))
|
||||||
|
|
||||||
@ -108,8 +106,6 @@
|
|||||||
+ self.assertEqual(commonpath(['/usr/./bin', '/usr/bin']), sep + 'usr' + sep + 'bin')
|
+ self.assertEqual(commonpath(['/usr/./bin', '/usr/bin']), sep + 'usr' + sep + 'bin')
|
||||||
+ self.assertEqual(commonpath(['/usr/local', '/usr/lib']), sep + 'usr')
|
+ self.assertEqual(commonpath(['/usr/local', '/usr/lib']), sep + 'usr')
|
||||||
+ self.assertEqual(commonpath(['/usr', '/bin']), sep)
|
+ self.assertEqual(commonpath(['/usr', '/bin']), sep)
|
||||||
+ self.assertEqual(commonpath(['/usr', 'bin']), '')
|
|
||||||
+ self.assertEqual(commonpath(['blam', 'bin']), '')
|
|
||||||
+ prefix = '/some/path/to/prefix'
|
+ prefix = '/some/path/to/prefix'
|
||||||
+ libdir = '/some/path/to/prefix/libdir'
|
+ libdir = '/some/path/to/prefix/libdir'
|
||||||
+ self.assertEqual(commonpath([prefix, libdir]), str(PurePath(prefix)))
|
+ self.assertEqual(commonpath([prefix, libdir]), str(PurePath(prefix)))
|
||||||
|
Loading…
Reference in New Issue
Block a user