Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows CI build #134

Merged
merged 7 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ tasks:
- "..."
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:
# - "..."
windows:
working_directory: test
environment:
BAZEL_VC: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC"
build_targets:
- "..."
test_targets:
- "..."
81 changes: 62 additions & 19 deletions BUILD.boost
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@ config_setting(
visibility = ["//visibility:public"],
)

# TODO(https://github.com/bazelbuild/bazel-skylib/issues/191): use
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, I think the bazel bug here is bazelbuild/bazel#4856

# expand_template instead of `sed`.
[genrule(
name = "clean_%s_asm" % name,
outs = [
"libs/context/src/asm/%s_x86_64_ms_pe_masm_clean.asm" % name,
],
cmd = "sed 's/BOOST_CONTEXT_EXPORT//' $< > $@",
srcs = [
"libs/context/src/asm/%s_x86_64_ms_pe_masm.asm" % name,
],
) for name in ["make", "jump", "ontop"]]

BOOST_CTX_ASM_SOURCES = select({
":linux_arm": [
"libs/context/src/asm/jump_arm_aapcs_elf_gas.S",
Expand All @@ -99,9 +112,9 @@ BOOST_CTX_ASM_SOURCES = select({
"libs/context/src/asm/ontop_x86_64_sysv_macho_gas.S",
],
":windows_x86_64": [
"libs/context/src/asm/make_x86_64_ms_pe_masm.asm",
"libs/context/src/asm/jump_x86_64_ms_pe_masm.asm",
"libs/context/src/asm/ontop_x86_64_ms_pe_masm.asm",
"libs/context/src/asm/make_x86_64_ms_pe_masm_clean.asm",
"libs/context/src/asm/jump_x86_64_ms_pe_masm_clean.asm",
"libs/context/src/asm/ontop_x86_64_ms_pe_masm_clean.asm",
],
})

Expand Down Expand Up @@ -914,24 +927,53 @@ boost_library(
name = "limits",
)

boost_library(
name = "locale",
srcs =
glob(
[
"libs/locale/src/**/*.cpp",
"libs/locale/src/**/*.hpp",
"libs/locale/src/**/*.ipp",
],
exclude = [
"libs/locale/src/win32/*.cpp",
"libs/locale/src/icu/*.cpp",
],
),
copts = [
BOOST_LOCALE_COMMON_SOURCES = glob([
"libs/locale/src/encoding/*.cpp",
"libs/locale/src/encoding/*.hpp",
"libs/locale/src/encoding/*.ipp",
"libs/locale/src/shared/*.cpp",
"libs/locale/src/shared/*.hpp",
"libs/locale/src/std/*.cpp",
"libs/locale/src/std/*.hpp",
"libs/locale/src/util/*.cpp",
"libs/locale/src/util/*.hpp",
], exclude=[
"libs/locale/src/util/iconv.hpp",
])

BOOST_LOCALE_POSIX_SOURCES = BOOST_LOCALE_COMMON_SOURCES + [
"libs/locale/src/util/iconv.hpp",
] + glob([
"libs/locale/src/posix/*.cpp",
"libs/locale/src/posix/*.hpp",
])

BOOST_LOCALE_WIN32_SOURCES = BOOST_LOCALE_COMMON_SOURCES + glob([
"libs/locale/src/win32/*.cpp",
"libs/locale/src/win32/*.hpp",
])

BOOST_LOCALE_POSIX_COPTS = [
"-DBOOST_LOCALE_WITH_ICONV",
"-DBOOST_LOCALE_NO_WINAPI_BACKEND",
] + _w_no_deprecated,
]

BOOST_LOCALE_WIN32_COPTS = []

boost_library(
name = "locale",
srcs = select({
":linux_arm": BOOST_LOCALE_POSIX_SOURCES,
":linux_x86_64": BOOST_LOCALE_POSIX_SOURCES,
":osx_x86_64": BOOST_LOCALE_POSIX_SOURCES,
":windows_x86_64": BOOST_LOCALE_WIN32_SOURCES,
}),
copts = select({
":linux_arm": BOOST_LOCALE_POSIX_COPTS,
":linux_x86_64": BOOST_LOCALE_POSIX_COPTS,
":osx_x86_64": BOOST_LOCALE_POSIX_COPTS,
":windows_x86_64": BOOST_LOCALE_WIN32_COPTS,
}) + _w_no_deprecated,
deps = [
":assert",
":config",
Expand Down Expand Up @@ -1564,6 +1606,7 @@ boost_library(
":osx_x86_64": [],
":windows_x86_64": [
"BOOST_ALL_NO_LIB",
"BOOST_THREAD_BUILD_LIB",
"BOOST_THREAD_USE_LIB",
"BOOST_WIN32_THREAD",
],
Expand Down
2 changes: 1 addition & 1 deletion test/qvm_test.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <boost/qvm/all.hpp>

int main() {
boost::qvm::quat<double> rx = boost::qvm::rotx_quat(M_PI);
boost::qvm::quat<double> rx = boost::qvm::rotx_quat(3.14159265358979323846);
double v[3] = {1, 1, 0};
boost::qvm::vec<double, 3> w = rx*boost::qvm::vref(v);
return boost::qvm::A<1>(w) != -1;
Expand Down