Commit Graph

9887 Commits

Author SHA1 Message Date
Dylan Baker ce2d927a79
Merge pull request #7757 from dcbaker/submit/curses-dependency
Extend the Curses dependency to use config tools and hand rolled search
2020-09-30 09:33:13 -07:00
Dylan Baker a3106776a6 dependencies/curses: don't try ncurses-config or system dependency on windows
with msys ncurses-config returns a unix style path (currently, though
it's been fixed upstream), which the compilers don't understand, so we
can't do that. Additionally, while the system search does work, there's
missing include directories that need to be added.
2020-09-29 15:00:51 -07:00
Yonggang Luo 9a47509764 dependencies/curses: Add support for pdcurses
On win32 there is pdcurses, so we detect it first, because python
depends on ncursesw, so if we don't want to use ncursesw, we should make
sure pdcurses detect before ncursesw
2020-09-29 14:58:32 -07:00
Yonggang Luo e873e64b40 dependencies/curses: Add way to testing curses on msys2. 2020-09-29 14:58:32 -07:00
Dylan Baker 19f2b3d583 tests/curses: Extend to test versions
This is mostly important for the system dependency where we need to roll
the version check ourselves.
2020-09-29 14:58:32 -07:00
Dylan Baker 5aee8567b8 dependencies/curses: Add a system dependency
That calls find_library and has_header in conjunction to look for curses
implementations that are baked into the system without any other find
method.
2020-09-29 14:58:32 -07:00
Dylan Baker cb6ccf2632 dependencies/zlib: Fix header detection
has_header returns a tuple of (found: bool, cached: bool), so `if
has_header` will always return true because the tuple is non-empty. We
need to check if the found value is true or not.
2020-09-29 14:58:32 -07:00
Dylan Baker 7d11d7cf68 dependencies/curses: Add support for using the ncurses config tools
These are mostly duplicated with pkg-config, but maybe someone has one
but not another, and they're easy to turn on with the
ConfigToolDependency.
2020-09-29 14:58:32 -07:00
Dylan Baker 354c1c1d09 dependency/misc: change lookup order for curses pkg-config
look for (in order): ncursesw, ncurses, curses.
2020-09-29 14:58:32 -07:00
Dylan Baker 16d3513df6 docs/Dependencies Add missing curses documentation 2020-09-29 14:58:32 -07:00
Dylan Baker c411b29b6d dependencies/misc: Fix typing of curses_factory 2020-09-29 14:58:32 -07:00
Dylan Baker 137c3124e2
Merge pull request #7758 from dcbaker/submit/hdf5-factory
dependencies/hdf5: Convert to a dependency_factory
2020-09-29 14:55:38 -07:00
Jussi Pakkanen 400ec2d685
Merge pull request #7762 from jon-turney/meson-exe-output-improve
Improve the output for meson wrapped commands
2020-09-29 19:28:51 +03:00
Vili Väinölä d1638a4fde compilers/VS: fix build to use optimization and debug flags
- Fixed using debug and optimization built-in options in MSVC.
- Fixed that VS backend does not create pdb files in release mode.
VS implicitly adds the debug fields if left out.
- Fix that it is possible to add debug info with ninja backend with
optimizations.
2020-09-29 19:25:50 +03:00
Jussi Pakkanen 5f70984403
Merge pull request #7772 from xclaesse/deprecate-source-root
Deprecate meson.build_root() and meson.source_root()
2020-09-29 19:24:25 +03:00
Jon Turney ff186b0526 Improve documentation about using shell in custom_target() [skip ci]
Add a note about the portability of using shell constructs in the
custom_target() command.
2020-09-29 19:22:50 +03:00
Daniel Mensinger be2598a4e2
Merge pull request #7794 from mensinda/cmTyping
typing: CMake module
2020-09-29 10:33:53 +02:00
Dylan Baker a3e628092f CODEOWNERS: don't use * [skip ci]
strangely enough the syntax is:
/foo/* (files in foo, but not in foo/dir/)
/foo/ (files in foo and any subfolder of foo (recursively)
2020-09-28 18:25:59 -04:00
Jussi Pakkanen 01edd26baf Add old style command to tutorial. Closes #7793. [skip ci] 2020-09-28 18:26:29 +03:00
Xavier Claessens 7176b74fd6 Add meson.project_build/source_root() methods 2020-09-28 11:22:38 -04:00
Peter Harris 2664ab069d windows: reduce chance of going over path limit in backend/vs
When building with vs2019 (not ninja), a path length error will be thrown
if the path to a resource file is even remotely deep within the tree.

This is largely because the target name includes the string "Windows
resource for file 'full path'", which is then expanded twice (once for
the .vcxproj itself, and once for IntDir) and added to the full path.
When combined with the tiny path limits on Windows, it is easy to exceed
path limits.

This error is largely avoided by the ninja back-end. Unlike the
vs back-end, the ninja back-end does not use target.get_id() as part of
the project file path, nor does it use target.get_id() as part of
get_target_private_dir().

Example error:

error MSB4184: The expression "[MSBuild]::NormalizePath(
C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp,
f3f7317@@Windows resource for file
'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\,
f3f7317@@Windows resource for file
'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus.
vcxproj.CopyComplete)" cannot be evaluated. Path:
C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp\f3f7317
@@Windows resource for file
'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\f3f7317
@@Windows resource for file
'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus.
vcxproj.CopyComplete exceeds the OS max path limit.
The fully qualified file name must be less than 260 characters.
2020-09-28 12:34:12 +00:00
Daniel Mensinger 2f3ef6f1af
typing: fully annotate cmake.interpreter 2020-09-28 13:54:04 +02:00
Daniel Mensinger c2d55afcb5
typing: fully annotate cmake.traceparser 2020-09-28 13:53:59 +02:00
Daniel Mensinger fc80518a07
typing: fully annotate cmake.generator 2020-09-28 13:51:19 +02:00
Daniel Mensinger a1b2f15092
typing: fully annotate cmake.fileapi 2020-09-28 13:51:19 +02:00
Daniel Mensinger d9419a4f2a
typing: fully annotate cmake.executor 2020-09-28 13:51:14 +02:00
Yonggang Luo 75433bee74 Fixes meson test timeout on windows
```
2020-09-23T01:25:14.7849070Z
2020-09-23T01:25:14.7849592Z 1/5 Boost linktest      TIMEOUT        30.16s
2020-09-23T01:25:14.7849811Z
2020-09-23T01:25:14.7850027Z --- command ---
2020-09-23T01:25:14.7850281Z 01:24:30 D:\a\1\s\b 125f976e40\linkedexe.exe
2020-09-23T01:25:14.7850561Z -------
2020-09-23T01:25:14.7850693Z
2020-09-23T01:25:14.7850947Z 2/5 Boost UTF test      TIMEOUT        31.15s
2020-09-23T01:25:14.7851141Z
2020-09-23T01:25:14.7851347Z --- command ---
2020-09-23T01:25:14.7851580Z 01:24:30 D:\a\1\s\b 125f976e40\utf.exe
2020-09-23T01:25:14.7851862Z --- stdout ---
2020-09-23T01:25:14.7852065Z Running 1 test case...
2020-09-23T01:25:14.7852441Z
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
2020-09-27 22:32:52 +03:00
Jussi Pakkanen 15761e78d2
Merge pull request #7776 from dcbaker/submit/zsh-additions
Add most missing zsh completions
2020-09-27 22:32:21 +03:00
Daniel Mensinger 6a71391de6
typing: fully annotate cmake.common 2020-09-27 20:56:09 +02:00
Daniel Mensinger 6dfdb407f0
typing: fully annotate cmake.client 2020-09-27 11:41:10 +02:00
Daniel Mensinger 9f695435e7
typing: add convinient option to clear the terminal to run_mypy.py 2020-09-27 11:21:36 +02:00
Daniel Mensinger 19b3f65e70
typing: fix indentation in run_mypy.py 2020-09-27 11:20:05 +02:00
Dylan Baker bffd981246 tests/hdf5: work around some problems
There are two cases that won't work (these are taken from fortran/9
cpp), using gfortran with a non-gcc compiler on windows, or using
gfortran with apple clang. The latter is due to default search paths,
which we can fix, but is out of scope for this MR.
2020-09-25 11:11:46 -07:00
Dylan Baker 54329eeed7 dependencies/hdf5: Use the correct compilers for the machine
Instead of the default ones, this is especially important when cross
compiling or when using compilers that aren't compatible with the
default ones.
squash! dependencies/hdf5: Use the actual system compilers
2020-09-25 11:11:46 -07:00
Dylan Baker b7cb30e175 dependencies/hdf5: Convert to a dependency_factory
Instead of a mega dependency that does everything, use a dependency
factory for config-tool and pkg-config
2020-09-25 11:11:46 -07:00
Dylan Baker dff40ca259 environment: Pass defines to clang based ObjC[++] compilers
mypy noticed that we were passing [] (instead of a dict or None) to the
ClangCompiler class in objc, which made me noticed that for C and C++ we
set the defines, but not for ObjC and ObjC++
2020-09-24 12:14:13 -07:00
Dylan Baker da4c1945fc compilers/objcpp: add type annotations 2020-09-24 12:14:13 -07:00
Dylan Baker 05df8320db compilers/objc: Add type annotations 2020-09-24 12:14:13 -07:00
Dylan Baker 682d22129c compilers: Tell mypy that the compiler mixins are just that
We do this by making the mixins inherit the Compiler class only when
mypy is examining the code (using some clever inheritance shenanigans).
This caught a bunch of issues, and also lets us delete a ton of code.
2020-09-24 12:14:13 -07:00
Dylan Baker 2c0fbe161d compilers: make is_cross part of the base Compiler class
Every class needs to set this, so it should be part of the base. For
classes that require is_cross, the positional argument remains in their
signature. For those that don't, they just allow the base class to set
their value to it's default of False.
2020-09-24 12:14:13 -07:00
Dylan Baker 1592b7a800 compilers: make sanity_check_impl a protected method
It's an implementation detail after all
2020-09-24 12:14:13 -07:00
Dylan Baker 98416e7f75 compilers: put name_string method in base compiler
Every language had the exact same implementation
2020-09-24 12:14:13 -07:00
Dylan Baker 02658fdda4 run_mypy: compilers/c_function_attributes is already type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 0d644ac87b run_mypy: all of compilers/mixins is now type safe 2020-09-24 12:14:13 -07:00
Dylan Baker fa1398f86c compilers/mixins: make xc16 type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 4911e8eef4 compilers/mixins: make visual studio type safe 2020-09-24 12:14:13 -07:00
Dylan Baker b6c8b8a5be compilers/mixins/pgi: Make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 6dc774f1b6 compilers/mixins/islinker: Make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker 8ee1e6b768 compilers/mixins/intel: make type safe 2020-09-24 12:14:13 -07:00
Dylan Baker a0a8ef567e compilers/mixins/intel: Use the has_func_attribute_extra_args function
Instead of putting that extra argument in the base compiles() class
2020-09-24 12:14:13 -07:00