From 6fb20960b8d5c80b32653db8446a912ec1c00659 Mon Sep 17 00:00:00 2001 From: Niklas Angare Date: Sat, 11 Feb 2017 23:27:44 +0100 Subject: [PATCH] Fixed cross-compilation of tests Removed the use of the "os" feature as it reflects the host and not the target when cross-compiling. All platform libs are declared unconditionally since I don't believe it's possible to use target-os in module scope. Declaring unused and unavailable libs does no harm. Replaced with so that the correct options for the target are selected when cross-compiling. It works when not cross-compiling as well. --- test/Jamfile.v2 | 62 +++++++++++++++++++++------------------------------------ 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 18534c00..e7ba00db 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -5,31 +5,15 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # -import os ; import feature ; -if [ os.name ] = SOLARIS -{ - lib socket ; - lib nsl ; -} -else if [ os.name ] = NT -{ - lib ws2_32 ; - lib mswsock ; -} -else if [ os.name ] = HPUX -{ - lib ipv6 ; -} -else if [ os.name ] = QNXNTO -{ - lib socket ; -} -else if [ os.name ] = HAIKU -{ - lib network ; -} + +lib socket ; # SOLARIS, QNXNTO +lib nsl ; # SOLARIS +lib ws2_32 ; # NT +lib mswsock ; # NT +lib ipv6 ; # HPUX +lib network ; # HAIKU local USE_SELECT = BOOST_ASIO_DISABLE_DEV_POLL @@ -45,22 +29,22 @@ project /boost/regex//boost_regex BOOST_ALL_NO_LIB=1 multi - LINUX:_XOPEN_SOURCE=600 - LINUX:_GNU_SOURCE=1 - SOLARIS:_XOPEN_SOURCE=500 - SOLARIS:__EXTENSIONS__ - SOLARIS:socket - SOLARIS:nsl - NT:_WIN32_WINNT=0x0501 - NT,cw:ws2_32 - NT,cw:mswsock - NT,gcc:ws2_32 - NT,gcc:mswsock - NT,gcc-cygwin:__USE_W32_SOCKETS - HPUX,gcc:_XOPEN_SOURCE_EXTENDED - HPUX:ipv6 - QNXNTO:socket - HAIKU:network + linux:_XOPEN_SOURCE=600 + linux:_GNU_SOURCE=1 + solaris:_XOPEN_SOURCE=500 + solaris:__EXTENSIONS__ + solaris:socket + solaris:nsl + windows:_WIN32_WINNT=0x0501 + windows,cw:ws2_32 + windows,cw:mswsock + windows,gcc:ws2_32 + windows,gcc:mswsock + windows,gcc-cygwin:__USE_W32_SOCKETS + hpux,gcc:_XOPEN_SOURCE_EXTENDED + hpux:ipv6 + qnxnto:socket + haiku:network ; test-suite "asio" :