office-gobmx/external/libcmis/StaticLibrary_libcmis.mk
Stephan Bergmann c8e37ef268 external/libcmis: Falling back to C++03 is too drastic
e.g. when compiling against system libxml2, which in turn includes system
ICU include files, which may use C++11 chart16_t.  So assume that -std=gnu++14
is acceptable for any GCC version for which at least on of -std=gnu++17,
-std=gnu++1z, -std=c++17, -std=c++1z is acceptable, and just fall back to C++14.

Change-Id: Id9f07ab4f419e5683f4fb9c9b2d3bdda251cdd1b
Reviewed-on: https://gerrit.libreoffice.org/45409
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-28 18:48:47 +01:00

112 lines
4.7 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_StaticLibrary_StaticLibrary,libcmis))
$(eval $(call gb_StaticLibrary_set_warnings_not_errors,libcmis))
ifeq ($(COM_IS_CLANG),TRUE)
# Avoid narrowing conversion error (even though the option is technically a warning)
# caused by boost.
# Also avoid -Wdynamic-exception-spec errors in C++17 mode.
$(eval $(call gb_StaticLibrary_add_cxxflags,libcmis,\
-Wno-error=c++11-narrowing \
$(if $(filter -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z, \
$(CXXFLAGS_CXX11)), \
-Wno-error=dynamic-exception-spec) \
))
endif
# Build as C++14 if necessary to avoid GCC C++17 "error: ISO C++1z does not
# allow dynamic exception specifications", until upstream libcmis is ported to
# C++17:
ifeq ($(COM)-$(COM_IS_CLANG),GCC-)
$(eval $(call gb_StaticLibrary_add_cxxflags,libcmis, \
$(if $(filter -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z, \
$(CXXFLAGS_CXX11)), \
-std=gnu++14) \
))
endif
$(eval $(call gb_StaticLibrary_set_include,libcmis, \
-I$(call gb_UnpackedTarball_get_dir,libcmis/src/libcmis) \
$$(INCLUDE) \
))
$(eval $(call gb_StaticLibrary_use_unpacked,libcmis,libcmis))
$(eval $(call gb_StaticLibrary_use_externals,libcmis,\
boost_headers \
curl \
libxml2 \
))
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,libcmis,\
UnpackedTarball/libcmis/src/libcmis/allowable-actions \
UnpackedTarball/libcmis/src/libcmis/atom-document \
UnpackedTarball/libcmis/src/libcmis/atom-folder \
UnpackedTarball/libcmis/src/libcmis/atom-object-type \
UnpackedTarball/libcmis/src/libcmis/atom-object \
UnpackedTarball/libcmis/src/libcmis/atom-session \
UnpackedTarball/libcmis/src/libcmis/atom-workspace \
UnpackedTarball/libcmis/src/libcmis/base-session \
UnpackedTarball/libcmis/src/libcmis/document \
UnpackedTarball/libcmis/src/libcmis/folder \
UnpackedTarball/libcmis/src/libcmis/gdrive-document \
UnpackedTarball/libcmis/src/libcmis/gdrive-folder \
UnpackedTarball/libcmis/src/libcmis/gdrive-object \
UnpackedTarball/libcmis/src/libcmis/gdrive-object-type \
UnpackedTarball/libcmis/src/libcmis/gdrive-property \
UnpackedTarball/libcmis/src/libcmis/gdrive-repository \
UnpackedTarball/libcmis/src/libcmis/gdrive-session \
UnpackedTarball/libcmis/src/libcmis/gdrive-utils \
UnpackedTarball/libcmis/src/libcmis/http-session \
UnpackedTarball/libcmis/src/libcmis/json-utils \
UnpackedTarball/libcmis/src/libcmis/oauth2-data \
UnpackedTarball/libcmis/src/libcmis/oauth2-handler \
UnpackedTarball/libcmis/src/libcmis/oauth2-providers \
UnpackedTarball/libcmis/src/libcmis/object \
UnpackedTarball/libcmis/src/libcmis/object-type \
UnpackedTarball/libcmis/src/libcmis/onedrive-document \
UnpackedTarball/libcmis/src/libcmis/onedrive-folder \
UnpackedTarball/libcmis/src/libcmis/onedrive-object \
UnpackedTarball/libcmis/src/libcmis/onedrive-object-type \
UnpackedTarball/libcmis/src/libcmis/onedrive-property \
UnpackedTarball/libcmis/src/libcmis/onedrive-repository \
UnpackedTarball/libcmis/src/libcmis/onedrive-session \
UnpackedTarball/libcmis/src/libcmis/onedrive-utils \
UnpackedTarball/libcmis/src/libcmis/property \
UnpackedTarball/libcmis/src/libcmis/property-type \
UnpackedTarball/libcmis/src/libcmis/rendition \
UnpackedTarball/libcmis/src/libcmis/repository \
UnpackedTarball/libcmis/src/libcmis/session-factory \
UnpackedTarball/libcmis/src/libcmis/sharepoint-document \
UnpackedTarball/libcmis/src/libcmis/sharepoint-folder \
UnpackedTarball/libcmis/src/libcmis/sharepoint-object \
UnpackedTarball/libcmis/src/libcmis/sharepoint-object-type \
UnpackedTarball/libcmis/src/libcmis/sharepoint-property \
UnpackedTarball/libcmis/src/libcmis/sharepoint-repository \
UnpackedTarball/libcmis/src/libcmis/sharepoint-session \
UnpackedTarball/libcmis/src/libcmis/sharepoint-utils \
UnpackedTarball/libcmis/src/libcmis/ws-document \
UnpackedTarball/libcmis/src/libcmis/ws-folder \
UnpackedTarball/libcmis/src/libcmis/ws-navigationservice \
UnpackedTarball/libcmis/src/libcmis/ws-object \
UnpackedTarball/libcmis/src/libcmis/ws-object-type \
UnpackedTarball/libcmis/src/libcmis/ws-objectservice \
UnpackedTarball/libcmis/src/libcmis/ws-relatedmultipart \
UnpackedTarball/libcmis/src/libcmis/ws-repositoryservice \
UnpackedTarball/libcmis/src/libcmis/ws-requests \
UnpackedTarball/libcmis/src/libcmis/ws-session \
UnpackedTarball/libcmis/src/libcmis/ws-soap \
UnpackedTarball/libcmis/src/libcmis/ws-versioningservice \
UnpackedTarball/libcmis/src/libcmis/xml-utils \
))
# vim: set noet sw=4 ts=4: