aboutsummaryrefslogtreecommitdiff
BranchCommit messageAuthorAge
0.35.1Update version number for release.Jussi Pakkanen9 years
0.41Update all versions to 0.41.2Nirbheek Chauhan8 years
0.42Updated version number for 0.42.1 release.Jussi Pakkanen8 years
0.42-msiMake all functionality invokable via the main Meson binary,Jussi Pakkanen8 years
0.44Bump version to 0.44.1 for releaseNirbheek Chauhan7 years
0.45Fix appveyor failures: do not use PowerShell since it triggers NativeCommandE...Aleksey Filippov7 years
0.46Update versions to 0.46.1 for stable releaseNirbheek Chauhan7 years
0.47Test + fix for not-found dependency fallback version comparisonNirbheek Chauhan7 years
0.48Update version number for release.Jussi Pakkanen7 years
0.49Bump version to 0.49.2 for releaseNirbheek Chauhan7 years
0.50Update version numbers for release.Jussi Pakkanen6 years
0.51Bump versions to 0.51.2 for releaseNirbheek Chauhan6 years
0.52Update version numbers for 0.52.1 stable releaseNirbheek Chauhan6 years
0.53azure ci: Test x86 Visual Studio builds againNirbheek Chauhan5 years
0.54Bump versions to 0.54.3 for releaseNirbheek Chauhan5 years
0.55Bump versions to 0.55.3 for releaseNirbheek Chauhan5 years
0.56Bump to 0.56.2 for releaseNirbheek Chauhan5 years
0.57Bump to 0.57.2 for releaseNirbheek Chauhan4 years
0.58Bump versions to 0.58.1 for stable releaseNirbheek Chauhan4 years
0.59Bump versions to 0.59.1 for releaseNirbheek Chauhan4 years
0.60Revert use of thin archives in 0.60 branch.Olexa Bilaniuk4 years
0.61Bump versions to 0.61.3 for releaseNirbheek Chauhan3 years
0.62Bump versions to 0.62.1 for releaseNirbheek Chauhan3 years
0.63Bump versions to 0.63.2 for releaseNirbheek Chauhan3 years
0.63.0-ifortCI: install ifort on WindowsEli Schwartz3 years
0.64Bump versions to 0.64.1 for releaseNirbheek Chauhan3 years
0.pypy-testpypy debugEli Schwartz3 years
0.pypy-test-2python module: windows dll name for pypy needs special casingMatti Picus3 years
0.trymedebugEli Schwartz2 years
1.0set default install_tag of python.install_sources() to "python-runtime"Peter Urban2 years
1.0000000000000000000000001check CI issuesEli Schwartz24 months
1.1Bump versions for 1.1.1 releaseNirbheek Chauhan2 years
1.2Bump versions to 1.2.1 for releaseNirbheek Chauhan24 months
1.87654321unittests: fix test_scripts_loaded_modules matching exactly our own modulesCharles Brunet2 years
1.trymeazure pipelines: force python2 to be installedEli Schwartz2 years
58rc1Bump version number for rc1.Jussi Pakkanen4 years
add-configuration-configure_FileUpdate configure_file.yamlDylan Baker4 years
appleldFix Xcode 15 beta linker detection. Closes #11958.Jussi Pakkanen2 years
asmfixDo not test aarch64 as the assembly has not been written.Jussi Pakkanen5 years
biggenAdd support for opaque build targets. Closes #10627.Jussi Pakkanen3 years
builddirupgradeCan upgrade build directory from an old version.Jussi Pakkanen7 years
buildtyperemainsKeep buildtype the same even if user changes debug and/or optimization.Jussi Pakkanen5 years
capitalizationCapitalize "Meson" consistently as it is a proper name. [skip ci]Jussi Pakkanen5 years
cfortfixFix combining C and Fortran. Closes #8377.Jussi Pakkanen4 years
checknetworkdSkip wrapdb test if there is no connectivity.Jussi Pakkanen3 years
cigreenDocument new rules for green CI.Jussi Pakkanen4 years
clangclrustDisable Rust + clangcl.Jussi Pakkanen4 years
clangformatcheckDo not accidentally format files when only checking if they are formatted.Jussi Pakkanen4 years
clangsanitizeFix Clang windows linker detection.Jussi Pakkanen6 years
cleandeadDelete old outputs that are no longer in the Ninja file.Jussi Pakkanen4 years
cleanstrayPurge persistent Ninja state when doing a full reconfigure.Jussi Pakkanen2 years
corporationsAdd page listing Meson usage in proprietary projects.Jussi Pakkanen3 years
cpp23Add c++23 to the list of C++ standards.Jussi Pakkanen2 years
cppmodulesGenerate dependency scanning hooks in the Ninja file.Jussi Pakkanen5 years
cppnorthAdd CppNorth talk.Jussi Pakkanen2 years
crossargfixStore global and project arguments separately for cross and native compilation.Jussi Pakkanen7 years
crossenvvarProperly error out when cross file is missing a compiler.Jussi Pakkanen3 years
cudacustomAdd custom entyr to cuda buildtype dict. Closes #8336.Jussi Pakkanen4 years
cudafix0572Strip host-compiler -std flag from NVCC line.Olexa Bilaniuk4 years
cudamemDisable asan memory leak checks on a Cuda test.Jussi Pakkanen4 years
cygwindisableagainDisable broken asm test on Cygwin as nobody knows how to fix it.Jussi Pakkanen4 years
cygwindisabletestDisable failing Cygwin GIR test.Jussi Pakkanen4 years
darwin_archmacos: detect old OS/cpu 64-bit CPU in 32-bit MacOS kernelMichael Hirsch, Ph.D6 years
dcbAdd detection code for powerpc64le.Jussi Pakkanen2 years
debcrossfixesAdd CMake to cross file.Jussi Pakkanen3 years
debianfixRemove installation scheme tweaking hack.Jussi Pakkanen3 years
debpy310String "local" bits from system paths.Jussi Pakkanen3 years
delghwtDelete ghwt.py as it is no longer needed or even works.Jussi Pakkanen4 years
deterministichashMake environment objects hash deterministically.Jussi Pakkanen4 years
dimpdirUse include_directories for D impdirs.Jussi Pakkanen7 years
dirc2One more dircondensation for rc1.Jussi Pakkanen3 years
dircondenseCondense test directory names in preparation for rc1.Jussi Pakkanen4 years
dircondense2Condense test directory names again.Jussi Pakkanen5 years
dircondense64Condense test directory names.Jussi Pakkanen3 years
disable32rustwinDisable vs2017 + 32bit Rust combo as it is broken.Jussi Pakkanen4 years
docbuildGenerated docs if hotdoc is installed.Jussi Pakkanen8 years
docdelghwtRemove docs for ghwt that got deleted ages ago.Jussi Pakkanen4 years
docimagelinksFix image link names.Jussi Pakkanen4 years
docrewrapRewrap long text lines in docs. [skip ci]Jussi Pakkanen5 years
dolphinRenamed test dir.Jussi Pakkanen8 years
dotincludeAdd option to disable implicit include directories. Closes #2139.Jussi Pakkanen8 years
dverfixFix D module version declaration.Jussi Pakkanen2 years
eli/ci-shellCI: cygwin coverage uploader needs to run in bash tooEli Schwartz2 years
eli/submit/doc-no-pr-publishAdd kernel and userland properties to machine objects.Jussi Pakkanen2 years
emptysubdirGuard against empty string in subdir().Jussi Pakkanen3 years
endmessageAdd end_message to print status messages on successfull exit.Jussi Pakkanen7 years
env2crossAdd new env2cross command.Jussi Pakkanen3 years
env2mfileAdd new env2mfile command.Jussi Pakkanen3 years
env2mfilefixFix writing single strings in env2mfile.Jussi Pakkanen3 years
envvarfixupSplit environment variable and command line cflagsDylan Baker4 years
es/0.61-plus-cythonBump versions to 0.61.4 for releaseNirbheek Chauhan3 years
eschwartz/python-lib-install-dirtests: python module should install files correctlyEli Schwartz4 years
exewrapfixFix exe wrapper detection for run targets.Jussi Pakkanen4 years
failcheckFix validation regexes to handle rc version numbers.Jussi Pakkanen2 years
fatalhotdocEnable fatal warnings in HotDoc when building website.Jussi Pakkanen4 years
fedoraSplit generator @BASENAME@ at the first extension.Elliott Sales de Andrade9 years
fgetcfixMake generator exe more resilient.Jussi Pakkanen2 years
filecleanupDelete leftover files from some tests.Jussi Pakkanen4 years
fix7611Make MSVC accept gnu11 as a language standard version. Closes: #7611.Jussi Pakkanen5 years
fix7920Do not store config parser object in Wrap object. Closes: #7920.Jussi Pakkanen5 years
fix7975The version kwarg must be a string. Closes #7975.Jussi Pakkanen5 years
fixciFix mypy CI.Jussi Pakkanen3 years
fixlintFix pylint.Jussi Pakkanen2 years
fixmacciDisable D test on macOS as it fails mysteriously.Jussi Pakkanen4 years
fixplainwinReplace Unix shell commands with scripts.Jussi Pakkanen4 years
flexfixPass a test file to flex test.Jussi Pakkanen4 years
flexunityForce unity builds off in Flex test.Jussi Pakkanen4 years
flobadded cuda test caseBeau Johnston7 years
fortrancaseFix Fortran dep scanner for upper case file extensions. Closes #8395.Jussi Pakkanen4 years
fortranmodscanExtend the C++ module scanner to handle Fortran, too.Jussi Pakkanen5 years
fromlongmsgStrip out garbage debug text.Jussi Pakkanen2 years
gccmodulesAdd some scaffolding needed for C++ modules in GCC.Jussi Pakkanen3 years
gencustomGenerators can depend on custom targets as well as build targets.Jussi Pakkanen5 years
gentargetAdd just enough backend to make the simple case work.Jussi Pakkanen5 years
gh-pagesMade this a redirect.Jussi Pakkanen10 years
gnuobjcAdd gnuXX stds to Objective C.Jussi Pakkanen4 years
ignorebuilddirAdd VCS ignore files to build dir on creation. Closes #6509.Jussi Pakkanen5 years
ignoreencodingerrorsIgnore encoding errors when scanning. Closes #10571.Jussi Pakkanen3 years
immufixMark even empty confs used appropriately.Jussi Pakkanen7 years
implicitcustomDo not add custom target dir automatically when implicit false. Closes #8562.Jussi Pakkanen4 years
includeviolationWarn when grabbing internals of subprojects with include_directories.Jussi Pakkanen4 years
installdirAllow for missing install_dir in install_data()Peter Hutterer7 years
installdocDescribe array values in install_dir. [skip ci]Jussi Pakkanen6 years
intrcmdUse a temp file to invoke the introspection command.Jussi Pakkanen3 years
ioscrossUpdate iphone cross building.Jussi Pakkanen4 years
javacrossAlways generate Java rule, it is platform agnostic.Jussi Pakkanen4 years
joinelseMerge if and else tests to a single project.Jussi Pakkanen4 years
jslibsAdd support for finding Javascript source libraries with Emscripten.Jussi Pakkanen4 years
keepbackendPrevent changing backend during reconfigure.Jussi Pakkanen2 years
killhfsRemove HFS workaround as everyone should use APFS by now.Jussi Pakkanen4 years
killpy3Convert all test from the python3 module to python.Jussi Pakkanen3 years
lang-enumMerge remote-tracking branch 'upstream/master' into lang-enumJohn Ericson5 years
limitparLimit parallelism to hopefully work on machines with 160 cores.Jussi Pakkanen3 years
linkmsgImprove linker detection failure error message.Jussi Pakkanen4 years
macfixesHandle macOS filesystem sometimes setting lower digits to zero.Jussi Pakkanen4 years
macfixes2Fix building framework test.Jussi Pakkanen4 years
macfixes3Allow gettext test to skip on macOS.Jussi Pakkanen4 years
macinstallUpdate macOS installation instructions.Jussi Pakkanen4 years
macinstallerAdd a script to create macOS installer packages.Jussi Pakkanen4 years
macpkgcleanRemove temp files that the macOS installer builder leaves hanging.Jussi Pakkanen4 years
masterAdjust kernel detection to support Solaris 5.10 or earlierCorrodedCoder22 months
mensinda_temp_fixMerge branch 'refactorFix' into tmp_mergerDaniel Mensinger4 years
mingwdisableDisable asm test on Windows because it is blocking all CI.Jussi Pakkanen8 years
modulestricterOnly do module scanning if C++ version is latest.Jussi Pakkanen5 years
msifixRequire Windows 10 or newer for the MSI package. [skip ci]Jussi Pakkanen4 years
msifixpy39Delete extra data dirs that cause problems for WiX.Jussi Pakkanen4 years
msipkgfixOnly exclude _bootlocale with Python >= 3.10. Closes #9548.Jussi Pakkanen4 years
mtesttempmtest: do not process zero byte reads in read_decode()Hemmo Nieminen3 years
ninjabumpBump Ninja requirement to 1.8.Jussi Pakkanen5 years
ninjalinkAdd option to limit maximum number of concurrent link processes.Jussi Pakkanen8 years
ninjarestatRefresh Ninja cache files on regeneration.Jussi Pakkanen4 years
ninjarevertRemove workaround now that we have a new Ninja.Jussi Pakkanen4 years
ninjaverUse currently detected Ninja version as the minimum required.Jussi Pakkanen5 years
ninjaverdownFix version requirement on Ninja feature.Jussi Pakkanen4 years
nirbheek-vacation-nolife-typo-fixesFix typos in release notes for 0.60.0Nirbheek Chauhan4 years
nirbheek/deprecate-get-option-buildtypeDeprecate get_option('buildtype'), use optimization/debug insteadNirbheek Chauhan5 years
nirbheek/fix-giscannergnome: Always pass absolute -L paths to g-ir-scannerNirbheek Chauhan4 years
nirbheek/fix-x86-vs2017-cici: Use 32-bit Rust and Python on vs2017 x86Nirbheek Chauhan4 years
nirbheek/gnome-mkenums-rspfilegnome.mkenums: Use rspfiles when possibleNirbheek Chauhan6 years
nirbheek/more-buildtype-changesWarn when detecting debug with get_option('buildtype')Nirbheek Chauhan5 years
nirbheek/un-disable-rust-clang-clrust targets: lld-link is the same as link for static libsNirbheek Chauhan4 years
nirbheek/un-disable-rust-vs2017Revert "Disable vs2017 + 32bit Rust combo as it is broken."Nirbheek Chauhan4 years
nirbheek/valac-clang-int-conversiontest cases/vala: Fix clang error during int to pointer coercionNirbheek Chauhan2 years
no_buildNo need to reserve build_ because we use build. instead.Jussi Pakkanen6 years
noechoDo not use 'echo' as it is not available on plain cmd.exeJussi Pakkanen3 years
nopipeRemove -pipe from default list of args. Closes #8508.Jussi Pakkanen4 years
objversionsMake objective C use C standard version. Closes #5495.Jussi Pakkanen4 years
onemoreOne more unixy fix.Jussi Pakkanen4 years
ongoingxcodeXcode: can generate object files with generators.Jussi Pakkanen4 years
openmpitimeoutIncrease OpenMPI timeout to see if it fixes macOS CI test hangs.Jussi Pakkanen4 years
optionlookupUse toplevel key when sp-specific one does not exist.Jussi Pakkanen4 years
optiontreePut subproject options in their own submenus.Jussi Pakkanen9 years
overridesAdd general override functionality. Closes #3001.Jussi Pakkanen4 years
pipdocUpdate instructions on installing with Pip. Closes #9034.Jussi Pakkanen4 years
pkgfixAutodetect installer path location.Jussi Pakkanen2 years
ppcfixImport cpu detection fix from Debian.Jussi Pakkanen2 years
pr8895-oldfix: adapt option-contructior called by buildin-option, added missing argumen...Martin Friedrich4 years
prelinkAdd prelinking support for static libraries.Jussi Pakkanen5 years
progrefactorUse find_program also in add_*_script for consistency.Jussi Pakkanen4 years
providedocAdd doc on how to add the [provide] entry to wrapdb entries. [skip ci]Jussi Pakkanen5 years
py310msiFix MSI creation with Python 3.10.Jussi Pakkanen4 years
pydisttestAdd regression test for Python dist.Jussi Pakkanen3 years
pylogfixValidate that introspection command exited cleanly.Jussi Pakkanen3 years
pym3fixFix purelib and platlib validation in Python3 module.Jussi Pakkanen3 years
pyrefixReplace freezing regex with plain text operations.Jussi Pakkanen3 years
pythonbumpBump minimum supported Python version to 3.6. Closes #6297.Jussi Pakkanen5 years
rcdircondenseCondense test directories for rc1.Jussi Pakkanen2 years
regrfixNon-working fix and test. Closes #8361.Jussi Pakkanen4 years
remove-parse_cmd_line_optionsRemove uneeded `parse_cmd_line_options`John Ericson5 years
removednumbersDo not run tests that use integers in versions with compiler that do not supp...Jussi Pakkanen2 years
rename61rc1Condense test directory numbers for rc1.Jussi Pakkanen4 years
renamesubdirsCondense test directory names for release.Jussi Pakkanen2 years
renumberCondense test directory numbers.Jussi Pakkanen3 years
renumberingFix test case numbers.Jussi Pakkanen3 years
revert-10041-wayland-pkgconfigRevert "wayland: Also lookup scanner in pkgconfig"Eli Schwartz3 years
revert-10757-llvm-configRevert "Add LLVM_CONFIG support"Dylan Baker3 years
revert5323Revert "Merge pull request #5323 from scivision/pgiflang"Jussi Pakkanen6 years
revertoverrideAdd tests for std usage. Closes #5097.Jussi Pakkanen6 years
revertsRevert "interpreter: Fix holder_map not being updated when subproject fails"Jussi Pakkanen4 years
revertthinltoRevert "Add thinlto support. Closes #7493."Jussi Pakkanen5 years
reviewtoolDocument how to run the wrap valídator. [skip ci]Jussi Pakkanen4 years
runsubdirFix run_targets running scripts from different subdirs.Jussi Pakkanen4 years
scanbuildtempdirDo not delete workdir in case scan-build fails.Jussi Pakkanen4 years
sccacheAdd sccache support.Jussi Pakkanen4 years
sdldocAdd tutorial for building an SDL app from scratch.Jussi Pakkanen4 years
sharedwithrustAdd test to build a mixed C/Rust shared library.Jussi Pakkanen4 years
simdixFix alignment with MSVC.Jussi Pakkanen7 years
simplestartAdd simple start page for beginners. [skip ci]Jussi Pakkanen5 years
stricternamesBe more strict about target names with slashes.Jussi Pakkanen4 years
subdirrefacRefactor subdir visitation to track files instead of dirs.Jussi Pakkanen4 years
swiftxcodeAdd swift executable support in Xcode.Jussi Pakkanen4 years
symlinkinreleaseOnly run symlink test from git checkout.Jussi Pakkanen6 years
syspropsAdd kernel and userland properties to machine objects.Jussi Pakkanen2 years
targetbatchCan introspect the whole project in a single batch.Jussi Pakkanen7 years
testcommandAdded documentation.Jussi Pakkanen7 years
testsilencingFix cases where text leaks to stdout in unit tests.Jussi Pakkanen5 years
thinltoAdd thinlto support. Closes #7493.Jussi Pakkanen5 years
timeoutfixHandle freezing tests. Fixes #10752.Jussi Pakkanen3 years
tingping/test-gir-programtests: Test generating gir from programPatrick Griffis9 years
tingping/test-profileAdd profile kwarg to test()Patrick Griffis8 years
tingping/xdg-moduleCreate new xdg modulePatrick Griffis8 years
trigger-ciimage-builderCI: coerce a new image builder run outside the scheduleEli Schwartz2 years
typofixFix typo that breaks g++ cross detection on Debian.Jussi Pakkanen3 years
unittestargSet unittest backend with an argument rather than an envvar.Jussi Pakkanen4 years
useargsintestsUse option args in find_library.Jussi Pakkanen7 years
verfixFix last mention of Python 3.5. [skip ci]Jussi Pakkanen5 years
versionfileRenamed test directory.Jussi Pakkanen6 years
versionfromfileCan read project version from a file.Jussi Pakkanen5 years
vs22Use VS 2022 release version for packaging.Jussi Pakkanen4 years
vs_pch_fixAdd regression test for pch link_whole bug.Jussi Pakkanen3 years
vsasanAdd address sanitizer support for Visual Studio.Jussi Pakkanen4 years
vsenvSet up VS environment automatically when run.Jussi Pakkanen4 years
vsenvfixAlso skip VS activation if gcc is found.Jussi Pakkanen4 years
vsmodfixFix VS C++ module support.Jussi Pakkanen4 years
vsmodtestQ&D experiment to scan and build C++ modules with VS.Jussi Pakkanen6 years
vsmodverUpdate VS module version check.Jussi Pakkanen4 years
wasmthreadcountFix WASM thread count option. Closes #7921.Jussi Pakkanen5 years
wip/default-directoriesExpose a way for distributors to override default directoriesPatrick Griffis8 years
wip/ignatenko/gtesteradd GTest testIgor Gnatenko10 years
wip/tingping/xdg-auto-post-installWIPPatrick Griffis8 years
wip/xclaesse/pr-10714docs: Fix many build_target based issuesDylan Baker2 years
wip/xclaesse/pr-12097backend: Stop converting all "\" to "/" in commandXavier Claessens24 months
wix4Upgrade MSI builder from WiX3 to WiX 4.Jussi Pakkanen2 years
wrapcaseHandle uppercase dependency names in wraps.Jussi Pakkanen5 years
wrapdocsAdded some wrap review docs. [skip ci]Jussi Pakkanen4 years
xclaesse/pr11561-origpkg-config: Allow system program if pkg_config_libdir is setXavier Claessens2 years
xcode1234Xcode: do not link shared modules against executables.Jussi Pakkanen4 years
xcode200Xcode: some more skips.Jussi Pakkanen4 years
xcodecleanXcode: fix project cleaning.Jussi Pakkanen4 years
xcodeeeeeeXcode: one more whole-archive skip.Jussi Pakkanen4 years
xcodeevenmoreFix Xcode targets in subdirs.Jussi Pakkanen4 years
xcodefFix object extraction in the Xcode backend.Jussi Pakkanen4 years
xcodefixFix typos in Xcode backend.Jussi Pakkanen3 years
xcodeforeverWrite include directory names with the correct amount of quoting.Jussi Pakkanen4 years
xcodegalleyXcode: one more skip.Jussi Pakkanen4 years
xcodegodotFix duplicated frameworks in the Xcode backend.Jussi Pakkanen4 years
xcodehalfwayXcode: regenerato project file when build conf changes.Jussi Pakkanen4 years
xcodelibsFix shared libs and using one source in multiple targets.Jussi Pakkanen4 years
xcodeminorHandle same Framework multiple times in Xcode.Jussi Pakkanen3 years
xcodeobjcXcode: make Swift projects work.Jussi Pakkanen4 years
xcodepartnXcode: Fix source generation.Jussi Pakkanen4 years
xcodepoopXcode: handle CustomTargetIndexes.Jussi Pakkanen4 years
xcodeprojecttreeRemove unnecessary hierarchical layer.Jussi Pakkanen4 years
xcoderefactorFix LGTM issues.Jussi Pakkanen4 years
xcodesloggingXcode: fix file objects in various places.Jussi Pakkanen4 years
xcodetunkkiXcode: fix generators that take custom targets as inputs.Jussi Pakkanen4 years
xcodewarnoptLGTM fix.Jussi Pakkanen4 years
xcodexUse correct key for file id lookup.Jussi Pakkanen4 years
xcodezXcode: this is what happens when you do not treat command lines as arrays.Jussi Pakkanen4 years
xcode🥃Xcode: make the test target depend on build_all target.Jussi Pakkanen4 years
 
