Commit Graph

2790 Commits

Author SHA1 Message Date
Thibault Saunier 28cd23ab6e wrap: Make sure that the cloned git repo is properly cloned 2016-11-22 14:24:36 -03:00
Jussi Pakkanen 621219ccb0 Removed duplicate log message for command running. Closes #1056. 2016-11-17 00:20:36 +02:00
Elliott Sales de Andrade d45db903ac Rename test cases to remove duplicate numbers. 2016-11-14 13:50:31 -05:00
Jussi Pakkanen 070c6a72b2 Bump version for new development. 2016-11-14 20:49:06 +02:00
Jussi Pakkanen 4e3073f90a Updated version number for release. 2016-11-14 20:19:43 +02:00
Elliott Sales de Andrade 330aebc186 Fix message to be checked in Qt5 unit test. 2016-11-14 11:45:23 -05:00
Nirbheek Chauhan b438455ec1 Hotfix for cross-compilation from Windows to Linux
We currently pass cross-compiler options to the native compiler too and
when cross-compiling from Windows to Linux, `options` will contain
Linux-specific options which doesn't include `c_winlibs`.

The proper fix is to allow cross-info files to specify compiler options
and to maintain both cross and native compiler options in coredata, but
that will have to be done after the 0.36.0 release.

Also fixes a typo in MinGW cpp_winlibs option setting.

Closes #1029
2016-11-14 11:44:51 -05:00
Igor Gnatenko 900438882c trivial: remove executable bits on gnome framework
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-11-14 11:44:21 -05:00
Jussi Pakkanen c23c822196 Only add src_include_dir if it has been defined. 2016-11-14 11:43:37 -05:00
Jussi Pakkanen 8b05990c13 Disable gresource dependency generation as it breaks Ninja. 2016-11-14 11:43:24 -05:00
Jussi Pakkanen 382917ee8f More robust link check. 2016-11-14 11:42:58 -05:00
Elliott Sales de Andrade 155f163341 Use portable path separator in wrappers.
The semicolon only separates paths on Windows, but the wrapper is
sometimes used on other platforms.
2016-11-13 12:39:03 -05:00
Jussi Pakkanen 08c82fd17c Merge pull request #1042 from centricular/fix-qt4-testcase-qtwidgets
qt: Fix qmake detection on Linux and Windows
2016-11-13 12:38:17 -05:00
Jussi Pakkanen dd8af1b56e Added new files to manifest. 2016-11-13 11:01:06 -05:00
Jussi Pakkanen 918b8d098d GTest and GMock changed their entire project layout on 1.8.0. Again. Fix it. 2016-11-13 11:00:04 -05:00
Nirbheek Chauhan 0f92b7d97c tests/4 qt: Test that invalid modules are not found 2016-11-13 16:50:09 +05:30
Nirbheek Chauhan 954038b7c1 tests/4 qt: Don't search for QtWidgets with Qt4
Doesn't exist on qt4, and causes the test case to not run at all.
2016-11-13 16:50:09 +05:30
Nirbheek Chauhan 69aafd141e qt: Fix qmake detection on Linux and Windows
qmake for both Qt4 and Qt5 detection was assuming that it was only used
on Windows, which is incorrect. It can also be used on Linux for
cross-compilation or in general when pkg-config is not available.

It was also not failing properly for both Qt5 and Qt4 when no libraries
were found, and was assuming that the .dll was always available.

Qt4 detection with qmake was also completely broken.

