summaryrefslogtreecommitdiff
path: root/external/liborcus
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-12-15 11:05:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-12-15 22:23:31 +0100
commitc5f6043b0f2c4cb521e8694dbf3dd355042fd704 (patch)
tree328fad1064ebe23c4feb485f0ec7ed05ecceb809 /external/liborcus
parentbe46bc5d20ad82be1d9c8513a83584ecee9edbc2 (diff)
Enable C++17 for clang-cl, too
Similar to libc++ in C++17 mode, some types like std::auto_ptr are indeed removed in C++17 mode by default, and need _HAS_AUTO_PTR_ETC=1 to be enabled (see <https://blogs.msdn.microsoft.com/vcblog/2017/12/08/c17-feature-removals- and-deprecations/>). Unlike libc++, also std::binary_function and std::unary_function are removed (and need the same _HAS_AUTO_PTR_ETC=1 to enable). So either set that flag to make external code build, or use patches (for external/mdds) to make externals' files included in LO proper still work there. Change-Id: I886cc0de8196255334ee03ec48cb4bc54d460afd Reviewed-on: https://gerrit.libreoffice.org/46514 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/liborcus')
-rw-r--r--external/liborcus/Library_orcus-parser.mk6
-rw-r--r--external/liborcus/Library_orcus.mk6
2 files changed, 12 insertions, 0 deletions
diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk
index 4c2ca7f291db..83a4a2f48806 100644
--- a/external/liborcus/Library_orcus-parser.mk
+++ b/external/liborcus/Library_orcus-parser.mk
@@ -30,6 +30,12 @@ $(eval $(call gb_Library_add_defs,orcus-parser,\
-D__ORCUS_PSR_BUILDING_DLL \
))
+# Needed when building against MSVC in C++17 mode, as
+# workdir/UnpackedTarball/liborcus/include/orcus/global.hpp uses std::unary_function:
+$(eval $(call gb_Library_add_defs,orcus-parser, \
+ -D_HAS_AUTO_PTR_ETC=1 \
+))
+
$(eval $(call gb_Library_set_generated_cxx_suffix,orcus-parser,cpp))
$(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\
diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk
index 9916f6fe5236..6457ec4afc0c 100644
--- a/external/liborcus/Library_orcus.mk
+++ b/external/liborcus/Library_orcus.mk
@@ -36,6 +36,12 @@ $(eval $(call gb_Library_add_defs,orcus,\
-D__ORCUS_XLS_XML \
))
+# Needed when building against MSVC in C++17 mode, as
+# workdir/UnpackedTarball/liborcus/src/liborcus/css_document_tree.cpp uses std::unary_function:
+$(eval $(call gb_Library_add_defs,orcus, \
+ -D_HAS_AUTO_PTR_ETC=1 \
+))
+
$(eval $(call gb_Library_use_libraries,orcus,\
orcus-parser \
))