docs/doxygen/Makefile.am | 4 - m4/ax_cxx_compile_stdcxx.m4 | 88 +++++++++++++++++++++++++++++++-------- src/test/importtest.cpp | 9 +++ src/test/xmldrawinggenerator.cpp | 5 ++ 4 files changed, 83 insertions(+), 23 deletions(-)
New commits: commit b4aa628436e061260ca9afd876b65d3a1354d294 Author: Fridrich Štrba <fridrich.st...@bluewin.ch> AuthorDate: Thu Sep 11 02:18:30 2025 +0200 Commit: Fridrich Štrba <fridrich.st...@bluewin.ch> CommitDate: Thu Sep 11 02:18:34 2025 +0200 Fix some strict mode warnings/errors Change-Id: I218cad0255cb2f1c19dc0a786de14e3a1f17ee02 diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp index 5bde3c1..4e0d533 100644 --- a/src/test/importtest.cpp +++ b/src/test/importtest.cpp @@ -19,6 +19,11 @@ #include "xmldrawinggenerator.h" +#ifdef BAD_CAST +#undef BAD_CAST +#endif +#define BAD_CAST(a) const_cast<xmlChar*>(reinterpret_cast<const xmlChar*>(a)) + namespace librevenge { @@ -155,10 +160,10 @@ librevenge::RVNGString getXPathContent(xmlDocPtr doc, const librevenge::RVNGStri case XPATH_USERS: case XPATH_XSLT_TREE: CPPUNIT_FAIL("Unsupported XPath type"); + default: + CPPUNIT_FAIL("Invalid XPath type"); } - CPPUNIT_FAIL("Invalid XPath type"); - } /// Assert that xpath exists, and its content equals to content. void assertXPathContent(xmlDocPtr doc, const librevenge::RVNGString &xpath, const librevenge::RVNGString &content) diff --git a/src/test/xmldrawinggenerator.cpp b/src/test/xmldrawinggenerator.cpp index cad7e2e..5ff060d 100644 --- a/src/test/xmldrawinggenerator.cpp +++ b/src/test/xmldrawinggenerator.cpp @@ -14,6 +14,11 @@ #include <utility> #include <vector> +#ifdef BAD_CAST +#undef BAD_CAST +#endif +#define BAD_CAST(a) const_cast<xmlChar*>(reinterpret_cast<const xmlChar*>(a)) + namespace libvisio { commit e5bf69e0ba9f4416f481460dfaadab9caf7264f6 Author: Fridrich Štrba <fridrich.st...@bluewin.ch> AuthorDate: Thu Sep 11 02:06:43 2025 +0200 Commit: Fridrich Štrba <fridrich.st...@bluewin.ch> CommitDate: Thu Sep 11 02:18:34 2025 +0200 Updated m4 file Change-Id: I1ae92a12a244b96aab945d4daefdc2ba2e61be29 diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4 index 8edf515..fe6ae17 100644 --- a/m4/ax_cxx_compile_stdcxx.m4 +++ b/m4/ax_cxx_compile_stdcxx.m4 @@ -10,8 +10,8 @@ # # Check for baseline language coverage in the compiler for the specified # version of the C++ standard. If necessary, add switches to CXX and -# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for -# the respective C++ standard version. +# CXXCPP to enable support. VERSION may be '11', '14', '17', '20', or +# '23' for the respective C++ standard version. # # The second argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. @@ -36,14 +36,15 @@ # Copyright (c) 2016, 2018 Krzesimir Nowak <qdl...@gmail.com> # Copyright (c) 2019 Enji Cooper <yaneurab...@gmail.com> # Copyright (c) 2020 Jason Merrill <ja...@redhat.com> -# Copyright (c) 2021 Jörn Heusipp <osm...@problemloesungsmaschine.de> +# Copyright (c) 2021, 2024 Jörn Heusipp <osm...@problemloesungsmaschine.de> +# Copyright (c) 2015, 2022, 2023, 2024 Olly Betts # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 18 +#serial 25 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro dnl (serial version number 13). @@ -53,6 +54,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl [$1], [14], [ax_cxx_compile_alternatives="14 1y"], [$1], [17], [ax_cxx_compile_alternatives="17 1z"], [$1], [20], [ax_cxx_compile_alternatives="20"], + [$1], [23], [ax_cxx_compile_alternatives="23"], [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl m4_if([$2], [], [], [$2], [ext], [], @@ -159,31 +161,41 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl dnl Test body for checking C++11 support m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + [_AX_CXX_COMPILE_STDCXX_testbody_new_in_11] ) dnl Test body for checking C++14 support m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + [_AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14] ) dnl Test body for checking C++17 support m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 + [_AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17] ) dnl Test body for checking C++20 support m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_20 + [_AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_20] +) + +dnl Test body for checking C++23 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_23], + [_AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_20 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_23] ) @@ -201,7 +213,17 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ // MSVC always sets __cplusplus to 199711L in older versions; newer versions // only set it correctly if /Zc:__cplusplus is specified as well as a // /std:c++NN switch: +// // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ +// +// The value __cplusplus ought to have is available in _MSVC_LANG since +// Visual Studio 2015 Update 3: +// +// https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros +// +// This was also the first MSVC version to support C++14 so we can't use the +// value of either __cplusplus or _MSVC_LANG to quickly rule out MSVC having +// C++11 or C++14 support, but we can check _MSVC_LANG for C++17 and later. #elif __cplusplus < 201103L && !defined _MSC_VER #error "This is not a C++11 compiler" @@ -617,7 +639,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201703L && !defined _MSC_VER +#elif (defined _MSVC_LANG ? _MSVC_LANG : __cplusplus) < 201703L #error "This is not a C++17 compiler" @@ -983,7 +1005,7 @@ namespace cxx17 } // namespace cxx17 -#endif // __cplusplus < 201703L && !defined _MSC_VER +#endif // (defined _MSVC_LANG ? _MSVC_LANG : __cplusplus) < 201703L ]]) @@ -996,7 +1018,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 202002L && !defined _MSC_VER +#elif (defined _MSVC_LANG ? _MSVC_LANG : __cplusplus) < 202002L #error "This is not a C++20 compiler" @@ -1013,6 +1035,36 @@ namespace cxx20 } // namespace cxx20 -#endif // __cplusplus < 202002L && !defined _MSC_VER +#endif // (defined _MSVC_LANG ? _MSVC_LANG : __cplusplus) < 202002L + +]]) + + +dnl Tests for new features in C++23 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_23], [[ + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif (defined _MSVC_LANG ? _MSVC_LANG : __cplusplus) < 202302L + +#error "This is not a C++23 compiler" + +#else + +#include <version> + +namespace cxx23 +{ + +// As C++23 supports feature test macros in the standard, there is no +// immediate need to actually test for feature availability on the +// Autoconf side. + +} // namespace cxx23 + +#endif // (defined _MSVC_LANG ? _MSVC_LANG : __cplusplus) < 202302L ]]) commit f28a7be076571469741e70a7890087388844dfff Author: Fridrich Štrba <fridrich.st...@bluewin.ch> AuthorDate: Thu Sep 11 01:57:52 2025 +0200 Commit: Fridrich Štrba <fridrich.st...@bluewin.ch> CommitDate: Thu Sep 11 02:18:34 2025 +0200 Install all files generated by doxygen Install the whole directory and do not pick only some file-types Change-Id: Ieb1ca4b50ffd4caeda332a12d2f50370e491da69 diff --git a/docs/doxygen/Makefile.am b/docs/doxygen/Makefile.am index 1d7abd9..d6d4a95 100644 --- a/docs/doxygen/Makefile.am +++ b/docs/doxygen/Makefile.am @@ -6,9 +6,7 @@ if WITH_LIBVISIO_DOCS install-data-am: mkdir -p $(DESTDIR)$(docdir)/html - $(INSTALL_DATA) html/*.html $(DESTDIR)$(docdir)/html/ - $(INSTALL_DATA) html/*.png $(DESTDIR)$(docdir)/html/ - $(INSTALL_DATA) html/*.css $(DESTDIR)$(docdir)/html/ + $(INSTALL_DATA) html/* $(DESTDIR)$(docdir)/html/ uninstall-am: -rm -rf $(DESTDIR)$(docdir)/html