diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-01-06 14:41:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-06 14:41:26 +0200 |
commit | 6c97d8d94d603a07116224e29e5ab05f960f8de9 (patch) | |
tree | 08cf4fe35e8da3454e2747f025b3fb7ed68da1a4 | |
parent | 711c3a28ba62a2030089f4ddadb0360a46fc30c1 (diff) | |
parent | fd683a2b81ae6398674b21f2047f7db340a1e556 (diff) | |
download | meson-6c97d8d94d603a07116224e29e5ab05f960f8de9.zip meson-6c97d8d94d603a07116224e29e5ab05f960f8de9.tar.gz meson-6c97d8d94d603a07116224e29e5ab05f960f8de9.tar.bz2 |
Merge pull request #2879 from jon-turney/fix-boost-cygwin
Fix dependency('boost') on Cygwin
-rwxr-xr-x[-rw-r--r--] | ci/appveyor-install.bat | 12 | ||||
-rw-r--r-- | mesonbuild/dependencies/misc.py | 2 | ||||
-rwxr-xr-x | run_project_tests.py | 5 | ||||
-rw-r--r-- | test cases/frameworks/1 boost/extralib.cpp | 2 |
4 files changed, 14 insertions, 7 deletions
diff --git a/ci/appveyor-install.bat b/ci/appveyor-install.bat index becc80a..2d4a8cb 100644..100755 --- a/ci/appveyor-install.bat +++ b/ci/appveyor-install.bat @@ -1,5 +1,5 @@ set CACHE=C:\cache -set CYGWIN_MIRROR="http://cygwin.mirror.constant.com" +set CYGWIN_MIRROR=http://cygwin.mirror.constant.com if _%arch%_ == _x64_ set SETUP=setup-x86_64.exe && set CYGWIN_ROOT=C:\cygwin64 if _%arch%_ == _x86_ set SETUP=setup-x86.exe && set CYGWIN_ROOT=C:\cygwin @@ -7,5 +7,13 @@ if _%arch%_ == _x86_ set SETUP=setup-x86.exe && set CYGWIN_ROOT=C:\cygwin if not exist %CACHE% mkdir %CACHE% echo Updating Cygwin and installing ninja and test prerequisites -%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P "ninja,gcc-objc,gcc-objc++,libglib2.0-devel,zlib-devel,python3-pip" +%CYGWIN_ROOT%\%SETUP% -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -l "%CACHE%" -g -P ^ +gcc-objc++,^ +gcc-objc,^ +libboost-devel,^ +libglib2.0-devel,^ +ninja,^ +python3-pip,^ +zlib-devel + echo Install done diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index cc0914c..9614f1f 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -365,7 +365,7 @@ class BoostDependency(ExternalDependency): for module in self.requested_modules: args = None libname = 'boost_' + module - if self.is_multithreading and not mesonlib.for_linux(self.want_cross, self.env): + if self.is_multithreading and mesonlib.for_darwin(self.want_cross, self.env): # - Linux leaves off -mt but libraries are multithreading-aware. # - Mac requires -mt for multithreading, so should not fall back to non-mt libraries. libname = libname + '-mt' diff --git a/run_project_tests.py b/run_project_tests.py index 384dbcc..0bf5f31 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -495,12 +495,9 @@ def detect_tests_to_run(): if mesonlib.is_windows(): # TODO: Set BOOST_ROOT in .appveyor.yml gathered_tests += [('framework', ['test cases/frameworks/1 boost'], 'BOOST_ROOT' not in os.environ)] - elif mesonlib.is_osx(): + elif mesonlib.is_osx() or mesonlib.is_cygwin(): # Just do the BOOST test gathered_tests += [('framework', ['test cases/frameworks/1 boost'], False)] - elif mesonlib.is_cygwin(): - # Skip all the framework tests - gathered_tests += [('framework', gather_tests('test cases/frameworks'), True)] else: gathered_tests += [('framework', gather_tests('test cases/frameworks'), False)] return gathered_tests diff --git a/test cases/frameworks/1 boost/extralib.cpp b/test cases/frameworks/1 boost/extralib.cpp index 6a3e9e4..e5ab1b0 100644 --- a/test cases/frameworks/1 boost/extralib.cpp +++ b/test cases/frameworks/1 boost/extralib.cpp @@ -1,3 +1,5 @@ +#define _XOPEN_SOURCE 500 + #include <iostream> #include <boost/log/trivial.hpp> #include <boost/log/expressions.hpp> |