Also prevents unwanted injection of partially-found qt dependencies in
targets by unsetting self.cargs and self.largs
2016-11-13 16:50:09 +05:30
Guillaume Poirier-Morency b2a39dd06e vala: Generate GIR into the build directory (fix #185)
Add a Vala test generating GIR and typelib files.
2016-11-12 18:03:24 -05:00
Jussi Pakkanen 59a414283c Merge pull request #1022 from centricular/fix-girtarget-deps-includes
gnome.generate_gir: Add gir deps and includes recursively
2016-11-12 18:01:28 -05:00
Jussi Pakkanen e1ecb95d1d Merged generate_gir fix. 2016-11-13 00:43:06 +02:00
Nirbheek Chauhan 4b7ddfbce7 Add a test for gir dependencies and includes
MesonDep1 doesn't use symbols from MesonDep2, but uses the MesonDep2
structure definition (so it only needs the header). This means only
generate_gir needs a dependency on MesonDep2 and shared_library doesn't.
This was broken earlier.

MesonSample uses symbols from MesonDep1 and MesonDep2, so both the
library and the gir get a dependency on MesonDep1, and on MesonDep2
(transitively). The transitive dependency was broken earlier.
2016-11-13 04:06:51 +05:30
Thibault Saunier 85a0cd7635 Add new add_project_[link]_args functions
Fixes 979
2016-11-12 17:34:06 -05:00
Nirbheek Chauhan 69dcbb6ec9 gnome.generate_gir: Add gir deps and includes recursively
Earlier, we were never adding dependencies on other GirTargets that we
need. The dependency would only be added indirectly through other
BuildTargets such as SharedLibrary. Now we add all GirTargets specified
in the `dependencies :` kwarg to the list of dependencies of the
GirTarget that we generate.

Also, we weren't adding include directories for the typelib generation
command recursively. We were only adding it for the GirTargets listed
under the `dependencies :` kwarg to gnome.generate_gir. Now we search
all link targets, find GirTargets, extract the include dir, and use it.

In summation, dependencies were completely broken.
2016-11-13 03:57:58 +05:30
Nirbheek Chauhan 085650a1e3 vala: Implement valac.find_library
Move CCompiler.compile to Compiler.compile so that ValaCompiler can use
it. Also rewrite ValaCompiler.sanity_check to use it since it does
a simple compile check.

At the same time, it enhances ExternalLibrary to support arguments for
languages other than C-like.

Includes a test for this that links against zlib through Vala.

Closes #983
2016-11-12 13:56:17 -05:00
Nirbheek Chauhan 4cdd22f094 tests: Optional fallback subprojects can fail
Tests https://github.com/mesonbuild/meson/issues/975
2016-11-12 13:28:25 -05:00
Olexa Bilaniuk 05e217caa5 Fixed SyntaxError in itstool invocation in yelphelper.py during
installation.

During a `python3.4 setup.py install`, the yelphelper.py script errors
out with: "SyntaxError: can use starred expression only as assignment
target". Fix this problem.
2016-11-12 13:06:16 -05:00
Jussi Pakkanen 28b70ba4e5 Merge pull request #1010 from centricular/qt5-broken-moc-detection
Overhaul Qt4/5 detection with pkg-config/qmake and improve moc/uic/rcc detection
2016-11-12 12:19:28 -05:00
Jussi Pakkanen 1d9c40c9c3 Merge pull request #1027 from centricular/has-header-prefix
cc.has_header: Allow specifying a prefix for headers
2016-11-12 12:16:16 -05:00
Nirbheek Chauhan 55288b0fcc scripts/gtkdochelper: ignore_headers is a list
Also, only add it if it's defined.

Closes #1020
2016-11-12 11:54:13 -05:00
Scott D Phillips 3db969336f compilers: add werror flag for msvc 2016-11-12 11:51:59 -05:00
Nirbheek Chauhan 3a84136268 Fix regex used in custom target evaluation
Instead of using a whitelist, use a blacklist. Also print a more useful
error if the regex fails to match.

Use an underscore in the gir test to trigger this.

Fixes #436
2016-11-12 11:51:37 -05:00
Jussi Pakkanen 1e0ae0a083 Revert "vala: Build with '--nostdpkg'", MR #920
This reverts commit 0f098c37ae.
2016-11-12 18:46:51 +02:00
Nirbheek Chauhan 45996b0f92 vala: Fix compiled object extraction
Fixes #791
2016-11-12 11:37:14 -05:00
Jussi Pakkanen 434bb03743 Merge pull request #997 from tp-m/copy-mutable-variables-on-assignment
Copy mutable variables on assignment (configuration_data and environment)
2016-11-12 11:35:57 -05:00
Jussi Pakkanen 4fbc5bcb44 Merge pull request #1019 from alvarez86/gcc_dump_version
Gcc dump version
2016-11-12 11:28:46 -05:00
Guillaume Poirier-Morency 0f098c37ae vala: Build with '--nostdpkg'
Since Vala require 'glib-2.0' and 'gobject-2.0' dependencies, it's
better to fail at 'valac' step with meaningful error.

Add missing 'gobject-2.0' dependency on the mixed source test case.
2016-11-12 10:55:47 -05:00
Paulo Antonio Alvarez 1e54a5e73c environment: Use GNU defines to get version of c, c++, objc and fortran
According to
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html,
the macros used to get the version are always defined for those
languages, so use them to get the version.
2016-11-11 08:11:43 -02:00
Paulo Antonio Alvarez 582e1ede80 environment: Static method to get gcc version from compiler defines
The method takes a dictionary with defines names as keys and the defines
values as values. From it, we assemble the gcc version, using 0 as a
default value if the define we want is not defined.
2016-11-11 07:26:51 -02:00
Nirbheek Chauhan ba316a0dff common/37 has header: Add a test for prefixes 2016-11-11 11:19:21 +05:30
Nirbheek Chauhan aa5afba00b cc.has_header: Allow specifying a prefix for headers
Fixes #1026
2016-11-11 10:25:34 +05:30
Nirbheek Chauhan cedfa575f6 Add a unit test for Qt5 detection with qmake
This can only be done as a unit test because it requires changes to the
environment. This also means we need to pass the current environment to
subprocess.check_output, which we should always do anyway since the
environment is torn down and restored between each test.
2016-11-11 01:51:30 +05:30
Nirbheek Chauhan 14c5e17b0a tests: Remove outdated qt4 manual test and rename qt5 automated test
qt5 framework test now also tests qt4, and will test qt6 if/when it
comes out.
2016-11-11 01:51:03 +05:30
Nirbheek Chauhan 19a06d9033 qt4, qt5 modules: Improve moc/uic/rcc detection
Instead of blindly searching in PATH, use
Qt5Dependency.compilers_detect() (same for qt4) to get moc/uic/rcc.

This is much more robust, and it improves the chances that the correct
ones will be found. We still manually verify for now because the
fallback in dependencies.py for searching is stll to look in PATH for
backwards-compat, and because people probably have setups like that.

Also sync the qt4 module with the qt5 module w.r.t. resource compilation
and make the compiled qrc.cpp file unique in terms of the framework
version used (4 vs 5). This is needed for the test to work properly,
which now covers both Qt4 and 5.
2016-11-11 01:51:02 +05:30
Nirbheek Chauhan a72740a0d1 qt deps: New abstract impl and several fixes
* Simpler picking of pkg-config vs qmake detection
* qmake-based detection now allows specifying qmake via cross-info
* bindir is now stored from qmake/pkg-config detection and can be used
  to detect qt tools such as moc, uic, rcc with self.compilers_detect()
* Qt4 dependencies got some love; now they share the implementation with
  Qt5 since the two are very similar; basically identical
* Don't ask about Qt3
2016-11-11 01:51:02 +05:30
Nirbheek Chauhan 3fe5fcd7f7 qt4/qt5: Print a message when moc/uic/rcc aren't found
Without this a strange exception is spewed that no one would be able to
understand. Finding each of those compilers isn't a problem unless
sources are specified that require those compilers, so only error out in
those cases.

Closes #758
2016-11-11 01:51:02 +05:30
Jussi Pakkanen e02aaad632 Merge pull request #1011 from centricular/runtarget-files-rel-builddir
ninja: Pass absolute path of files to run targets
2016-11-10 14:47:35 -05:00
Jussi Pakkanen fd425d56a5 Merge pull request #991 from mesonbuild/wip/tingping/gresource-depfile
gnome: Use depfile support of recent glib-compile-resources
2016-11-10 14:08:32 -05:00
Jussi Pakkanen dc10945ad7 Merge pull request #995 from centricular/more-appveyor-builds
appveyor.yml: Test more than just MSVC2010 + Ninja on x86
2016-11-09 15:00:46 -05:00
Jussi Pakkanen 5603f90287 Allow tests to mark themselves as skipped during runtime. 2016-11-09 15:00:28 -05:00