diff options
-rwxr-xr-x | environment.py | 84 | ||||
-rwxr-xr-x | interpreter.py | 16 | ||||
-rw-r--r-- | test cases/common/14 cxx pch/meson.build | 2 | ||||
-rw-r--r-- | test cases/common/15 mixed pch/meson.build | 2 | ||||
-rw-r--r-- | test cases/common/2 cxx/meson.build | 2 | ||||
-rw-r--r-- | test cases/common/23 global arg/meson.build | 4 | ||||
-rw-r--r-- | test cases/common/23 global arg/prog.c | 2 | ||||
-rw-r--r-- | test cases/common/23 global arg/prog.cc | 2 | ||||
-rw-r--r-- | test cases/common/24 target arg/func.c | 2 | ||||
-rw-r--r-- | test cases/common/24 target arg/meson.build | 4 | ||||
-rw-r--r-- | test cases/common/24 target arg/prog.cc | 2 | ||||
-rw-r--r-- | test cases/common/7 mixed/meson.build | 2 | ||||
-rw-r--r-- | test cases/frameworks/1 boost/meson.build | 2 | ||||
-rw-r--r-- | test cases/frameworks/2 gtest/meson.build | 2 | ||||
-rw-r--r-- | test cases/frameworks/3 gmock/meson.build | 2 | ||||
-rw-r--r-- | test cases/frameworks/4 qt5/meson.build | 2 | ||||
-rw-r--r-- | test cases/frameworks/5 protocol buffers/meson.build | 2 | ||||
-rw-r--r-- | test cases/objc/3 objc++/meson.build | 6 | ||||
-rw-r--r-- | test cases/windows/3 cpp/meson.build | 4 | ||||
-rw-r--r-- | test cases/windows/4 winmaincpp/meson.build | 2 |
20 files changed, 73 insertions, 73 deletions
diff --git a/environment.py b/environment.py index 753c8f0..6fbe85e 100755 --- a/environment.py +++ b/environment.py @@ -164,23 +164,23 @@ int main(int argc, char **argv) { raise EnvironmentException('Could not run sizeof test binary.') return int(so.decode()) -cxx_suffixes = ['cc', 'cpp', 'cxx', 'hh', 'hpp', 'hxx'] +cpp_suffixes = ['cc', 'cpp', 'cxx', 'hh', 'hpp', 'hxx'] -class CXXCompiler(CCompiler): +class CPPCompiler(CCompiler): def __init__(self, exelist): CCompiler.__init__(self, exelist) - self.language = 'cxx' + self.language = 'cpp' self.default_suffix = 'cpp' def can_compile(self, filename): suffix = filename.split('.')[-1] - if suffix in cxx_suffixes: + if suffix in cpp_suffixes: return True return False def sanity_check(self, work_dir): - source_name = os.path.join(work_dir, 'sanitycheckcxx.cc') - binary_name = os.path.join(work_dir, 'sanitycheckcxx') + source_name = os.path.join(work_dir, 'sanitycheckcpp.cc') + binary_name = os.path.join(work_dir, 'sanitycheckcpp') ofile = open(source_name, 'w') ofile.write('class breakCCompiler;int main(int argc, char **argv) { return 0; }\n') ofile.close() @@ -205,10 +205,10 @@ class ObjCCompiler(CCompiler): return True return False -class ObjCXXCompiler(CXXCompiler): +class ObjCPPCompiler(CPPCompiler): def __init__(self, exelist): - CXXCompiler.__init__(self, exelist) - self.language = 'objcxx' + CPPCompiler.__init__(self, exelist) + self.language = 'objcpp' self.default_suffix = 'mm' def can_compile(self, filename): @@ -218,8 +218,8 @@ class ObjCXXCompiler(CXXCompiler): return False def sanity_check(self, work_dir): - source_name = os.path.join(work_dir, 'sanitycheckobjcxx.mm') - binary_name = os.path.join(work_dir, 'sanitycheckobjcxx') + source_name = os.path.join(work_dir, 'sanitycheckobjcpp.mm') + binary_name = os.path.join(work_dir, 'sanitycheckobjcpp') ofile = open(source_name, 'w') ofile.write('#import<stdio.h>\nclass MyClass;int main(int argc, char **argv) { return 0; }\n') ofile.close() @@ -290,21 +290,21 @@ class VisualStudioCCompiler(CCompiler): if pe.returncode != 0: raise EnvironmentException('Executables created by C++ compiler %s are not runnable.' % self.name_string()) -class VisualStudioCXXCompiler(VisualStudioCCompiler): +class VisualStudioCPPCompiler(VisualStudioCCompiler): def __init__(self, exelist): VisualStudioCCompiler.__init__(self, exelist) - self.language = 'cxx' + self.language = 'cpp' self.default_suffix = 'cpp' def can_compile(self, filename): suffix = filename.split('.')[-1] - if suffix in cxx_suffixes: + if suffix in cpp_suffixes: return True return False def sanity_check(self, work_dir): - source_name = os.path.join(work_dir, 'sanitycheckcxx.cpp') - binary_name = os.path.join(work_dir, 'sanitycheckcxx') + source_name = os.path.join(work_dir, 'sanitycheckcpp.cpp') + binary_name = os.path.join(work_dir, 'sanitycheckcpp') ofile = open(source_name, 'w') ofile.write('class BreakPlainC;int main(int argc, char **argv) { return 0; }\n') ofile.close() @@ -353,7 +353,7 @@ class GnuObjCCompiler(ObjCCompiler): def get_pch_suffix(self): return 'gch' -class GnuObjCXXCompiler(ObjCXXCompiler): +class GnuObjCPPCompiler(ObjCPPCompiler): std_warn_flags = ['-Wall', '-Winvalid-pch'] std_opt_flags = ['-O2'] @@ -362,10 +362,10 @@ class GnuObjCXXCompiler(ObjCXXCompiler): self.id = 'gcc' def get_std_warn_flags(self): - return GnuObjCXXCompiler.std_warn_flags + return GnuObjCPPCompiler.std_warn_flags def get_std_opt_flags(self): - return GnuObjCXXCompiler.std_opt_flags + return GnuObjCPPCompiler.std_opt_flags def get_pch_suffix(self): return 'gch' @@ -387,36 +387,36 @@ class ClangCCompiler(CCompiler): def get_pch_suffix(self): return 'pch' -class GnuCXXCompiler(CXXCompiler): +class GnuCPPCompiler(CPPCompiler): std_warn_flags = ['-Wall', '-Winvalid-pch'] std_opt_flags = ['-O2'] def __init__(self, exelist): - CXXCompiler.__init__(self, exelist) + CPPCompiler.__init__(self, exelist) self.id = 'gcc' def get_std_warn_flags(self): - return GnuCXXCompiler.std_warn_flags + return GnuCPPCompiler.std_warn_flags def get_std_opt_flags(self): - return GnuCXXCompiler.std_opt_flags + return GnuCPPCompiler.std_opt_flags def get_pch_suffix(self): return 'gch' -class ClangCXXCompiler(CXXCompiler): +class ClangCPPCompiler(CPPCompiler): std_warn_flags = ['-Wall', '-Winvalid-pch'] std_opt_flags = ['-O2'] def __init__(self, exelist): - CXXCompiler.__init__(self, exelist) + CPPCompiler.__init__(self, exelist) self.id = 'clang' def get_std_warn_flags(self): - return ClangCXXCompiler.std_warn_flags + return ClangCPPCompiler.std_warn_flags def get_std_opt_flags(self): - return ClangCXXCompiler.std_opt_flags + return ClangCPPCompiler.std_opt_flags def get_pch_suffix(self): return 'pch' @@ -522,12 +522,12 @@ class Environment(): # List of potential compilers. if is_windows(): self.default_c = ['cl', 'cc'] - self.default_cxx = ['cl', 'c++'] + self.default_cpp = ['cl', 'c++'] else: self.default_c = ['cc'] - self.default_cxx = ['c++'] + self.default_cpp = ['c++'] self.default_objc = ['cc'] - self.default_objcxx = ['c++'] + self.default_objcpp = ['c++'] self.default_static_linker = 'ar' self.vs_static_linker = 'lib' @@ -608,13 +608,13 @@ class Environment(): path = os.path.split(__file__)[0] return os.path.join(path, 'depfixer.py') - def detect_cxx_compiler(self): + def detect_cpp_compiler(self): evar = 'CC' if evar in os.environ: compilers = os.environ[evar].split() ccache = [] else: - compilers = self.default_cxx + compilers = self.default_cpp ccache = self.detect_ccache() for compiler in compilers: basename = os.path.basename(compiler).lower() @@ -632,13 +632,13 @@ class Environment(): out = out.decode() if (out.startswith('c++ ') or out.startswith('g++')) and \ 'Free Software Foundation' in out: - return GnuCXXCompiler(ccache + [compiler]) + return GnuCPPCompiler(ccache + [compiler]) if 'apple' in out and 'Free Software Foundation' in out: - return GnuCXXCompiler(ccache + [compiler]) + return GnuCPPCompiler(ccache + [compiler]) if out.startswith('clang'): - return ClangCXXCompiler(ccache + [compiler]) + return ClangCPPCompiler(ccache + [compiler]) if 'Microsoft' in out: - return VisualStudioCXXCompiler([compiler]) + return VisualStudioCPPCompiler([compiler]) raise EnvironmentException('Unknown compiler(s) "' + ', '.join(compilers) + '"') def detect_objc_compiler(self): @@ -656,8 +656,8 @@ class Environment(): return GnuObjCCompiler(exelist) raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"') - def detect_objcxx_compiler(self): - exelist = self.get_objcxx_compiler_exelist() + def detect_objcpp_compiler(self): + exelist = self.get_objcpp_compiler_exelist() try: p = subprocess.Popen(exelist + ['--version'], stdout=subprocess.PIPE) except OSError: @@ -666,9 +666,9 @@ class Environment(): out = out.decode() if (out.startswith('c++ ') or out.startswith('g++')) and \ 'Free Software Foundation' in out: - return GnuObjCXXCompiler(exelist) + return GnuObjCPPCompiler(exelist) if 'apple' in out and 'Free Software Foundation' in out: - return GnuObjCXXCompiler(exelist) + return GnuObjCPPCompiler(exelist) raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"') def detect_static_linker(self, compiler): @@ -717,12 +717,12 @@ class Environment(): return os.environ[evar].split() return ccachelist + self.default_objc - def get_objcxx_compiler_exelist(self): + def get_objcpp_compiler_exelist(self): ccachelist = self.detect_ccache() evar = 'OBJCXX' if evar in os.environ: return os.environ[evar].split() - return ccachelist + self.default_objcxx + return ccachelist + self.default_objcpp def get_source_dir(self): return self.source_dir diff --git a/interpreter.py b/interpreter.py index 9f6b075..dc5f0e9 100755 --- a/interpreter.py +++ b/interpreter.py @@ -387,10 +387,10 @@ class BuildTarget(InterpreterObject): if not isinstance(clist, list): clist = [clist] self.add_compiler_args('c', clist) - cxxlist = kwargs.get('cxx_args', []) - if not isinstance(cxxlist, list): - cxxlist = [cxxlist] - self.add_compiler_args('cxx', cxxlist) + cpplist = kwargs.get('cpp_args', []) + if not isinstance(cpplist, list): + cpplist = [cpplist] + self.add_compiler_args('cpp', cpplist) if 'version' in kwargs: self.set_version(kwargs['version']) if 'soversion' in kwargs: @@ -767,12 +767,12 @@ class Interpreter(): else: if lang.lower() == 'c': comp = self.environment.detect_c_compiler() - elif lang.lower() == 'cxx': - comp = self.environment.detect_cxx_compiler() + elif lang.lower() == 'cpp': + comp = self.environment.detect_cpp_compiler() elif lang.lower() == 'objc': comp = self.environment.detect_objc_compiler() - elif lang.lower() == 'objcxx': - comp = self.environment.detect_objcxx_compiler() + elif lang.lower() == 'objcpp': + comp = self.environment.detect_objcpp_compiler() else: raise InvalidCode('Tried to use unknown language "%s".' % lang) comp.sanity_check(self.environment.get_scratch_dir()) diff --git a/test cases/common/14 cxx pch/meson.build b/test cases/common/14 cxx pch/meson.build index 966979b..d56800b 100644 --- a/test cases/common/14 cxx pch/meson.build +++ b/test cases/common/14 cxx pch/meson.build @@ -1,2 +1,2 @@ -project('c++ pch test', 'cxx') +project('c++ pch test', 'cpp') exe = executable('prog', 'prog.cc', pch : 'pch/prog.hh') diff --git a/test cases/common/15 mixed pch/meson.build b/test cases/common/15 mixed pch/meson.build index 7438042..8c85672 100644 --- a/test cases/common/15 mixed pch/meson.build +++ b/test cases/common/15 mixed pch/meson.build @@ -1,4 +1,4 @@ -project('mixed C and C++ pch test', 'cxx', 'c') +project('mixed C and C++ pch test', 'cpp', 'c') pch = ['pch/main.hh', 'pch/func.h'] diff --git a/test cases/common/2 cxx/meson.build b/test cases/common/2 cxx/meson.build index 47333ba..a2d89a3 100644 --- a/test cases/common/2 cxx/meson.build +++ b/test cases/common/2 cxx/meson.build @@ -1,3 +1,3 @@ -project('c++ test', 'cxx') +project('c++ test', 'cpp') exe = executable('trivialprog', 'trivial.cc') test('runtest', exe) diff --git a/test cases/common/23 global arg/meson.build b/test cases/common/23 global arg/meson.build index 9d916a2..aec5c2d 100644 --- a/test cases/common/23 global arg/meson.build +++ b/test cases/common/23 global arg/meson.build @@ -1,7 +1,7 @@ -project('global arg test', 'cxx', 'c') +project('global arg test', 'cpp', 'c') add_global_arguments('-DMYTHING', language : 'c') -add_global_arguments('-DMYCXXTHING', language : 'cxx') +add_global_arguments('-DMYCPPTHING', language : 'cpp') exe1 = executable('prog', 'prog.c') exe2 = executable('prog2', 'prog.cc') diff --git a/test cases/common/23 global arg/prog.c b/test cases/common/23 global arg/prog.c index 2db6212..df91777 100644 --- a/test cases/common/23 global arg/prog.c +++ b/test cases/common/23 global arg/prog.c @@ -2,7 +2,7 @@ #error "Global argument not set" #endif -#ifdef MYCXXTHING +#ifdef MYCPPTHING #error "Wrong global argument set" #endif diff --git a/test cases/common/23 global arg/prog.cc b/test cases/common/23 global arg/prog.cc index b881645..342fdd0 100644 --- a/test cases/common/23 global arg/prog.cc +++ b/test cases/common/23 global arg/prog.cc @@ -2,7 +2,7 @@ #error "Wrong global argument set" #endif -#ifndef MYCXXTHING +#ifndef MYCPPTHING #error "Global argument not set" #endif diff --git a/test cases/common/24 target arg/func.c b/test cases/common/24 target arg/func.c index d8a509a..9b3fe5d 100644 --- a/test cases/common/24 target arg/func.c +++ b/test cases/common/24 target arg/func.c @@ -2,7 +2,7 @@ #error "Local argument not set" #endif -#ifdef CXXTHING +#ifdef CPPTHING #error "Wrong local argument set" #endif diff --git a/test cases/common/24 target arg/meson.build b/test cases/common/24 target arg/meson.build index edeae45..5aec31d 100644 --- a/test cases/common/24 target arg/meson.build +++ b/test cases/common/24 target arg/meson.build @@ -1,7 +1,7 @@ -project('local arg test', 'cxx', 'c') +project('local arg test', 'cpp', 'c') exe1 = executable('prog', 'prog.cc', 'func.c', \ c_args : '-DCTHING', \ -cxx_args : '-DCXXTHING') +cpp_args : '-DCPPTHING') test('prog1', exe1) diff --git a/test cases/common/24 target arg/prog.cc b/test cases/common/24 target arg/prog.cc index cc36ae0..d1893ba 100644 --- a/test cases/common/24 target arg/prog.cc +++ b/test cases/common/24 target arg/prog.cc @@ -2,7 +2,7 @@ #error "Wrong local argument set" #endif -#ifndef CXXTHING +#ifndef CPPTHING #error "Local argument not set" #endif diff --git a/test cases/common/7 mixed/meson.build b/test cases/common/7 mixed/meson.build index 7731551..af88a1e 100644 --- a/test cases/common/7 mixed/meson.build +++ b/test cases/common/7 mixed/meson.build @@ -1,3 +1,3 @@ -project('mixed C and C++', 'c', 'cxx') +project('mixed C and C++', 'c', 'cpp') exe = executable('prog', 'main.cc', 'func.c') test('mixtest', exe) diff --git a/test cases/frameworks/1 boost/meson.build b/test cases/frameworks/1 boost/meson.build index 74bdd98..033cb22 100644 --- a/test cases/frameworks/1 boost/meson.build +++ b/test cases/frameworks/1 boost/meson.build @@ -1,4 +1,4 @@ -project('boosttest', 'cxx') +project('boosttest', 'cpp') # We want to have multiple separate configurations of Boost # within one project. The need to be independent of each other. diff --git a/test cases/frameworks/2 gtest/meson.build b/test cases/frameworks/2 gtest/meson.build index ac6214a..b1a7563 100644 --- a/test cases/frameworks/2 gtest/meson.build +++ b/test cases/frameworks/2 gtest/meson.build @@ -1,4 +1,4 @@ -project('gtest', 'cxx') +project('gtest', 'cpp') gtest = dependency('gtest') diff --git a/test cases/frameworks/3 gmock/meson.build b/test cases/frameworks/3 gmock/meson.build index 53d3b36..37867c9 100644 --- a/test cases/frameworks/3 gmock/meson.build +++ b/test cases/frameworks/3 gmock/meson.build @@ -1,4 +1,4 @@ -project('gmock test', 'cxx') +project('gmock test', 'cpp') # Using gmock without gtest is a pain so just # don't support that then. diff --git a/test cases/frameworks/4 qt5/meson.build b/test cases/frameworks/4 qt5/meson.build index 6c5bff6..a630d73 100644 --- a/test cases/frameworks/4 qt5/meson.build +++ b/test cases/frameworks/4 qt5/meson.build @@ -1,4 +1,4 @@ -project('qt5 build test', 'cxx') +project('qt5 build test', 'cpp') qt5dep = dependency('qt5', modules : 'Widgets') diff --git a/test cases/frameworks/5 protocol buffers/meson.build b/test cases/frameworks/5 protocol buffers/meson.build index 4ab961c..1e52e48 100644 --- a/test cases/frameworks/5 protocol buffers/meson.build +++ b/test cases/frameworks/5 protocol buffers/meson.build @@ -1,4 +1,4 @@ -project('protocol buffer test', 'cxx') +project('protocol buffer test', 'cpp') protoc = find_program('protoc') dep = dependency('protobuf') diff --git a/test cases/objc/3 objc++/meson.build b/test cases/objc/3 objc++/meson.build index 05589b7..7d91884 100644 --- a/test cases/objc/3 objc++/meson.build +++ b/test cases/objc/3 objc++/meson.build @@ -1,4 +1,4 @@ -project('Objective C++', 'objcxx') +project('Objective C++', 'objcpp') -exe = executable('objcxxprog', 'prog.mm') -test('objcxx', exe) +exe = executable('objcppprog', 'prog.mm') +test('objcpp', exe) diff --git a/test cases/windows/3 cpp/meson.build b/test cases/windows/3 cpp/meson.build index 2efe420..7b8080e 100644 --- a/test cases/windows/3 cpp/meson.build +++ b/test cases/windows/3 cpp/meson.build @@ -1,4 +1,4 @@ -project('wincxx', 'cxx') +project('wincpp', 'cpp') exe = executable('prog', 'prog.cpp') -test('wincxx', exe) +test('wincpp', exe) diff --git a/test cases/windows/4 winmaincpp/meson.build b/test cases/windows/4 winmaincpp/meson.build index 5ccd3e6..7644489 100644 --- a/test cases/windows/4 winmaincpp/meson.build +++ b/test cases/windows/4 winmaincpp/meson.build @@ -1,4 +1,4 @@ -project('winmaincpp', 'cxx') +project('winmaincpp', 'cpp') exe = executable('prog', 'prog.cpp') test('winmaincpp', exe) |