Use '.exe' extension for executables for Cygwin

Use '.exe' extension for executables for Cygwin when building and installing
pull/1567/head
Jon Turney 8 years ago
parent 5af98a5ee8
commit fd47ef3a27
  1. 3
      mesonbuild/build.py
  2. 6
      mesonbuild/scripts/meson_exe.py
  3. 2
      mesonbuild/scripts/meson_install.py
  4. 6
      mesontest.py
  5. 2
      run_project_tests.py
  6. 2
      run_unittests.py
  7. 2
      test cases/failing/19 target clash/meson.build

@ -997,7 +997,8 @@ class Executable(BuildTarget):
self.prefix = ''
if not hasattr(self, 'suffix'):
# Executable for Windows or C#/Mono
if for_windows(is_cross, environment) or 'cs' in self.compilers:
if (for_windows(is_cross, environment) or
for_cygwin(is_cross, environment) or 'cs' in self.compilers):
self.suffix = 'exe'
else:
self.suffix = ''

@ -29,8 +29,12 @@ def is_windows():
platname = platform.system().lower()
return platname == 'windows' or 'mingw' in platname
def is_cygwin():
platname = platform.system().lower()
return 'cygwin' in platname
def run_with_mono(fname):
if fname.endswith('.exe') and not is_windows():
if fname.endswith('.exe') and not (is_windows() or is_cygwin()):
return True
return False

@ -193,7 +193,7 @@ def run_install_script(d):
def is_elf_platform():
platname = platform.system().lower()
if platname == 'darwin' or platname == 'windows':
if platname == 'darwin' or platname == 'windows' or platname == 'cygwin':
return False
return True

@ -36,6 +36,10 @@ def is_windows():
platname = platform.system().lower()
return platname == 'windows' or 'mingw' in platname
def is_cygwin():
platname = platform.system().lower()
return 'cygwin' in platname
def determine_worker_count():
varname = 'MESON_TESTTHREADS'
if varname in os.environ:
@ -150,7 +154,7 @@ def write_json_log(jsonlogfile, test_name, result):
jsonlogfile.write(json.dumps(jresult) + '\n')
def run_with_mono(fname):
if fname.endswith('.exe') and not is_windows():
if fname.endswith('.exe') and not (is_windows() or is_cygwin()):
return True
return False

@ -218,7 +218,7 @@ def platform_fix_name(fname):
if fname.endswith('?exe'):
fname = fname[:-4]
if mesonlib.is_windows():
if mesonlib.is_windows() or mesonlib.is_cygwin():
return fname + '.exe'
return fname

@ -28,7 +28,7 @@ from mesonbuild.mesonlib import is_windows, is_osx, is_cygwin
from mesonbuild.environment import detect_ninja, Environment
from mesonbuild.dependencies import PkgConfigDependency, ExternalProgram
if is_windows():
if is_windows() or is_cygwin():
exe_suffix = '.exe'
else:
exe_suffix = ''

@ -7,7 +7,7 @@ project('clash', 'c')
# This test might fail to work on different backends or when
# output location is redirected.
if host_machine.system() == 'windows'
if host_machine.system() == 'windows' or host_machine.system() == 'cygwin'
error('This is expected.')
endif

Loading…
Cancel
Save