Jussi Pakkanen
21d8505825
build_by_default it is.
8 years ago
Jussi Pakkanen
58878b998d
Get rid of hasattr.
8 years ago
Jussi Pakkanen
db8ad2a4bd
Add test for build_on_all.
8 years ago
Jussi Pakkanen
7abc7c64b0
Created base class for all targets and moved common functionality there.
8 years ago
Elliott Sales de Andrade
78b030cf19
Add support for Files passed to generators.
...
I need this for windows.compile_resources to be able to use
configure_file results, but it may have other benefits.
8 years ago
Mike Sinkovsky
5b626ab4cb
style: [E1**] Indentation
8 years ago
Mike Sinkovsky
c8981bdd1b
style: [E711] comparison to None should be 'if cond is None:'
8 years ago
Jussi Pakkanen
00f62d0755
Can get values in ConfigurationData objects.
8 years ago
Jussi Pakkanen
fdd0675661
Better error messages. Closes #1284 .
8 years ago
Jussi Pakkanen
ee8a6e6fc5
Can specify test setups and run them with mesontest.
8 years ago
Igor Gnatenko
f0bc5568a7
style: fix E703 violations
...
E703: statement ends with a semicolon
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
969dc7e995
style: fix E124 violations
...
E124: closing bracket does not match visual indentation
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
116da33cdd
style: fix E128 violations
...
E128: continuation line under-indented for visual indent
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
f19bec34a9
style: fix E271 violations
...
E271: multiple spaces after keyword
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
ef608f217d
style: fix E222 violations
...
E222: multiple spaces after operator
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Jussi Pakkanen
b55235dfbd
Fix space before :.
8 years ago
Elliott Sales de Andrade
18c38df875
Add Generator.process_files to reduce code duplication.
8 years ago
Nirbheek Chauhan
0ac965cc10
Fix shared library symlink aliasing on install
...
Set the rules for the symlinking on the target itself, and then reuse
that information while generating aliases during the build, and then
pass it to the install script too.
8 years ago
Elliott Sales de Andrade
c7f788e184
Fix exception when linking with invalid object.
...
If you declare_dependency(link_with : 'string'), an exception is
supposed to be raised, but instead of a proper message, it's an
exception about a missing attribute.
8 years ago
Jussi Pakkanen
98c4fd2d5d
Add per target argument for Fortran.
8 years ago
Nirbheek Chauhan
589a56e78f
Cache the scripts used for postconf and install phases
...
Cache the absolute dir that the script is searched in and the name of
the script. These are the only two things that change.
Update the test to test for both #1235 and the case when a script of the
same name is in a different directory (which also covers the subproject
case).
Closes #1235
8 years ago
Igor Gnatenko
139e020ede
tree-wide: use proper 'not in' notation
...
Let's be more pythonic and 'not is' seems really weird.
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
8268eb4959
tree-wide: remove unused imports
...
./setup.py:17:1: F401 'os' imported but unused
import os
^
./setup.py:37:1: F401 'stat.ST_MODE' imported but unused
from stat import ST_MODE
^
./run_tests.py:17:1: F401 'os' imported but unused
import subprocess, sys, os
^
./run_tests.py:18:1: F401 'shutil' imported but unused
import shutil
^
./run_unittests.py:23:1: F401 'mesonbuild.dependencies.Qt5Dependency' imported but unused
from mesonbuild.dependencies import PkgConfigDependency, Qt5Dependency
^
./mesonbuild/build.py:15:1: F401 '.coredata' imported but unused
from . import coredata
^
./mesonbuild/interpreter.py:32:1: F401 'subprocess' imported but unused
import os, sys, subprocess, shutil, uuid, re
^
./mesonbuild/interpreter.py:32:1: F401 're' imported but unused
import os, sys, subprocess, shutil, uuid, re
^
./mesonbuild/dependencies.py:23:1: F401 'subprocess' imported but unused
import os, stat, glob, subprocess, shutil
^
./mesonbuild/mesonlib.py:17:1: F401 'sys' imported but unused
import platform, subprocess, operator, os, shutil, re, sys
^
./mesonbuild/modules/qt5.py:15:1: F401 'subprocess' imported but unused
import os, subprocess
^
./mesonbuild/modules/pkgconfig.py:15:1: F401 '..coredata' imported but unused
from .. import coredata, build
^
./mesonbuild/scripts/scanbuild.py:15:1: F401 'sys' imported but unused
import sys, os
^
./mesonbuild/scripts/meson_exe.py:20:1: F401 'subprocess' imported but unused
import subprocess
^
./mesonbuild/scripts/meson_exe.py:22:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/symbolextractor.py:23:1: F401 'subprocess' imported but unused
import os, sys, subprocess
^
./mesonbuild/scripts/symbolextractor.py:25:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/meson_install.py:19:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/yelphelper.py:15:1: F401 'sys' imported but unused
import sys, os
^
./mesonbuild/scripts/yelphelper.py:20:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException
^
./mesonbuild/backend/vs2010backend.py:17:1: F401 're' imported but unused
import re
^
./test cases/vala/8 generated sources/src/copy_file.py:3:1: F401 'os' imported but unused
import os
^
./test cases/common/107 postconf/postconf.py:3:1: F401 'sys' imported but unused
import sys, os
^
./test cases/common/129 object only target/obj_generator.py:5:1: F401 'shutil' imported but unused
import sys, shutil, subprocess
^
./test cases/common/57 custom target chain/usetarget/subcomp.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/95 dep fallback/subprojects/boblib/genbob.py:3:1: F401 'os' imported but unused
import os
^
./test cases/common/98 gen extra/srcgen.py:4:1: F401 'os' imported but unused
import os
^
./test cases/common/113 generatorcustom/gen.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/113 generatorcustom/catter.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/59 object generator/obj_generator.py:5:1: F401 'shutil' imported but unused
import sys, shutil, subprocess
^
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Nirbheek Chauhan
c693bd9bb4
Allow passing arguments to install scripts
...
Closes #1213
8 years ago
Nirbheek Chauhan
d5f7ba862b
gnome.mkenums: Use absolute paths for all commandline args
...
Closes #973
test cases/vala/8 generated sources/ tests this.
8 years ago
Nirbheek Chauhan
2c83bd16fc
Test targets with only generated and prebuilt objects
8 years ago
Nirbheek Chauhan
038b15a7b2
Add __repr__ for ExtractedObjects and better error for Vala libraries
8 years ago
Nirbheek Chauhan
d766475176
Use the linker to determine if we are using MSVC
...
This is much more accurate since this is actually what determines what
file naming to use and whether there will be PDB debugging information
or not.
Closes #1169
8 years ago
Nirbheek Chauhan
82a77609e8
Query the target itself for the dynamic linker
...
This greatly improves the logic for determining the linker. Previously,
we would completely break if a target contained only extracted objects
and we were using more than one compiler in our project.
This also fixes determination of the linker if our target only contains
generated objc++ sources, and other funky combinations.
8 years ago
Nirbheek Chauhan
0fc4ad2a0b
Also use objects to populate target compilers
...
This avoids us having no compilers at all for targets that are composed
entirely of objects with no sources.
Now we will always have a compiler for a target even if it is composed
entirely of objects generated with custom targets unless it has
completely unknown sources.
8 years ago
Nirbheek Chauhan
7b3d00fee4
Use dict for self.build.compilers instead of list
...
Everywhere we use this object, we end up iterating over it and comparing
compiler.get_language() with something. Using a dict is the obvious
choice and simplifies a lot of code.
8 years ago
Jussi Pakkanen
6d84b9b646
Created new shared module build target type, and make sure -Wl,--no-undefined is not used when linking it.
8 years ago
Jussi Pakkanen
07d7e87411
Allow soname to be an arbitrary string and fix symlink generation.
8 years ago
Nirbheek Chauhan
864b9b1957
Only check for unity compat when doing unity builds
...
Also don't bother setting self.unity_compatible since it will never be
checked.
Closes #1097
8 years ago
Jussi Pakkanen
c9a46fcc93
Can set compiler arguments in Java.
8 years ago
Jussi Pakkanen
a01919976e
Always specify installed data with a File object. Closes #858 .
8 years ago
Guillaume Poirier-Morency
b2a39dd06e
vala: Generate GIR into the build directory ( fix #185 )
...
Add a Vala test generating GIR and typelib files.
8 years ago
Thibault Saunier
85a0cd7635
Add new add_project_[link]_args functions
...
Fixes 979
8 years ago
Nirbheek Chauhan
a2262103fb
Implement mlog.warning and use it everywhere for warnings
...
Prepends the string with 'WARNING:' in ANSI yellow.
Closes https://github.com/mesonbuild/meson/issues/961
8 years ago
Jussi Pakkanen
6762d30c6a
Exposes the install names of targets in introspection. Closes #829 .
8 years ago
Guillaume Poirier-Morency
114b5b0637
vala: Use 'vala_header' and 'vala_vapi' directly
...
Move the fallback logic into 'BuildTarget.process_kwargs' to use the
target name instead.
8 years ago
Guillaume Poirier-Morency
ff6b3c7a2d
vala: Custom header and vapi name ( fix #892 )
8 years ago
Nirbheek Chauhan
70265c3782
Improve error when using the dependencies kwarg
...
The error message is misleading (talks about external dependencies), and
doesn't tell you what you need to do (use the output of
declare_dependency, dependency, or find_library). At the same time
rename add_external_deps to add_deps since it adds internal deps too.
Plus many more error message improvements all over the place.
8 years ago
Nirbheek Chauhan
57ce7d4618
Add support for extracting objects in unity builds
...
Not only does extract_all_objects() now work properly again,
extract_objects() also works if you specify a subset of sources all of
which have been compiled into a single unified object.
So, for instance, this allows you to extract all the objects
corresponding to the C sources compiled into a target consisting of
C and C++ sources.
8 years ago
Nirbheek Chauhan
6f4406928b
BuildTarget: Add compilers needed by generated sources
8 years ago
Nirbheek Chauhan
65e9761cb1
Support all kinds of generated vala and vapi sources
...
This is the first step in making Vala support have feature-parity with
C/C++ support. Vala and Vapi sources generated with Generators and
CustomTargets are no longer ignored. Dependencies are setup properly and
they are added to the commandline.
8 years ago
Nirbheek Chauhan
419b84784f
CustomTarget: Use get_outputs() instead of get_filename()
...
get_filename() made no sense for CustomTarget since it can have multiple
outputs. Also use get_outputs() for GeneratedList since it has the same
meaning and remove unused set_generated().
As a side-effect, we now install all the outputs of a CustomTarget.
8 years ago
Elliott Sales de Andrade
779788ad82
Split generator @BASENAME@ at the first extension.
8 years ago
Nirbheek Chauhan
d819914af0
pkgconfig: Warn if library has name_prefix/suffix set
...
GCC/Clang won't be able to find it via an -lfoo flag, so the pkg-config
file might be unusable.
Fixes https://github.com/mesonbuild/meson/issues/889
8 years ago
Jussi Pakkanen
28df8b800e
Add an option to select if static libraries are built with -fPIC.
8 years ago