From 0468eb6db8a20be611f5071947215fc070ac244b Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Mon, 16 Sep 2019 11:26:54 -0700 Subject: [PATCH 1/4] Delete compute_test This depends on an external OpenCL and is not hermetic. --- test/BUILD | 9 --------- test/compute_test.cc | 23 ----------------------- 2 files changed, 32 deletions(-) delete mode 100644 test/compute_test.cc diff --git a/test/BUILD b/test/BUILD index 9c7278680..f25f1706b 100644 --- a/test/BUILD +++ b/test/BUILD @@ -107,15 +107,6 @@ cc_test( ], ) -cc_test( - name = "compute_test", - size = "small", - srcs = ["compute_test.cc"], - deps = [ - "@boost//:compute", - ], -) - cc_test( name = "coroutine2_test", size = "small", diff --git a/test/compute_test.cc b/test/compute_test.cc deleted file mode 100644 index cf5c73bec..000000000 --- a/test/compute_test.cc +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -#include - -namespace compute = boost::compute; - -int main() -{ - char *env = getenv("RULES_BOOST_TEST_COMPUTE"); - if(env == nullptr || strlen(env) == 0) { - std::cerr << "Skipping boost::comput test; Set RULES_BOOST_TEST_COMPUTE=1 to enable." << std::endl; - return 0; - } - // get the default device - compute::device device = compute::system::default_device(); - - // print the device's name and platform - std::cout << "hello from " << device.name(); - std::cout << " (platform: " << device.platform().name() << ")" << std::endl; - - return 0; -} From db5224856add62d78cdd8e1457c580933e13b90b Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Mon, 16 Sep 2019 11:28:56 -0700 Subject: [PATCH 2/4] Move copts into BUILD.boost And conditionalize on !Windows --- BUILD.boost | 8 ++++++++ test/BUILD | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/BUILD.boost b/BUILD.boost index 5e3d4f036..557e88911 100644 --- a/BUILD.boost +++ b/BUILD.boost @@ -7,6 +7,13 @@ _w_no_deprecated = select({ "//conditions:default": [], }) +_w_no_unused_value = select({ + ":linux": [ + "-Wno-unused-value", + ], + "//conditions:default": [], +}) + config_setting( name = "linux", constraint_values = [ @@ -656,6 +663,7 @@ boost_library( boost_library( name = "format", + copts = _w_no_unused_value, deps = [ ":assert", ":config", diff --git a/test/BUILD b/test/BUILD index f25f1706b..0b1d4ac73 100644 --- a/test/BUILD +++ b/test/BUILD @@ -166,7 +166,6 @@ cc_test( name = "format_test", size = "small", srcs = ["format_test.cc"], - copts = ["-Wno-unused-value"], deps = [ "@boost//:format", ], From 08afe477b894ac99dd23d4d85dd6a189b3eabeff Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Mon, 16 Sep 2019 11:30:37 -0700 Subject: [PATCH 3/4] buildifier --- BUILD.boost | 9 ++++----- boost/boost.bzl | 4 ++-- test/BUILD | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/BUILD.boost b/BUILD.boost index 557e88911..102e11a62 100644 --- a/BUILD.boost +++ b/BUILD.boost @@ -532,8 +532,8 @@ boost_library( "libs/coroutine2/include/**/*.ipp", ]), deps = [ - ":config", ":assert", + ":config", ":context", ":detail", ], @@ -1927,13 +1927,13 @@ boost_library( name = "graph", hdrs = [ "boost/pending/container_traits.hpp", + "boost/pending/detail/disjoint_sets.hpp", "boost/pending/detail/property.hpp", + "boost/pending/disjoint_sets.hpp", "boost/pending/indirect_cmp.hpp", "boost/pending/property.hpp", "boost/pending/queue.hpp", "boost/pending/relaxed_heap.hpp", - "boost/pending/disjoint_sets.hpp", - "boost/pending/detail/disjoint_sets.hpp", ], deps = [ ":algorithm", @@ -1957,6 +1957,5 @@ boost_library( ) boost_library( - name="sort", + name = "sort", ) - diff --git a/boost/boost.bzl b/boost/boost.bzl index 3ec7836fb..24e6350aa 100644 --- a/boost/boost.bzl +++ b/boost/boost.bzl @@ -26,8 +26,8 @@ default_copts = select({ }) default_defines = select({ - ":windows_x86_64": ["BOOST_ALL_NO_LIB", ], # Turn auto_link off in MSVC compiler - "//conditions:default": [], + ":windows_x86_64": ["BOOST_ALL_NO_LIB"], # Turn auto_link off in MSVC compiler + "//conditions:default": [], }) def srcs_list(library_name, exclude): diff --git a/test/BUILD b/test/BUILD index 0b1d4ac73..632c4e266 100644 --- a/test/BUILD +++ b/test/BUILD @@ -444,8 +444,8 @@ cc_test( name = "hana_test", size = "small", srcs = ["hana_test.cc"], + copts = ["-std=c++14"], deps = [ "@boost//:hana", ], - copts=["-std=c++14",], ) From 4165845a7d7f424f289fe2072e3280555c82dc5f Mon Sep 17 00:00:00 2001 From: Nelson Elhage Date: Mon, 16 Sep 2019 11:44:21 -0700 Subject: [PATCH 4/4] Disable the Windows build for now --- .bazelci/presubmit.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 309f175c0..62a548212 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -18,9 +18,12 @@ tasks: - "..." test_targets: - "..." - windows: - working_directory: test - build_targets: - - "..." - test_targets: - - "..." + +# Disable the Windows build for now; I don't have the time or +# expertise to fix this. +# windows: +# working_directory: test +# build_targets: +# - "..." +# test_targets: +# - "..."