Skip to content

Commit 1223158

Browse files
committed
Merge branch 'master' of github.com:doxygen/doxygen
2 parents 5abd166 + ee0a08a commit 1223158

File tree

8 files changed

+50
-16
lines changed

8 files changed

+50
-16
lines changed

CMakeLists.txt

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ option(build_parse "Parses source code and dumps the dependencies between th
2222
option(build_search "Build external search tools (doxysearch and doxyindexer)" OFF)
2323
option(build_doc "Build user manual (HTML and PDF)" OFF)
2424
option(build_doc_chm "Build user manual (CHM)" OFF)
25-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
25+
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
2626
option(use_libc++ "Use libc++ as C++ standard library." ON)
2727
endif()
2828
option(use_libclang "Add support for libclang parsing." OFF)
@@ -36,6 +36,7 @@ option(enable_coverage "Enable coverage reporting for gcc/clang [development]" O
3636
option(enable_tracing "Enable tracing option in release builds [development]" OFF)
3737
option(enable_lex_debug "Enable debugging info for lexical scanners in release builds [development]" OFF)
3838

39+
include(CheckCXXCompilerFlag)
3940

4041
set(force_qt CACHE INTERNAL "Forces doxywizard to build using the specified major version, this can be Qt5 or Qt6")
4142
set_property(CACHE force_qt PROPERTY STRINGS OFF Qt6 Qt5)
@@ -82,8 +83,17 @@ if (build_wizard)
8283
endif()
8384
endif()
8485

85-
# use C++17 standard for compiling
86-
set(CMAKE_CXX_STANDARD 17)
86+
# use C++17 standard for compiling (unless very new Clang is present)
87+
if (
88+
(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND
89+
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17) OR
90+
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
91+
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19)
92+
)
93+
set(CMAKE_CXX_STANDARD 20)
94+
else()
95+
set(CMAKE_CXX_STANDARD 17)
96+
endif()
8797
set(CMAKE_CXX_STANDARD_REQUIRED ON)
8898
set(CMAKE_CXX_EXTENSIONS ON)
8999

@@ -116,11 +126,28 @@ if (CMAKE_SYSTEM MATCHES "Darwin")
116126
set(EXTRA_LIBS ${CORESERVICES_LIB})
117127
endif()
118128

119-
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
120-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_LIBCPP_ENABLE_ASSERTIONS=1")
121-
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
122-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_ASSERTIONS")
123-
endif()
129+
check_cxx_source_compiles(
130+
"
131+
#include <algorithm>
132+
133+
#if !defined(__clang__) || !defined(_LIBCPP_VERSION)
134+
# error \"This is not clang with libcxx by llvm\"
135+
#endif
136+
137+
int main() {
138+
return 0;
139+
}
140+
"
141+
IS_CLANG_LIBCPP
142+
FAIL_REGEX "This is not clang with libcxx by llvm"
143+
)
144+
145+
add_compile_definitions(
146+
# LLVM's clang in combination with libc++
147+
$<$<AND:$<CONFIG:Debug>,$<BOOL:${IS_CLANG_LIBCPP}>>:_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG>
148+
# LLVM's clang or gcc in combination with libstdc++ (GNU)
149+
$<$<AND:$<CONFIG:Debug>,$<NOT:$<BOOL:${IS_CLANG_LIBCPP}>>>:_GLIBCXX_ASSERTIONS>
150+
)
124151

125152
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSQLITE_OMIT_LOAD_EXTENSION=1")
126153

@@ -171,7 +198,11 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
171198
endif()
172199

173200
# needed for JavaCC
174-
set(JAVA_CC_EXTRA_FLAGS "-DJAVACC_CHAR_TYPE=\"unsigned char\"")
201+
if (CMAKE_CXX_STANDARD EQUAL 20)
202+
set(JAVA_CC_EXTRA_FLAGS "-DJAVACC_CHAR_TYPE=\"char8_t\"")
203+
else()
204+
set(JAVA_CC_EXTRA_FLAGS "-DJAVACC_CHAR_TYPE=\"unsigned char\"")
205+
endif()
175206
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${JAVA_CC_EXTRA_FLAGS}")
176207
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${JAVA_CC_EXTRA_FLAGS}")
177208

deps/fmt/include/fmt/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2773,7 +2773,7 @@ template <typename Char, typename... Args> class basic_format_string {
27732773
template <typename S,
27742774
FMT_ENABLE_IF(
27752775
std::is_convertible<const S&, basic_string_view<Char>>::value)>
2776-
FMT_CONSTEVAL FMT_INLINE basic_format_string(const S& s) : str_(s) {
2776+
FMT_CONSTEXPR FMT_INLINE basic_format_string(const S& s) : str_(s) {
27772777
static_assert(
27782778
detail::count<
27792779
(std::is_base_of<detail::view, remove_reference_t<Args>>::value &&

deps/spdlog/include/spdlog/fmt/bundled/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2773,7 +2773,7 @@ template <typename Char, typename... Args> class basic_format_string {
27732773
template <typename S,
27742774
FMT_ENABLE_IF(
27752775
std::is_convertible<const S&, basic_string_view<Char>>::value)>
2776-
FMT_CONSTEVAL FMT_INLINE basic_format_string(const S& s) : str_(s) {
2776+
FMT_CONSTEXPR FMT_INLINE basic_format_string(const S& s) : str_(s) {
27772777
static_assert(
27782778
detail::count<
27792779
(std::is_base_of<detail::view, remove_reference_t<Args>>::value &&

doc/doxygen_manual_chm.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,11 @@ dl.el {
155155

156156
div.line {
157157
font-family: 'JetBrains Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace, fixed;
158-
font-size: 13px;
158+
font-size: 13px;
159159
min-height: 13px;
160160
line-height: 1.2;
161-
text-wrap: unrestricted;
161+
text-wrap: wrap;
162+
word-break: break-all;
162163
white-space: -moz-pre-wrap; /* Moz */
163164
white-space: -pre-wrap; /* Opera 4-6 */
164165
white-space: -o-pre-wrap; /* Opera 7 */

src/pre.l

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,6 +2259,7 @@ static std::unique_ptr<FileState> checkAndOpenFile(yyscan_t yyscanner,const QCSt
22592259
}
22602260
else
22612261
{
2262+
addTerminalCharIfMissing(fs->fileBuf,'\n');
22622263
fs->oldFileBuf = state->inputBuf;
22632264
fs->oldFileBufPos = state->inputBufPos;
22642265
}

src/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ enum class VhdlSpecifier
784784
ETYPE(ObjcImpl, None) \
785785
ETYPE(ExportedInterface, None) \
786786
ETYPE(IncludedService, None) \
787-
ETYPE(ExampleLineno, None) \
787+
ETYPE(ExampleLineno, Doc) \
788788

789789
/** Wrapper class for the Entry type. Can be set only during construction.
790790
* Packs the type together with category flags.

templates/html/doxygen.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ div.line {
379379
font-size: 13px;
380380
min-height: 13px;
381381
line-height: 1.2;
382-
text-wrap: unrestricted;
382+
text-wrap: wrap;
383+
word-break: break-all;
383384
white-space: -moz-pre-wrap; /* Moz */
384385
white-space: -pre-wrap; /* Opera 4-6 */
385386
white-space: -o-pre-wrap; /* Opera 7 */

vhdlparser/VhdlParserErrorHandler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class VhdlTokenManagerErrorHandler: public TokenManagerErrorHandler
5050

5151
virtual void lexicalError(bool EOFSeen, int /* lexState */, int errorLine, int /* errorColumn */, const JJString& errorAfter, JJChar curChar, VhdlParserTokenManager* /* token_manager */)
5252
{
53-
warn(m_fileName,errorLine,"Lexical error, Encountered: '{:c}' after: '{}'",curChar, (EOFSeen? "EOF" : (const char*)errorAfter.c_str()));
53+
warn(m_fileName,errorLine,"Lexical error, Encountered: '{:c}' after: '{}'",(char)curChar, (EOFSeen? "EOF" : (const char*)errorAfter.c_str()));
5454
}
5555

5656
virtual void lexicalError(const JJString& errorMessage, VhdlParserTokenManager* /* token_manager */)

0 commit comments

Comments
 (0)