TagDownloadAuthorAge
1.2.1meson-1.2.1.zip  meson-1.2.1.tar.gz  meson-1.2.1.tar.bz2  Jussi Pakkanen24 months
1.2.0meson-1.2.0.zip  meson-1.2.0.tar.gz  meson-1.2.0.tar.bz2  Jussi Pakkanen2 years
1.2.0rc3meson-1.2.0rc3.zip  meson-1.2.0rc3.tar.gz  meson-1.2.0rc3.tar.bz2  Jussi Pakkanen2 years
1.2.0rc2meson-1.2.0rc2.zip  meson-1.2.0rc2.tar.gz  meson-1.2.0rc2.tar.bz2  Jussi Pakkanen2 years
1.2.0rc1meson-1.2.0rc1.zip  meson-1.2.0rc1.tar.gz  meson-1.2.0rc1.tar.bz2  Jussi Pakkanen2 years
1.1.1meson-1.1.1.zip  meson-1.1.1.tar.gz  meson-1.1.1.tar.bz2  Jussi Pakkanen2 years
1.0.2meson-1.0.2.zip  meson-1.0.2.tar.gz  meson-1.0.2.tar.bz2  Jussi Pakkanen2 years
1.1.0meson-1.1.0.zip  meson-1.1.0.tar.gz  meson-1.1.0.tar.bz2  Jussi Pakkanen2 years
1.1.0rc2meson-1.1.0rc2.zip  meson-1.1.0rc2.tar.gz  meson-1.1.0rc2.tar.bz2  Jussi Pakkanen2 years
1.1.0rc1meson-1.1.0rc1.zip  meson-1.1.0rc1.tar.gz  meson-1.1.0rc1.tar.bz2  Jussi Pakkanen2 years
1.0.1meson-1.0.1.zip  meson-1.0.1.tar.gz  meson-1.0.1.tar.bz2  Jussi Pakkanen2 years
1.0.0meson-1.0.0.zip  meson-1.0.0.tar.gz  meson-1.0.0.tar.bz2  Jussi Pakkanen3 years
1.0.0rc2meson-1.0.0rc2.zip  meson-1.0.0rc2.tar.gz  meson-1.0.0rc2.tar.bz2  Jussi Pakkanen3 years
1.0.0rc1meson-1.0.0rc1.zip  meson-1.0.0rc1.tar.gz  meson-1.0.0rc1.tar.bz2  Jussi Pakkanen3 years
0.64.1meson-0.64.1.zip  meson-0.64.1.tar.gz  meson-0.64.1.tar.bz2  Jussi Pakkanen3 years
0.64.0meson-0.64.0.zip  meson-0.64.0.tar.gz  meson-0.64.0.tar.bz2  Jussi Pakkanen3 years
0.64.0rc2meson-0.64.0rc2.zip  meson-0.64.0rc2.tar.gz  meson-0.64.0rc2.tar.bz2  Jussi Pakkanen3 years
0.64.0rc1meson-0.64.0rc1.zip  meson-0.64.0rc1.tar.gz  meson-0.64.0rc1.tar.bz2  Jussi Pakkanen3 years
0.63.3meson-0.63.3.zip  meson-0.63.3.tar.gz  meson-0.63.3.tar.bz2  Jussi Pakkanen3 years
0.63.2meson-0.63.2.zip  meson-0.63.2.tar.gz  meson-0.63.2.tar.bz2  Jussi Pakkanen3 years
0.63.1meson-0.63.1.zip  meson-0.63.1.tar.gz  meson-0.63.1.tar.bz2  Jussi Pakkanen3 years
0.63.0meson-0.63.0.zip  meson-0.63.0.tar.gz  meson-0.63.0.tar.bz2  Jussi Pakkanen3 years
0.63.0.rc2meson-0.63.0.rc2.zip  meson-0.63.0.rc2.tar.gz  meson-0.63.0.rc2.tar.bz2  Jussi Pakkanen3 years
0.63.0rc1meson-0.63.0rc1.zip  meson-0.63.0rc1.tar.gz  meson-0.63.0rc1.tar.bz2  Jussi Pakkanen3 years
0.61.5meson-0.61.5.zip  meson-0.61.5.tar.gz  meson-0.61.5.tar.bz2  Jussi Pakkanen3 years
0.62.2meson-0.62.2.zip  meson-0.62.2.tar.gz  meson-0.62.2.tar.bz2  Jussi Pakkanen3 years
0.62.1meson-0.62.1.zip  meson-0.62.1.tar.gz  meson-0.62.1.tar.bz2  Jussi Pakkanen3 years
0.61.4meson-0.61.4.zip  meson-0.61.4.tar.gz  meson-0.61.4.tar.bz2  Jussi Pakkanen3 years
0.62.0meson-0.62.0.zip  meson-0.62.0.tar.gz  meson-0.62.0.tar.bz2  Jussi Pakkanen3 years
0.62.0rc2meson-0.62.0rc2.zip  meson-0.62.0rc2.tar.gz  meson-0.62.0rc2.tar.bz2  Jussi Pakkanen3 years
0.61.3meson-0.61.3.zip  meson-0.61.3.tar.gz  meson-0.61.3.tar.bz2  Jussi Pakkanen3 years
0.62.0rc1meson-0.62.0rc1.zip  meson-0.62.0rc1.tar.gz  meson-0.62.0rc1.tar.bz2  Jussi Pakkanen3 years
0.61.2meson-0.61.2.zip  meson-0.61.2.tar.gz  meson-0.61.2.tar.bz2  Jussi Pakkanen3 years
0.61.1meson-0.61.1.zip  meson-0.61.1.tar.gz  meson-0.61.1.tar.bz2  Jussi Pakkanen4 years
0.61.0meson-0.61.0.zip  meson-0.61.0.tar.gz  meson-0.61.0.tar.bz2  Jussi Pakkanen4 years
0.61.0rc1meson-0.61.0rc1.zip  meson-0.61.0rc1.tar.gz  meson-0.61.0rc1.tar.bz2  Jussi Pakkanen4 years
0.60.3meson-0.60.3.zip  meson-0.60.3.tar.gz  meson-0.60.3.tar.bz2  Jussi Pakkanen4 years
0.60.2meson-0.60.2.zip  meson-0.60.2.tar.gz  meson-0.60.2.tar.bz2  Jussi Pakkanen4 years
0.60.1meson-0.60.1.zip  meson-0.60.1.tar.gz  meson-0.60.1.tar.bz2  Jussi Pakkanen4 years
0.59.4meson-0.59.4.zip  meson-0.59.4.tar.gz  meson-0.59.4.tar.bz2  Jussi Pakkanen4 years
0.60.0meson-0.60.0.zip  meson-0.60.0.tar.gz  meson-0.60.0.tar.bz2  Jussi Pakkanen4 years
0.59.3meson-0.59.3.zip  meson-0.59.3.tar.gz  meson-0.59.3.tar.bz2  Jussi Pakkanen4 years
0.60.0rc2meson-0.60.0rc2.zip  meson-0.60.0rc2.tar.gz  meson-0.60.0rc2.tar.bz2  Jussi Pakkanen4 years
0.60.0.rc1meson-0.60.0.rc1.zip  meson-0.60.0.rc1.tar.gz  meson-0.60.0.rc1.tar.bz2  Jussi Pakkanen4 years
0.59.2meson-0.59.2.zip  meson-0.59.2.tar.gz  meson-0.59.2.tar.bz2  Jussi Pakkanen4 years
0.59.1meson-0.59.1.zip  meson-0.59.1.tar.gz  meson-0.59.1.tar.bz2  Jussi Pakkanen4 years
0.58.2meson-0.58.2.zip  meson-0.58.2.tar.gz  meson-0.58.2.tar.bz2  Jussi Pakkanen4 years
0.59.0meson-0.59.0.zip  meson-0.59.0.tar.gz  meson-0.59.0.tar.bz2  Jussi Pakkanen4 years
0.59.0.rc2meson-0.59.0.rc2.zip  meson-0.59.0.rc2.tar.gz  meson-0.59.0.rc2.tar.bz2  Jussi Pakkanen4 years
0.59.0.rc1meson-0.59.0.rc1.zip  meson-0.59.0.rc1.tar.gz  meson-0.59.0.rc1.tar.bz2  Jussi Pakkanen4 years
0.58.1meson-0.58.1.zip  meson-0.58.1.tar.gz  meson-0.58.1.tar.bz2  Jussi Pakkanen4 years
0.58.0meson-0.58.0.zip  meson-0.58.0.tar.gz  meson-0.58.0.tar.bz2  Jussi Pakkanen4 years
0.58.0.rc1meson-0.58.0.rc1.zip  meson-0.58.0.rc1.tar.gz  meson-0.58.0.rc1.tar.bz2  Jussi Pakkanen4 years
0.57.2meson-0.57.2.zip  meson-0.57.2.tar.gz  meson-0.57.2.tar.bz2  Jussi Pakkanen4 years
0.57.1meson-0.57.1.zip  meson-0.57.1.tar.gz  meson-0.57.1.tar.bz2  Jussi Pakkanen4 years
0.57.0meson-0.57.0.zip  meson-0.57.0.tar.gz  meson-0.57.0.tar.bz2  Jussi Pakkanen4 years
0.57.0.rc1meson-0.57.0.rc1.zip  meson-0.57.0.rc1.tar.gz  meson-0.57.0.rc1.tar.bz2  Jussi Pakkanen4 years
0.56.2meson-0.56.2.zip  meson-0.56.2.tar.gz  meson-0.56.2.tar.bz2  Jussi Pakkanen5 years
0.56.1meson-0.56.1.zip  meson-0.56.1.tar.gz  meson-0.56.1.tar.bz2  Jussi Pakkanen5 years
0.56.0meson-0.56.0.zip  meson-0.56.0.tar.gz  meson-0.56.0.tar.bz2  Jussi Pakkanen5 years
0.56.0.rc2meson-0.56.0.rc2.zip  meson-0.56.0.rc2.tar.gz  meson-0.56.0.rc2.tar.bz2  Jussi Pakkanen5 years
0.56.0.rc1meson-0.56.0.rc1.zip  meson-0.56.0.rc1.tar.gz  meson-0.56.0.rc1.tar.bz2  Jussi Pakkanen5 years
0.55.3meson-0.55.3.zip  meson-0.55.3.tar.gz  meson-0.55.3.tar.bz2  Jussi Pakkanen5 years
0.55.2meson-0.55.2.zip  meson-0.55.2.tar.gz  meson-0.55.2.tar.bz2  Jussi Pakkanen5 years
0.55.1meson-0.55.1.zip  meson-0.55.1.tar.gz  meson-0.55.1.tar.bz2  Jussi Pakkanen5 years
0.55.0meson-0.55.0.zip  meson-0.55.0.tar.gz  meson-0.55.0.tar.bz2  Jussi Pakkanen5 years
0.55.0.rc2meson-0.55.0.rc2.zip  meson-0.55.0.rc2.tar.gz  meson-0.55.0.rc2.tar.bz2  Jussi Pakkanen5 years
0.55.0.rc1meson-0.55.0.rc1.zip  meson-0.55.0.rc1.tar.gz  meson-0.55.0.rc1.tar.bz2  Jussi Pakkanen5 years
0.54.3meson-0.54.3.zip  meson-0.54.3.tar.gz  meson-0.54.3.tar.bz2  Jussi Pakkanen5 years
0.54.2meson-0.54.2.zip  meson-0.54.2.tar.gz  meson-0.54.2.tar.bz2  Jussi Pakkanen5 years
0.54.1meson-0.54.1.zip  meson-0.54.1.tar.gz  meson-0.54.1.tar.bz2  Jussi Pakkanen5 years
0.54.0meson-0.54.0.zip  meson-0.54.0.tar.gz  meson-0.54.0.tar.bz2  Jussi Pakkanen5 years
0.54.0.rc1meson-0.54.0.rc1.zip  meson-0.54.0.rc1.tar.gz  meson-0.54.0.rc1.tar.bz2  Jussi Pakkanen5 years
0.53.2meson-0.53.2.zip  meson-0.53.2.tar.gz  meson-0.53.2.tar.bz2  Jussi Pakkanen5 years
0.53.1meson-0.53.1.zip  meson-0.53.1.tar.gz  meson-0.53.1.tar.bz2  Jussi Pakkanen6 years
0.53.0meson-0.53.0.zip  meson-0.53.0.tar.gz  meson-0.53.0.tar.bz2  Jussi Pakkanen6 years
0.52.1meson-0.52.1.zip  meson-0.52.1.tar.gz  meson-0.52.1.tar.bz2  Jussi Pakkanen6 years
0.52.0meson-0.52.0.zip  meson-0.52.0.tar.gz  meson-0.52.0.tar.bz2  Jussi Pakkanen6 years
0.51.2meson-0.51.2.zip  meson-0.51.2.tar.gz  meson-0.51.2.tar.bz2  Jussi Pakkanen6 years
0.51.1meson-0.51.1.zip  meson-0.51.1.tar.gz  meson-0.51.1.tar.bz2  Jussi Pakkanen6 years
0.51.0meson-0.51.0.zip  meson-0.51.0.tar.gz  meson-0.51.0.tar.bz2  Jussi Pakkanen6 years
0.50.1meson-0.50.1.zip  meson-0.50.1.tar.gz  meson-0.50.1.tar.bz2  Jussi Pakkanen6 years
0.50.0meson-0.50.0.zip  meson-0.50.0.tar.gz  meson-0.50.0.tar.bz2  Jussi Pakkanen6 years
0.49.2meson-0.49.2.zip  meson-0.49.2.tar.gz  meson-0.49.2.tar.bz2  Jussi Pakkanen7 years
0.49.1meson-0.49.1.zip  meson-0.49.1.tar.gz  meson-0.49.1.tar.bz2  Jussi Pakkanen7 years
0.49.0meson-0.49.0.zip  meson-0.49.0.tar.gz  meson-0.49.0.tar.bz2  Jussi Pakkanen7 years
0.48.2meson-0.48.2.zip  meson-0.48.2.tar.gz  meson-0.48.2.tar.bz2  Jussi Pakkanen7 years
0.48.1meson-0.48.1.zip  meson-0.48.1.tar.gz  meson-0.48.1.tar.bz2  Jussi Pakkanen7 years
0.48.0meson-0.48.0.zip  meson-0.48.0.tar.gz  meson-0.48.0.tar.bz2  Jussi Pakkanen7 years
0.47.2meson-0.47.2.zip  meson-0.47.2.tar.gz  meson-0.47.2.tar.bz2  Jussi Pakkanen7 years
0.47.1meson-0.47.1.zip  meson-0.47.1.tar.gz  meson-0.47.1.tar.bz2  Jussi Pakkanen7 years
0.47.0meson-0.47.0.zip  meson-0.47.0.tar.gz  meson-0.47.0.tar.bz2  Jussi Pakkanen7 years
0.46.1meson-0.46.1.zip  meson-0.46.1.tar.gz  meson-0.46.1.tar.bz2  Jussi Pakkanen7 years
0.46.0meson-0.46.0.zip  meson-0.46.0.tar.gz  meson-0.46.0.tar.bz2  Jussi Pakkanen7 years
0.45.1meson-0.45.1.zip  meson-0.45.1.tar.gz  meson-0.45.1.tar.bz2  Jussi Pakkanen7 years
0.45.0meson-0.45.0.zip  meson-0.45.0.tar.gz  meson-0.45.0.tar.bz2  Jussi Pakkanen7 years
0.44.1meson-0.44.1.zip  meson-0.44.1.tar.gz  meson-0.44.1.tar.bz2  Jussi Pakkanen7 years
0.44.0meson-0.44.0.zip  meson-0.44.0.tar.gz  meson-0.44.0.tar.bz2  Jussi Pakkanen8 years
0.43.0meson-0.43.0.zip  meson-0.43.0.tar.gz  meson-0.43.0.tar.bz2  Jussi Pakkanen8 years
0.42.1meson-0.42.1.zip  meson-0.42.1.tar.gz  meson-0.42.1.tar.bz2  Jussi Pakkanen8 years
0.42.0meson-0.42.0.zip  meson-0.42.0.tar.gz  meson-0.42.0.tar.bz2  Jussi Pakkanen8 years
0.41.2meson-0.41.2.zip  meson-0.41.2.tar.gz  meson-0.41.2.tar.bz2  Nirbheek Chauhan8 years
0.41.1meson-0.41.1.zip  meson-0.41.1.tar.gz  meson-0.41.1.tar.bz2  Jussi Pakkanen8 years
0.41.0meson-0.41.0.zip  meson-0.41.0.tar.gz  meson-0.41.0.tar.bz2  Jussi Pakkanen8 years
0.40.1meson-0.40.1.zip  meson-0.40.1.tar.gz  meson-0.40.1.tar.bz2  Jussi Pakkanen8 years
0.40.0meson-0.40.0.zip  meson-0.40.0.tar.gz  meson-0.40.0.tar.bz2  Jussi Pakkanen8 years
0.39.1meson-0.39.1.zip  meson-0.39.1.tar.gz  meson-0.39.1.tar.bz2  Jussi Pakkanen8 years
0.39.0meson-0.39.0.zip  meson-0.39.0.tar.gz  meson-0.39.0.tar.bz2  Jussi Pakkanen8 years
0.38.1meson-0.38.1.zip  meson-0.38.1.tar.gz  meson-0.38.1.tar.bz2  Jussi Pakkanen8 years
0.38.0meson-0.38.0.zip  meson-0.38.0.tar.gz  meson-0.38.0.tar.bz2  Jussi Pakkanen9 years
0.37.1meson-0.37.1.zip  meson-0.37.1.tar.gz  meson-0.37.1.tar.bz2  Jussi Pakkanen9 years
0.37.0meson-0.37.0.zip  meson-0.37.0.tar.gz  meson-0.37.0.tar.bz2  Jussi Pakkanen9 years
0.36.0meson-0.36.0.zip  meson-0.36.0.tar.gz  meson-0.36.0.tar.bz2  Jussi Pakkanen9 years
0.35.1meson-0.35.1.zip  meson-0.35.1.tar.gz  meson-0.35.1.tar.bz2  Jussi Pakkanen9 years
0.35.0meson-0.35.0.zip  meson-0.35.0.tar.gz  meson-0.35.0.tar.bz2  Jussi Pakkanen9 years
0.34.0meson-0.34.0.zip  meson-0.34.0.tar.gz  meson-0.34.0.tar.bz2  Jussi Pakkanen9 years
0.33.0meson-0.33.0.zip  meson-0.33.0.tar.gz  meson-0.33.0.tar.bz2  Jussi Pakkanen9 years
0.32.0meson-0.32.0.zip  meson-0.32.0.tar.gz  meson-0.32.0.tar.bz2  Jussi Pakkanen9 years
0.31.0meson-0.31.0.zip  meson-0.31.0.tar.gz  meson-0.31.0.tar.bz2  Jussi Pakkanen9 years
0.30.0meson-0.30.0.zip  meson-0.30.0.tar.gz  meson-0.30.0.tar.bz2  Jussi Pakkanen9 years
0.29.0meson-0.29.0.zip  meson-0.29.0.tar.gz  meson-0.29.0.tar.bz2  Jussi Pakkanen10 years
0.28.0meson-0.28.0.zip  meson-0.28.0.tar.gz  meson-0.28.0.tar.bz2  Jussi Pakkanen10 years
0.27.0meson-0.27.0.zip  meson-0.27.0.tar.gz  meson-0.27.0.tar.bz2  Jussi Pakkanen10 years
0.26.0meson-0.26.0.zip  meson-0.26.0.tar.gz  meson-0.26.0.tar.bz2  Jussi Pakkanen10 years
0.25.0meson-0.25.0.zip  meson-0.25.0.tar.gz  meson-0.25.0.tar.bz2  Jussi Pakkanen10 years
0.24.0meson-0.24.0.zip  meson-0.24.0.tar.gz  meson-0.24.0.tar.bz2  Jussi Pakkanen10 years
0.23.0meson-0.23.0.zip  meson-0.23.0.tar.gz  meson-0.23.0.tar.bz2  Jussi Pakkanen10 years
0.22.0meson-0.22.0.zip  meson-0.22.0.tar.gz  meson-0.22.0.tar.bz2  Jussi Pakkanen11 years
0.21.0meson-0.21.0.zip  meson-0.21.0.tar.gz  meson-0.21.0.tar.bz2  Jussi Pakkanen11 years
0.20.0meson-0.20.0.zip  meson-0.20.0.tar.gz  meson-0.20.0.tar.bz2  Jussi Pakkanen11 years
0.19.0meson-0.19.0.zip  meson-0.19.0.tar.gz  meson-0.19.0.tar.bz2  Jussi Pakkanen11 years
0.18.0meson-0.18.0.zip  meson-0.18.0.tar.gz  meson-0.18.0.tar.bz2  Jussi Pakkanen11 years
0.17.0meson-0.17.0.zip  meson-0.17.0.tar.gz  meson-0.17.0.tar.bz2  Jussi Pakkanen11 years
0.16.0meson-0.16.0.zip  meson-0.16.0.tar.gz  meson-0.16.0.tar.bz2  Jussi Pakkanen11 years
0.15.0meson-0.15.0.zip  meson-0.15.0.tar.gz  meson-0.15.0.tar.bz2  Jussi Pakkanen11 years
0.14.0meson-0.14.0.zip  meson-0.14.0.tar.gz  meson-0.14.0.tar.bz2  Jussi Pakkanen11 years
0.13.0meson-0.13.0.zip  meson-0.13.0.tar.gz  meson-0.13.0.tar.bz2  Jussi Pakkanen11 years
0.12.0meson-0.12.0.zip  meson-0.12.0.tar.gz  meson-0.12.0.tar.bz2  Jussi Pakkanen12 years
0.11.0meson-0.11.0.zip  meson-0.11.0.tar.gz  meson-0.11.0.tar.bz2  Jussi Pakkanen12 years
0.10.0meson-0.10.0.zip  meson-0.10.0.tar.gz  meson-0.10.0.tar.bz2  Jussi Pakkanen12 years
0.9.0meson-0.9.0.zip  meson-0.9.0.tar.gz  meson-0.9.0.tar.bz2  Jussi Pakkanen12 years
0.8.0meson-0.8.0.zip  meson-0.8.0.tar.gz  meson-0.8.0.tar.bz2  Jussi Pakkanen12 years
0.7.0meson-0.7.0.zip  meson-0.7.0.tar.gz  meson-0.7.0.tar.bz2  Jussi Pakkanen12 years
0.6.0meson-0.6.0.zip  meson-0.6.0.tar.gz  meson-0.6.0.tar.bz2  Jussi Pakkanen12 years
0.5.0meson-0.5.0.zip  meson-0.5.0.tar.gz  meson-0.5.0.tar.bz2  Jussi Pakkanen12 years
0.4.1meson-0.4.1.zip  meson-0.4.1.tar.gz  meson-0.4.1.tar.bz2  Jussi Pakkanen12 years
0.4.0meson-0.4.0.zip  meson-0.4.0.tar.gz  meson-0.4.0.tar.bz2  Jussi Pakkanen12 years
0.2.0meson-0.2.0.zip  meson-0.2.0.tar.gz  meson-0.2.0.tar.bz2  Jussi Pakkanen12 years
0.1.0meson-0.1.0.zip  meson-0.1.0.tar.gz  meson-0.1.0.tar.bz2  Jussi Pakkanen12 years
an> # Darwin uses absolute paths where possible; since the libtool files never # contain absolute paths, use the libdir field if mesonlib.is_osx(): dlbasename = os.path.basename(dlname) libdir = self.extract_libdir_field(la_file) if libdir is None: return dlbasename return os.path.join(libdir, dlbasename) # From the comments in extract_libtool(), older libtools had # a path rather than the raw dlname return os.path.basename(dlname) def log_tried(self): return self.type_name class CMakeTraceLine: def __init__(self, file, line, func, args): self.file = file self.line = line self.func = func.lower() self.args = args def __repr__(self): s = 'CMake TRACE: {0}:{1} {2}({3})' return s.format(self.file, self.line, self.func, self.args) class CMakeTarget: def __init__(self, name, type, properies = {}): self.name = name self.type = type self.properies = properies def __repr__(self): s = 'CMake TARGET:\n -- name: {}\n -- type: {}\n -- properies: {{\n{} }}' propSTR = '' for i in self.properies: propSTR += " '{}': {}\n".format(i, self.properies[i]) return s.format(self.name, self.type, propSTR) class CMakeDependency(ExternalDependency): # The class's copy of the CMake path. Avoids having to search for it # multiple times in the same Meson invocation. class_cmakebin = PerMachine(None, None, None) class_cmakevers = PerMachine(None, None, None) class_cmakeinfo = PerMachine(None, None, None) # We cache all pkg-config subprocess invocations to avoid redundant calls cmake_cache = {} # Version string for the minimum CMake version class_cmake_version = '>=3.4' # CMake generators to try (empty for no generator) class_cmake_generators = ['', 'Ninja', 'Unix Makefiles', 'Visual Studio 10 2010'] class_working_generator = None def _gen_exception(self, msg): return DependencyException('Dependency {} not found: {}'.format(self.name, msg)) def __init__(self, name: str, environment: Environment, kwargs, language=None): super().__init__('cmake', environment, language, kwargs) self.name = name self.is_libtool = False # Store a copy of the CMake path on the object itself so it is # stored in the pickled coredata and recovered. self.cmakebin = None self.cmakevers = None self.cmakeinfo = None # Dict of CMake variables: '<var_name>': ['list', 'of', 'values'] self.vars = {} # Dict of CMakeTarget self.targets = {} # Where all CMake "build dirs" are located self.cmake_root_dir = environment.scratch_dir # When finding dependencies for cross-compiling, we don't care about # the 'native' CMake binary # TODO: Test if this works as expected if environment.is_cross_build() and not self.want_cross: for_machine = MachineChoice.BUILD else: for_machine = MachineChoice.HOST # Create an iterator of options def search(): # Lookup in cross or machine file. potential_cmakepath = environment.binaries[for_machine].lookup_entry('cmake') if potential_cmakepath is not None: mlog.debug('CMake binary for %s specified from cross file, native file, or env var as %s.', for_machine, potential_cmakepath) yield ExternalProgram.from_entry('cmake', potential_cmakepath) # We never fallback if the user-specified option is no good, so # stop returning options. return mlog.debug('CMake binary missing from cross or native file, or env var undefined.') # Fallback on hard-coded defaults. # TODO prefix this for the cross case instead of ignoring thing. if environment.machines.matches_build_machine(for_machine): for potential_cmakepath in environment.default_cmake: mlog.debug('Trying a default CMake fallback at', potential_cmakepath) yield ExternalProgram(potential_cmakepath, silent=True) # Only search for CMake the first time and store the result in the class # definition if CMakeDependency.class_cmakebin[for_machine] is False: mlog.debug('CMake binary for %s is cached as not found' % for_machine) elif CMakeDependency.class_cmakebin[for_machine] is not None: mlog.debug('CMake binary for %s is cached.' % for_machine) else: assert CMakeDependency.class_cmakebin[for_machine] is None mlog.debug('CMake binary for %s is not cached' % for_machine) for potential_cmakebin in search(): mlog.debug('Trying CMake binary {} for machine {} at {}' .format(potential_cmakebin.name, for_machine, potential_cmakebin.command)) version_if_ok = self.check_cmake(potential_cmakebin) if not version_if_ok: continue if not self.silent: mlog.log('Found CMake:', mlog.bold(potential_cmakebin.get_path()), '(%s)' % version_if_ok) CMakeDependency.class_cmakebin[for_machine] = potential_cmakebin CMakeDependency.class_cmakevers[for_machine] = version_if_ok break else: if not self.silent: mlog.log('Found CMake:', mlog.red('NO')) # Set to False instead of None to signify that we've already # searched for it and not found it CMakeDependency.class_cmakebin[for_machine] = False CMakeDependency.class_cmakevers[for_machine] = None self.cmakebin = CMakeDependency.class_cmakebin[for_machine] self.cmakevers = CMakeDependency.class_cmakevers[for_machine] if self.cmakebin is False: self.cmakebin = None msg = 'No CMake binary for machine %s not found. Giving up.' % for_machine if self.required: raise DependencyException(msg) mlog.debug(msg) return if CMakeDependency.class_cmakeinfo[for_machine] is None: CMakeDependency.class_cmakeinfo[for_machine] = self._get_cmake_info() self.cmakeinfo = CMakeDependency.class_cmakeinfo[for_machine] if self.cmakeinfo is None: raise self._gen_exception('Unable to obtain CMake system information') modules = kwargs.get('modules', []) cm_path = kwargs.get('cmake_module_path', []) cm_args = kwargs.get('cmake_args', []) if not isinstance(modules, list): modules = [modules] if not isinstance(cm_path, list): cm_path = [cm_path] if not isinstance(cm_args, list): cm_args = [cm_args] cm_path = [x if os.path.isabs(x) else os.path.join(environment.get_source_dir(), x) for x in cm_path] if cm_path: cm_args += ['-DCMAKE_MODULE_PATH={}'.format(';'.join(cm_path))] if not self._preliminary_find_check(name, cm_path, environment.machines[for_machine]): return self._detect_dep(name, modules, cm_args) def __repr__(self): s = '<{0} {1}: {2} {3}>' return s.format(self.__class__.__name__, self.name, self.is_found, self.version_reqs) def _get_cmake_info(self): mlog.debug("Extracting basic cmake information") res = {} # Try different CMake generators since specifying no generator may fail # in cygwin for some reason gen_list = [] # First try the last working generator if CMakeDependency.class_working_generator is not None: gen_list += [CMakeDependency.class_working_generator] gen_list += CMakeDependency.class_cmake_generators for i in gen_list: mlog.debug('Try CMake generator: {}'.format(i if len(i) > 0 else 'auto')) # Prepare options cmake_opts = ['--trace-expand', '.'] if len(i) > 0: cmake_opts = ['-G', i] + cmake_opts # Run CMake ret1, out1, err1 = self._call_cmake(cmake_opts, 'CMakePathInfo.txt') # Current generator was successful if ret1 == 0: CMakeDependency.class_working_generator = i break mlog.debug('CMake failed to gather system information for generator {} with error code {}'.format(i, ret1)) mlog.debug('OUT:\n{}\n\n\nERR:\n{}\n\n'.format(out1, err1)) # Check if any generator succeeded if ret1 != 0: return None try: # First parse the trace lexer1 = self._lex_trace(err1) # Primary pass -- parse all invocations of set for l in lexer1: if l.func == 'set': self._cmake_set(l) except: return None # Extract the variables and sanity check them module_paths = sorted(set(self.get_cmake_var('MESON_PATHS_LIST'))) module_paths = list(filter(lambda x: os.path.isdir(x), module_paths)) archs = self.get_cmake_var('MESON_ARCH_LIST') common_paths = ['lib', 'lib32', 'lib64', 'libx32', 'share'] for i in archs: common_paths += [os.path.join('lib', i)] res = { 'module_paths': module_paths, 'cmake_root': self.get_cmake_var('MESON_CMAKE_ROOT')[0], 'archs': archs, 'common_paths': common_paths } mlog.debug(' -- Module search paths: {}'.format(res['module_paths'])) mlog.debug(' -- CMake root: {}'.format(res['cmake_root'])) mlog.debug(' -- CMake architectures: {}'.format(res['archs'])) mlog.debug(' -- CMake lib search paths: {}'.format(res['common_paths'])) # Reset variables self.vars = {} return res @staticmethod @functools.lru_cache(maxsize=None) def _cached_listdir(path: str) -> Tuple[Tuple[str, str]]: try: return tuple((x, str(x).lower()) for x in os.listdir(path)) except OSError: return () @staticmethod @functools.lru_cache(maxsize=None) def _cached_isdir(path: str) -> bool: try: return os.path.isdir(path) except OSError: return False def _preliminary_find_check(self, name: str, module_path: List[str], machine: MachineInfo) -> bool: lname = str(name).lower() # Checks <path>, <path>/cmake, <path>/CMake def find_module(path: str) -> bool: for i in [path, os.path.join(path, 'cmake'), os.path.join(path, 'CMake')]: if not self._cached_isdir(i): continue for j in ['Find{}.cmake', '{}Config.cmake', '{}-config.cmake']: if os.path.isfile(os.path.join(i, j.format(name))): return True return False # Search in <path>/(lib/<arch>|lib*|share) for cmake files def search_lib_dirs(path: str) -> bool: for i in [os.path.join(path, x) for x in self.cmakeinfo['common_paths']]: if not self._cached_isdir(i): continue # Check <path>/(lib/<arch>|lib*|share)/cmake/<name>*/ cm_dir = os.path.join(i, 'cmake') if self._cached_isdir(cm_dir): content = self._cached_listdir(cm_dir) content = list(filter(lambda x: x[1].startswith(lname), content)) for k in content: if find_module(os.path.join(cm_dir, k[0])): return True # <path>/(lib/<arch>|lib*|share)/<name>*/ # <path>/(lib/<arch>|lib*|share)/<name>*/(cmake|CMake)/ content = self._cached_listdir(i) content = list(filter(lambda x: x[1].startswith(lname), content)) for k in content: if find_module(os.path.join(i, k[0])): return True return False # Check the user provided and system module paths for i in module_path + [os.path.join(self.cmakeinfo['cmake_root'], 'Modules')]: if find_module(i): return True # Check the system paths for i in self.cmakeinfo['module_paths']: if find_module(i): return True if search_lib_dirs(i): return True content = self._cached_listdir(i) content = list(filter(lambda x: x[1].startswith(lname), content)) for k in content: if search_lib_dirs(os.path.join(i, k[0])): return True # Mac framework support if machine.is_darwin(): for j in ['{}.framework', '{}.app']: j = j.format(lname) if j in content: if find_module(os.path.join(i, j[0], 'Resources')) or find_module(os.path.join(i, j[0], 'Version')): return True # Check the environment path env_path = os.environ.get('{}_DIR'.format(name)) if env_path and find_module(env_path): return True return False def _detect_dep(self, name: str, modules: List[str], args: List[str]): # Detect a dependency with CMake using the '--find-package' mode # and the trace output (stderr) # # When the trace output is enabled CMake prints all functions with # parameters to stderr as they are executed. Since CMake 3.4.0 # variables ("${VAR}") are also replaced in the trace output. mlog.debug('\nDetermining dependency {!r} with CMake executable ' '{!r}'.format(name, self.cmakebin.get_path())) # Try different CMake generators since specifying no generator may fail # in cygwin for some reason gen_list = [] # First try the last working generator if CMakeDependency.class_working_generator is not None: gen_list += [CMakeDependency.class_working_generator] gen_list += CMakeDependency.class_cmake_generators for i in gen_list: mlog.debug('Try CMake generator: {}'.format(i if len(i) > 0 else 'auto')) # Prepare options cmake_opts = ['--trace-expand', '-DNAME={}'.format(name), '-DARCHS={}'.format(';'.join(self.cmakeinfo['archs']))] + args + ['.'] if len(i) > 0: cmake_opts = ['-G', i] + cmake_opts # Run CMake ret1, out1, err1 = self._call_cmake(cmake_opts, 'CMakeLists.txt') # Current generator was successful if ret1 == 0: CMakeDependency.class_working_generator = i break mlog.debug('CMake failed for generator {} and package {} with error code {}'.format(i, name, ret1)) mlog.debug('OUT:\n{}\n\n\nERR:\n{}\n\n'.format(out1, err1)) # Check if any generator succeeded if ret1 != 0: return try: # First parse the trace lexer1 = self._lex_trace(err1) # All supported functions functions = { 'set': self._cmake_set, 'unset': self._cmake_unset, 'add_executable': self._cmake_add_executable, 'add_library': self._cmake_add_library, 'add_custom_target': self._cmake_add_custom_target, 'set_property': self._cmake_set_property, 'set_target_properties': self._cmake_set_target_properties } # Primary pass -- parse everything for l in lexer1: # "Execute" the CMake function if supported fn = functions.get(l.func, None) if(fn): fn(l) except DependencyException as e: if self.required: raise else: self.compile_args = [] self.link_args = [] self.is_found = False self.reason = e return # Whether the package is found or not is always stored in PACKAGE_FOUND self.is_found = self._var_to_bool('PACKAGE_FOUND') if not self.is_found: return # Try to detect the version vers_raw = self.get_first_cmake_var_of(['PACKAGE_VERSION']) if len(vers_raw) > 0: self.version = vers_raw[0] self.version.strip('"\' ') # Try guessing a CMake target if none is provided if len(modules) == 0: for i in self.targets: tg = i.lower() lname = name.lower() if '{}::{}'.format(lname, lname) == tg or lname == tg.replace('::', ''): mlog.debug('Guessed CMake target \'{}\''.format(i)) modules = [i] break # Failed to guess a target --> try the old-style method if len(modules) == 0: incDirs = self.get_first_cmake_var_of(['PACKAGE_INCLUDE_DIRS']) libs = self.get_first_cmake_var_of(['PACKAGE_LIBRARIES']) # Try to use old style variables if no module is specified if len(libs) > 0: self.compile_args = list(map(lambda x: '-I{}'.format(x), incDirs)) self.link_args = libs mlog.debug('using old-style CMake variables for dependency {}'.format(name)) return # Even the old-style approach failed. Nothing else we can do here self.is_found = False raise self._gen_exception('CMake: failed to guess a CMake target for {}.\n' 'Try to explicitly specify one or more targets with the "modules" property.\n' 'Valid targets are:\n{}'.format(name, list(self.targets.keys()))) # Set dependencies with CMake targets processed_targets = [] incDirs = [] compileDefinitions = [] compileOptions = [] libraries = [] for i in modules: if i not in self.targets: raise self._gen_exception('CMake: invalid CMake target {} for {}.\n' 'Try to explicitly specify one or more targets with the "modules" property.\n' 'Valid targets are:\n{}'.format(i, name, list(self.targets.keys()))) targets = [i] while len(targets) > 0: curr = targets.pop(0) # Skip already processed targets if curr in processed_targets: continue tgt = self.targets[curr] cfgs = [] cfg = '' otherDeps = [] mlog.debug(tgt) if 'INTERFACE_INCLUDE_DIRECTORIES' in tgt.properies: incDirs += tgt.properies['INTERFACE_INCLUDE_DIRECTORIES'] if 'INTERFACE_COMPILE_DEFINITIONS' in tgt.properies: tempDefs = list(tgt.properies['INTERFACE_COMPILE_DEFINITIONS']) tempDefs = list(map(lambda x: '-D{}'.format(re.sub('^-D', '', x)), tempDefs)) compileDefinitions += tempDefs if 'INTERFACE_COMPILE_OPTIONS' in tgt.properies: compileOptions += tgt.properies['INTERFACE_COMPILE_OPTIONS'] if 'IMPORTED_CONFIGURATIONS' in tgt.properies: cfgs = tgt.properies['IMPORTED_CONFIGURATIONS'] cfg = cfgs[0] if 'RELEASE' in cfgs: cfg = 'RELEASE' if 'IMPORTED_LOCATION_{}'.format(cfg) in tgt.properies: libraries += tgt.properies['IMPORTED_LOCATION_{}'.format(cfg)] elif 'IMPORTED_LOCATION' in tgt.properies: libraries += tgt.properies['IMPORTED_LOCATION'] if 'INTERFACE_LINK_LIBRARIES' in tgt.properies: otherDeps += tgt.properies['INTERFACE_LINK_LIBRARIES'] if 'IMPORTED_LINK_DEPENDENT_LIBRARIES_{}'.format(cfg) in tgt.properies: otherDeps += tgt.properies['IMPORTED_LINK_DEPENDENT_LIBRARIES_{}'.format(cfg)] elif 'IMPORTED_LINK_DEPENDENT_LIBRARIES' in tgt.properies: otherDeps += tgt.properies['IMPORTED_LINK_DEPENDENT_LIBRARIES'] for j in otherDeps: if j in self.targets: targets += [j] processed_targets += [curr] # Make sure all elements in the lists are unique and sorted incDirs = list(sorted(list(set(incDirs)))) compileDefinitions = list(sorted(list(set(compileDefinitions)))) compileOptions = list(sorted(list(set(compileOptions)))) libraries = list(sorted(list(set(libraries)))) mlog.debug('Include Dirs: {}'.format(incDirs)) mlog.debug('Compiler Definitions: {}'.format(compileDefinitions)) mlog.debug('Compiler Options: {}'.format(compileOptions)) mlog.debug('Libraries: {}'.format(libraries)) self.compile_args = compileOptions + compileDefinitions + list(map(lambda x: '-I{}'.format(x), incDirs)) self.link_args = libraries def get_first_cmake_var_of(self, var_list): # Return the first found CMake variable in list var_list for i in var_list: if i in self.vars: return self.vars[i] return [] def get_cmake_var(self, var): # Return the value of the CMake variable var or an empty list if var does not exist if var in self.vars: return self.vars[var] return [] def _var_to_bool(self, var): if var not in self.vars: return False if len(self.vars[var]) < 1: return False if self.vars[var][0].upper() in ['1', 'ON', 'TRUE']: return True return False def _cmake_set(self, tline: CMakeTraceLine): # DOC: https://cmake.org/cmake/help/latest/command/set.html # 1st remove PARENT_SCOPE and CACHE from args args = [] for i in tline.args: if i == 'PARENT_SCOPE' or len(i) == 0: continue # Discard everything after the CACHE keyword if i == 'CACHE': break args.append(i) if len(args) < 1: raise self._gen_exception('CMake: set() requires at least one argument\n{}'.format(tline)) if len(args) == 1: # Same as unset if args[0] in self.vars: del self.vars[args[0]] else: values = list(itertools.chain(*map(lambda x: x.split(';'), args[1:]))) self.vars[args[0]] = values def _cmake_unset(self, tline: CMakeTraceLine): # DOC: https://cmake.org/cmake/help/latest/command/unset.html if len(tline.args) < 1: raise self._gen_exception('CMake: unset() requires at least one argument\n{}'.format(tline)) if tline.args[0] in self.vars: del self.vars[tline.args[0]] def _cmake_add_executable(self, tline: CMakeTraceLine): # DOC: https://cmake.org/cmake/help/latest/command/add_executable.html args = list(tline.args) # Make a working copy # Make sure the exe is imported if 'IMPORTED' not in args: raise self._gen_exception('CMake: add_executable() non imported executables are not supported\n{}'.format(tline)) args.remove('IMPORTED') if len(args) < 1: raise self._gen_exception('CMake: add_executable() requires at least 1 argument\n{}'.format(tline)) self.targets[args[0]] = CMakeTarget(args[0], 'EXECUTABLE', {}) def _cmake_add_library(self, tline: CMakeTraceLine): # DOC: https://cmake.org/cmake/help/latest/command/add_library.html args = list(tline.args) # Make a working copy # Make sure the lib is imported if 'IMPORTED' not in args: raise self._gen_exception('CMake: add_library() non imported libraries are not supported\n{}'.format(tline)) args.remove('IMPORTED') # No only look at the first two arguments (target_name and target_type) and ignore the rest if len(args) < 2: raise self._gen_exception('CMake: add_library() requires at least 2 arguments\n{}'.format(tline)) self.targets[args[0]] = CMakeTarget(args[0], args[1], {}) def _cmake_add_custom_target(self, tline: CMakeTraceLine): # DOC: https://cmake.org/cmake/help/latest/command/add_custom_target.html # We only the first parameter (the target name) is interesting if len(tline.args) < 1: raise self._gen_exception('CMake: add_custom_target() requires at least one argument\n{}'.format(tline)) self.targets[tline.args[0]] = CMakeTarget(tline.args[0], 'CUSTOM', {}) def _cmake_set_property(self, tline: CMakeTraceLine): # DOC: https://cmake.org/cmake/help/latest/command/set_property.html args = list(tline.args) # We only care for TARGET properties if args.pop(0) != 'TARGET': return append = False targets = [] while len(args) > 0: curr = args.pop(0) if curr == 'APPEND' or curr == 'APPEND_STRING': append = True continue if curr == 'PROPERTY': break targets.append(curr) if len(args) == 1: # Tries to set property to nothing so nothing has to be done return if len(args) < 2: raise self._gen_exception('CMake: set_property() faild to parse argument list\n{}'.format(tline)) propName = args[0] propVal = list(itertools.chain(*map(lambda x: x.split(';'), args[1:]))) propVal = list(filter(lambda x: len(x) > 0, propVal)) if len(propVal) == 0: return for i in targets: if i not in self.targets: raise self._gen_exception('CMake: set_property() TARGET {} not found\n{}'.format(i, tline)) if propName not in self.targets[i].properies: self.targets[i].properies[propName] = [] if append: self.targets[i].properies[propName] += propVal else: self.targets[i].properies[propName] = propVal def _cmake_set_target_properties(self, tline: CMakeTraceLine): # DOC: https://cmake.org/cmake/help/latest/command/set_target_properties.html args = list(tline.args) targets = [] while len(args) > 0: curr = args.pop(0) if curr == 'PROPERTIES': break targets.append(curr) if (len(args) % 2) != 0: raise self._gen_exception('CMake: set_target_properties() uneven number of property arguments\n{}'.format(tline)) while len(args) > 0: propName = args.pop(0) propVal = args.pop(0).split(';') propVal = list(filter(lambda x: len(x) > 0, propVal)) if len(propVal) == 0: continue for i in targets: if i not in self.targets: raise self._gen_exception('CMake: set_target_properties() TARGET {} not found\n{}'.format(i, tline)) self.targets[i].properies[propName] = propVal def _lex_trace(self, trace): # The trace format is: '<file>(<line>): <func>(<args -- can contain \n> )\n' reg_tline = re.compile(r'\s*(.*\.(cmake|txt))\(([0-9]+)\):\s*(\w+)\(([\s\S]*?) ?\)\s*\n', re.MULTILINE) reg_other = re.compile(r'[^\n]*\n') reg_genexp = re.compile(r'\$<.*>') loc = 0 while loc < len(trace): mo_file_line = reg_tline.match(trace, loc) if not mo_file_line: skip_match = reg_other.match(trace, loc) if not skip_match: print(trace[loc:]) raise self._gen_exception('Failed to parse CMake trace') loc = skip_match.end() continue loc = mo_file_line.end() file = mo_file_line.group(1) line = mo_file_line.group(3) func = mo_file_line.group(4) args = mo_file_line.group(5).split(' ') args = list(map(lambda x: x.strip(), args)) args = list(map(lambda x: reg_genexp.sub('', x), args)) # Remove generator expressions yield CMakeTraceLine(file, line, func, args) def _reset_cmake_cache(self, build_dir): with open('{}/CMakeCache.txt'.format(build_dir), 'w') as fp: fp.write('CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1\n') def _setup_compiler(self, build_dir): comp_dir = '{}/CMakeFiles/{}'.format(build_dir, self.cmakevers) os.makedirs(comp_dir, exist_ok=True) c_comp = '{}/CMakeCCompiler.cmake'.format(comp_dir) cxx_comp = '{}/CMakeCXXCompiler.cmake'.format(comp_dir) if not os.path.exists(c_comp): with open(c_comp, 'w') as fp: fp.write('''# Fake CMake file to skip the boring and slow stuff set(CMAKE_C_COMPILER "{}") # Just give CMake a valid full path to any file set(CMAKE_C_COMPILER_ID "GNU") # Pretend we have found GCC set(CMAKE_COMPILER_IS_GNUCC 1) set(CMAKE_C_COMPILER_LOADED 1) set(CMAKE_C_COMPILER_WORKS TRUE) set(CMAKE_C_ABI_COMPILED TRUE) set(CMAKE_SIZEOF_VOID_P "{}") '''.format(os.path.realpath(__file__), ctypes.sizeof(ctypes.c_voidp))) if not os.path.exists(cxx_comp): with open(cxx_comp, 'w') as fp: fp.write('''# Fake CMake file to skip the boring and slow stuff set(CMAKE_CXX_COMPILER "{}") # Just give CMake a valid full path to any file set(CMAKE_CXX_COMPILER_ID "GNU") # Pretend we have found GCC set(CMAKE_COMPILER_IS_GNUCXX 1) set(CMAKE_CXX_COMPILER_LOADED 1) set(CMAKE_CXX_COMPILER_WORKS TRUE) set(CMAKE_CXX_ABI_COMPILED TRUE) set(CMAKE_SIZEOF_VOID_P "{}") '''.format(os.path.realpath(__file__), ctypes.sizeof(ctypes.c_voidp))) def _setup_cmake_dir(self, cmake_file: str) -> str: # Setup the CMake build environment and return the "build" directory build_dir = '{}/cmake_{}'.format(self.cmake_root_dir, self.name) os.makedirs(build_dir, exist_ok=True) # Copy the CMakeLists.txt cmake_lists = '{}/CMakeLists.txt'.format(build_dir) dir_path = os.path.dirname(os.path.realpath(__file__)) src_cmake = '{}/data/{}'.format(dir_path, cmake_file) if os.path.exists(cmake_lists): os.remove(cmake_lists) shutil.copyfile(src_cmake, cmake_lists) self._setup_compiler(build_dir) self._reset_cmake_cache(build_dir) return build_dir def _call_cmake_real(self, args, cmake_file: str, env): build_dir = self._setup_cmake_dir(cmake_file) cmd = self.cmakebin.get_command() + args p, out, err = Popen_safe(cmd, env=env, cwd=build_dir) rc = p.returncode call = ' '.join(cmd) mlog.debug("Called `{}` in {} -> {}".format(call, build_dir, rc)) return rc, out, err def _call_cmake(self, args, cmake_file: str, env=None): if env is None: fenv = env env = os.environ else: fenv = frozenset(env.items()) targs = tuple(args) # First check if cached, if not call the real cmake function cache = CMakeDependency.cmake_cache if (self.cmakebin, targs, cmake_file, fenv) not in cache: cache[(self.cmakebin, targs, cmake_file, fenv)] = self._call_cmake_real(args, cmake_file, env) return cache[(self.cmakebin, targs, cmake_file, fenv)] @staticmethod def get_methods(): return [DependencyMethods.CMAKE] def check_cmake(self, cmakebin): if not cmakebin.found(): mlog.log('Did not find CMake {!r}'.format(cmakebin.name)) return None try: p, out = Popen_safe(cmakebin.get_command() + ['--version'])[0:2] if p.returncode != 0: mlog.warning('Found CMake {!r} but couldn\'t run it' ''.format(' '.join(cmakebin.get_command()))) return None except FileNotFoundError: mlog.warning('We thought we found CMake {!r} but now it\'s not there. How odd!' ''.format(' '.join(cmakebin.get_command()))) return None except PermissionError: msg = 'Found CMake {!r} but didn\'t have permissions to run it.'.format(' '.join(cmakebin.get_command())) if not mesonlib.is_windows(): msg += '\n\nOn Unix-like systems this is often caused by scripts that are not executable.' mlog.warning(msg) return None cmvers = re.sub(r'\s*cmake version\s*', '', out.split('\n')[0]).strip() if not version_compare(cmvers, CMakeDependency.class_cmake_version): mlog.warning( 'The version of CMake', mlog.bold(cmakebin.get_path()), 'is', mlog.bold(cmvers), 'but version', mlog.bold(CMakeDependency.class_cmake_version), 'is required') return None return cmvers def log_tried(self): return self.type_name class DubDependency(ExternalDependency): class_dubbin = None def __init__(self, name, environment, kwargs): super().__init__('dub', environment, 'd', kwargs) self.name = name self.compiler = super().get_compiler() self.module_path = None if 'required' in kwargs: self.required = kwargs.get('required') if DubDependency.class_dubbin is None: self.dubbin = self._check_dub() DubDependency.class_dubbin = self.dubbin else: self.dubbin = DubDependency.class_dubbin if not self.dubbin: if self.required: raise DependencyException('DUB not found.') self.is_found = False return mlog.debug('Determining dependency {!r} with DUB executable ' '{!r}'.format(name, self.dubbin.get_path())) # we need to know the target architecture arch = self.compiler.arch # Ask dub for the package ret, res = self._call_dubbin(['describe', name, '--arch=' + arch]) if ret != 0: self.is_found = False return comp = self.compiler.get_id().replace('llvm', 'ldc').replace('gcc', 'gdc') packages = [] description = json.loads(res) for package in description['packages']: packages.append(package['name']) if package['name'] == name: self.is_found = True not_lib = True if 'targetType' in package: if package['targetType'] == 'library': not_lib = False if not_lib: mlog.error(mlog.bold(name), "found but it isn't a library") self.is_found = False return self.module_path = self._find_right_lib_path(package['path'], comp, description, True, package['targetFileName']) if not os.path.exists(self.module_path): # check if the dependency was built for other archs archs = [['x86_64'], ['x86'], ['x86', 'x86_mscoff']] for a in archs: description_a = copy.deepcopy(description) description_a['architecture'] = a arch_module_path = self._find_right_lib_path(package['path'], comp, description_a, True, package['targetFileName']) if arch_module_path: mlog.error(mlog.bold(name), "found but it wasn't compiled for", mlog.bold(arch)) self.is_found = False return mlog.error(mlog.bold(name), "found but it wasn't compiled with", mlog.bold(comp)) self.is_found = False return self.version = package['version'] self.pkg = package if self.pkg['targetFileName'].endswith('.a'): self.static = True self.compile_args = [] for flag in self.pkg['dflags']: self.link_args.append(flag) for path in self.pkg['importPaths']: self.compile_args.append('-I' + os.path.join(self.pkg['path'], path)) self.link_args = self.raw_link_args = [] for flag in self.pkg['lflags']: self.link_args.append(flag) self.link_args.append(os.path.join(self.module_path, self.pkg['targetFileName'])) # Handle dependencies libs = [] def add_lib_args(field_name, target): if field_name in target['buildSettings']: for lib in target['buildSettings'][field_name]: if lib not in libs: libs.append(lib) if os.name is not 'nt': pkgdep = PkgConfigDependency(lib, environment, {'required': 'true', 'silent': 'true'}) for arg in pkgdep.get_compile_args(): self.compile_args.append(arg) for arg in pkgdep.get_link_args(): self.link_args.append(arg) for arg in pkgdep.get_link_args(raw=True): self.raw_link_args.append(arg) for target in description['targets']: if target['rootPackage'] in packages: add_lib_args('libs', target) add_lib_args('libs-{}'.format(platform.machine()), target) for file in target['buildSettings']['linkerFiles']: lib_path = self._find_right_lib_path(file, comp, description) if lib_path: self.link_args.append(lib_path) else: self.is_found = False def get_compiler(self): return self.compiler def _find_right_lib_path(self, default_path, comp, description, folder_only=False, file_name=''): module_path = lib_file_name = '' if folder_only: module_path = default_path lib_file_name = file_name else: module_path = os.path.dirname(default_path) lib_file_name = os.path.basename(default_path) module_build_path = os.path.join(module_path, '.dub', 'build') # Get D version implemented in the compiler # gdc doesn't support this ret, res = self._call_dubbin(['--version']) if ret != 0: mlog.error('Failed to run {!r}', mlog.bold(comp)) return d_ver = re.search('v[0-9].[0-9][0-9][0-9].[0-9]', res) # Ex.: v2.081.2 if d_ver is not None: d_ver = d_ver.group().rsplit('.', 1)[0].replace('v', '').replace('.', '') # Fix structure. Ex.: 2081 else: d_ver = '' # gdc if not os.path.isdir(module_build_path): return '' # Ex.: library-debug-linux.posix-x86_64-ldc_2081-EF934983A3319F8F8FF2F0E107A363BA build_name = '-{}-{}-{}-{}_{}'.format(description['buildType'], '.'.join(description['platform']), '.'.join(description['architecture']), comp, d_ver) for entry in os.listdir(module_build_path): if build_name in entry: for file in os.listdir(os.path.join(module_build_path, entry)): if file == lib_file_name: if folder_only: return os.path.join(module_build_path, entry) else: return os.path.join(module_build_path, entry, lib_file_name) return '' def _call_dubbin(self, args, env=None): p, out = Popen_safe(self.dubbin.get_command() + args, env=env)[0:2] return p.returncode, out.strip() def _call_copmbin(self, args, env=None): p, out = Popen_safe(self.compiler.get_exelist() + args, env=env)[0:2] return p.returncode, out.strip() def _check_dub(self): dubbin = ExternalProgram('dub', silent=True) if dubbin.found(): try: p, out = Popen_safe(dubbin.get_command() + ['--version'])[0:2] if p.returncode != 0: mlog.warning('Found dub {!r} but couldn\'t run it' ''.format(' '.join(dubbin.get_command()))) # Set to False instead of None to signify that we've already # searched for it and not found it dubbin = False except (FileNotFoundError, PermissionError): dubbin = False else: dubbin = False if dubbin: mlog.log('Found DUB:', mlog.bold(dubbin.get_path()), '(%s)' % out.strip()) else: mlog.log('Found DUB:', mlog.red('NO')) return dubbin @staticmethod def get_methods(): return [DependencyMethods.DUB] class ExternalProgram: windows_exts = ('exe', 'msc', 'com', 'bat', 'cmd') def __init__(self, name, command=None, silent=False, search_dir=None): self.name = name if command is not None: self.command = listify(command) else: self.command = self._search(name, search_dir) # Set path to be the last item that is actually a file (in order to # skip options in something like ['python', '-u', 'file.py']. If we # can't find any components, default to the last component of the path. self.path = self.command[-1] for i in range(len(self.command) - 1, -1, -1): arg = self.command[i] if arg is not None and os.path.isfile(arg): self.path = arg break if not silent: if self.found(): mlog.log('Program', mlog.bold(name), 'found:', mlog.green('YES'), '(%s)' % ' '.join(self.command)) else: mlog.log('Program', mlog.bold(name), 'found:', mlog.red('NO')) def __repr__(self): r = '<{} {!r} -> {!r}>' return r.format(self.__class__.__name__, self.name, self.command) def description(self): '''Human friendly description of the command''' return ' '.join(self.command) @classmethod def from_bin_list(cls, bt: BinaryTable, name): command = bt.lookup_entry(name) if command is None: return NonExistingExternalProgram() return cls.from_entry(name, command) @staticmethod def from_entry(name, command): if isinstance(command, list): if len(command) == 1: command = command[0] # We cannot do any searching if the command is a list, and we don't # need to search if the path is an absolute path. if isinstance(command, list) or os.path.isabs(command): return ExternalProgram(name, command=command, silent=True) assert isinstance(command, str) # Search for the command using the specified string! return ExternalProgram(command, silent=True) @staticmethod def _shebang_to_cmd(script): """ Check if the file has a shebang and manually parse it to figure out the interpreter to use. This is useful if the script is not executable or if we're on Windows (which does not understand shebangs). """ try: with open(script) as f: first_line = f.readline().strip() if first_line.startswith('#!'): # In a shebang, everything before the first space is assumed to # be the command to run and everything after the first space is # the single argument to pass to that command. So we must split # exactly once. commands = first_line[2:].split('#')[0].strip().split(maxsplit=1) if mesonlib.is_windows(): # Windows does not have UNIX paths so remove them, # but don't remove Windows paths if commands[0].startswith('/'): commands[0] = commands[0].split('/')[-1] if len(commands) > 0 and commands[0] == 'env': commands = commands[1:] # Windows does not ship python3.exe, but we know the path to it if len(commands) > 0 and commands[0] == 'python3': commands = mesonlib.python_command + commands[1:] elif mesonlib.is_haiku(): # Haiku does not have /usr, but a lot of scripts assume that # /usr/bin/env always exists. Detect that case and run the # script with the interpreter after it. if commands[0] == '/usr/bin/env': commands = commands[1:] # We know what python3 is, we're running on it if len(commands) > 0 and commands[0] == 'python3': commands = mesonlib.python_command + commands[1:] else: # Replace python3 with the actual python3 that we are using if commands[0] == '/usr/bin/env' and commands[1] == 'python3': commands = mesonlib.python_command + commands[2:] elif commands[0].split('/')[-1] == 'python3': commands = mesonlib.python_command + commands[1:] return commands + [script] except Exception as e: mlog.debug(e) pass mlog.debug('Unusable script {!r}'.format(script)) return False def _is_executable(self, path): suffix = os.path.splitext(path)[-1].lower()[1:] if mesonlib.is_windows(): if suffix in self.windows_exts: return True elif os.access(path, os.X_OK): return not os.path.isdir(path) return False