Skip to content

Commit 273cfbd

Browse files
Merge branch 'main' into chr_14559
2 parents 1e05778 + 1d1f747 commit 273cfbd

32 files changed

Lines changed: 281 additions & 45 deletions

.github/workflows/release-windows.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,13 @@ jobs:
6565
6666
# available modules: https://github.com/miurahr/aqtinstall/blob/master/docs/getting_started.rst#installing-modules
6767
# available tools: https://github.com/miurahr/aqtinstall/blob/master/docs/getting_started.rst#installing-tools
68-
- name: Install Qt ${{ env.QT_VERSION }}
68+
- name: Install Qt
6969
uses: jurplel/install-qt-action@v4
7070
with:
7171
version: ${{ env.QT_VERSION }}
7272
modules: 'qtcharts'
7373
setup-python: 'false'
7474
tools: 'tools_opensslv3_x64'
75-
aqtversion: '==3.1.*' # TODO: remove when aqtinstall 3.2.2 is available
7675

7776
# TODO: build with multiple threads
7877
- name: Build x64 release GUI

cfg/windows.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,7 +3504,7 @@ HFONT CreateFont(
35043504
<arg nr="10">
35053505
<not-uninit/>
35063506
</arg>
3507-
<arg nr="11" direction="in">
3507+
<arg nr="11">
35083508
<not-uninit/>
35093509
</arg>
35103510
</function>
@@ -3559,7 +3559,7 @@ HFONT CreateFont(
35593559
<arg nr="11">
35603560
<not-uninit/>
35613561
</arg>
3562-
<arg nr="12" direction="in">
3562+
<arg nr="12">
35633563
<not-uninit/>
35643564
</arg>
35653565
</function>
@@ -4120,7 +4120,7 @@ HFONT CreateFont(
41204120
<arg nr="1" direction="in">
41214121
<not-uninit/>
41224122
</arg>
4123-
<arg nr="2" direction="in">
4123+
<arg nr="2">
41244124
<not-uninit/>
41254125
</arg>
41264126
<arg nr="3" direction="out"/>

cli/signalhandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static const Signalmap_t listofsignals = {
108108
* but when ending up here something went terribly wrong anyway.
109109
* And all which is left is just printing some information and terminate.
110110
*/
111-
static void CppcheckSignalHandler(int signo, siginfo_t * info, void * context)
111+
static void CppcheckSignalHandler(int signo, siginfo_t * info, void * context) // cppcheck-suppress constParameterCallback - info can be const
112112
{
113113
int type = -1;
114114
pid_t killid;

cmake/clang_tidy.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ if(RUN_CLANG_TIDY_NAMES)
3737
set(CLANG_TIDY_CSA_CONFIG "-config={InheritParentConfig: true, Checks: '-*,clang-analyzer-*,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-core.NullDereference,-clang-analyzer-unix.Stream,-clang-analyzer-alpha.clone.CloneChecker,-clang-analyzer-alpha.webkit.*'}")
3838
if (ENABLE_CSA_ALPHA)
3939
set(CLANG_TIDY_CSA_ALPHA_OPTS "-allow-enabling-alpha-checkers" "-extra-arg=-Xclang" "-extra-arg=-analyzer-config" "-extra-arg=-Xclang" "-extra-arg=aggressive-binary-operation-simplification=true")
40+
else()
41+
set(CLANG_TIDY_CSA_ALPHA_OPTS "")
4042
endif()
4143

4244
# TODO: exclude moc_*.cpp

cmake/compilerCheck.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
22
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
33
message(ERROR "GCC >= 5.1 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
44
endif()
5-
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
66
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
77
message(ERROR "Clang >= 3.5 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
88
endif()
9+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
10+
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
11+
message(ERROR "AppleClang >= 6.0 required - detected ${CMAKE_CXX_COMPILER_VERSION} not supported")
12+
endif()
913
elseif(MSVC)
1014
if(MSVC_VERSION VERSION_LESS 1900)
1115
message(ERROR "Visual Studio >= 2015 (19.0) required - detected ${MSVC_VERSION} not supported")
1216
endif()
17+
else()
18+
message(WARNING "Unknown compiler ${CMAKE_CXX_COMPILER_ID}")
1319
endif()

cmake/compilerDefinitions.cmake

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,30 @@ if(MSVC)
88
add_definitions(-DWIN32_LEAN_MEAN)
99
endif()
1010

11-
# TODO: this should probably apply to the compiler and not the platform - I think it is only "broken" with MinGW
12-
# TODO: AppleClang only has libc++
13-
# TODO: what about clang-cl and native Win32 clang?
14-
if(CPPCHK_GLIBCXX_DEBUG AND UNIX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
15-
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
16-
if(USE_LIBCXX)
17-
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18)
18-
add_definitions(-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG)
19-
else()
20-
add_definitions(-D_LIBCPP_ENABLE_ASSERTIONS=1)
21-
endif()
22-
# TODO: also add _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS?
11+
# libstdc++-specific flags
12+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR (NOT USE_LIBCXX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
13+
if(CPPCHK_GLIBCXX_DEBUG AND CMAKE_BUILD_TYPE STREQUAL "Debug")
14+
add_definitions(-D_GLIBCXX_DEBUG)
15+
endif()
16+
endif()
17+
18+
# TODO: what about clang-cl?
19+
# libc++-specific flags - AppleClang only has libc++
20+
if ((USE_LIBCXX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
21+
if(CPPCHK_GLIBCXX_DEBUG AND CMAKE_BUILD_TYPE STREQUAL "Debug")
22+
# TODO: determine proper version for AppleClang - current value is based on the oldest version avaialble in CI
23+
if((CMAKE_CXX_COMPILER_ID STREQUALS "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18) OR
24+
(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17))
25+
add_definitions(-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG)
26+
else()
27+
add_definitions(-D_LIBCPP_ENABLE_ASSERTIONS=1)
2328
endif()
29+
# TODO: also add _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS?
2430
else()
2531
# TODO: check if this can be enabled again for Clang - also done in Makefile
2632
add_definitions(-D_GLIBCXX_DEBUG)
2733
endif()
28-
endif()
2934

30-
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND USE_LIBCXX)
3135
add_definitions(-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES)
3236
endif()
3337

cmake/findDependencies.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ if(HAVE_RULES)
3434
if(NOT PCRE_LIBRARY OR NOT PCRE_INCLUDE)
3535
message(FATAL_ERROR "pcre dependency for RULES has not been found")
3636
endif()
37+
else()
38+
set(PCRE_LIBRARY "")
3739
endif()
3840

3941
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -70,6 +72,9 @@ if(NOT USE_BUNDLED_TINYXML2)
7072
endif()
7173

7274
find_package(Threads REQUIRED)
75+
if(NOT DEFINED CMAKE_THREAD_LIBS_INIT)
76+
set(CMAKE_THREAD_LIBS_INIT "")
77+
endif()
7378

7479
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
7580
# avoid legacy warning about Boost lookup in CMake
@@ -90,7 +95,7 @@ if(USE_BOOST)
9095
endif()
9196
set(Boost_FOUND ON)
9297
set(Boost_INCLUDE_DIRS "${BOOST_INCLUDEDIR}")
93-
# TODO: set Boost_VERSION_STRING
98+
set(Boost_VERSION_STRING "") # TODO: set proper value
9499
elseif(USE_BOOST STREQUAL "Auto")
95100
find_package(Boost)
96101
else()

cmake/options.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ if (NOT USE_BOOST AND USE_BOOST_INT128)
116116
endif()
117117
option(USE_LIBCXX "Use libc++ instead of libstdc++" OFF)
118118

119+
if(USE_LIBCXX AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
120+
message(FATAL_ERROR "libc++ can only be used with a Clang-based compiler")
121+
endif()
122+
119123
option(NO_UNIX_SIGNAL_HANDLING "Disable usage of Unix Signal Handling" OFF)
120124
option(NO_UNIX_BACKTRACE_SUPPORT "Disable usage of Unix Backtrace support" OFF)
121125
option(NO_WINDOWS_SEH "Disable usage of Windows SEH" OFF)

cmake/printInfo.cmake

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ if(BUILD_GUI)
7272
message(STATUS "QT_VERSION = ${QT_VERSION}")
7373
message(STATUS "Qt6Core_LIBRARIES = ${Qt6Core_LIBRARIES}")
7474
message(STATUS "Qt6Core_INCLUDE_DIRS = ${Qt6Core_INCLUDE_DIRS}")
75-
message(STATUS "QHELPGENERATOR = ${QHELPGENERATOR}")
75+
if(BUILD_ONLINE_HELP)
76+
message(STATUS "QHELPGENERATOR = ${QHELPGENERATOR}")
77+
endif()
7678
endif()
7779
message(STATUS)
7880
message(STATUS "HAVE_RULES = ${HAVE_RULES}")
@@ -86,16 +88,22 @@ message(STATUS "CMAKE_THREAD_LIBS_INIT = ${CMAKE_THREAD_LIBS_INIT}")
8688
message(STATUS)
8789
message(STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}")
8890
if(NOT USE_BUNDLED_TINYXML2)
89-
message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
90-
message(STATUS "tinyxml2_INCLUDE_DIRS = ${tinyxml2_INCLUDE_DIRS}")
91+
if(TARGET tinyxml2::tinyxml2)
92+
# TODO: print libraries and include dirs
93+
else()
94+
message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
95+
message(STATUS "tinyxml2_INCLUDE_DIRS = ${tinyxml2_INCLUDE_DIRS}")
96+
endif()
9197
endif()
9298
message(STATUS)
9399
message(STATUS "USE_BOOST = ${USE_BOOST}")
94100
if(USE_BOOST)
95101
message(STATUS "Boost_FOUND = ${Boost_FOUND}")
96-
message(STATUS "Boost_VERSION_STRING = ${Boost_VERSION_STRING}")
97-
message(STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}")
98-
message(STATUS "USE_BOOST_INT128 = ${USE_BOOST_INT128}")
102+
if(Boost_FOUND)
103+
message(STATUS "Boost_VERSION_STRING = ${Boost_VERSION_STRING}")
104+
message(STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}")
105+
message(STATUS "USE_BOOST_INT128 = ${USE_BOOST_INT128}")
106+
endif()
99107
endif()
100108
message(STATUS)
101109
message(STATUS "USE_LIBCXX = ${USE_LIBCXX}")

createrelease

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ rm -f cppcheck.cfg
150150
# TODO manual, update version on webpage
151151

152152
# frs
153-
git archive --format=tar --prefix=$releasename/ $tag | gzip > upload/$releasename.tar.gz
154-
git archive --format=tar --prefix=$releasename/ $tag | bzip2 > upload/$releasename.tar.bz2
155-
git archive --format=zip -9 --prefix=$releasename/ $tag > upload/$releasename.zip
153+
git archive --format=tar --prefix=$releasename/ $tag | gzip > upload/frs/$releasename.tar.gz
154+
git archive --format=tar --prefix=$releasename/ $tag | bzip2 > upload/frs/$releasename.tar.bz2
155+
git archive --format=zip -9 --prefix=$releasename/ $tag > upload/frs/$releasename.zip
156156
cp releasenotes.txt upload/frs/README.md
157157
# TODO msi
158158

0 commit comments

Comments
 (0)