Skip to content

Commit

Permalink
suppress some Visual Studio warnings for GUI code in Qt5 build
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Oct 31, 2024
1 parent 3e73eeb commit 41600d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ CheckOptions:
if(MSVC)
# compilation will fail as e.g. QList::realloc would be replaced by MSVC's macro definition
target_compile_definitions(cppcheck-gui PRIVATE $<$<CONFIG:Debug>:DISABLE_CRTDBG_MAP_ALLOC>)
if(NOT USE_QT6)
target_compile_options(cppcheck-gui PRIVATE /wd4996) # warning C4996: 'QProcess::startDetached': Use QProcess::startDetached(const QString &program, const QStringList &arguments) instead
target_compile_options(cppcheck-gui PRIVATE /wd4505) # warning C4505: 'x': unreferenced function with internal linkage has been removed
endif()
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Q_UNUSED() in generated code
Expand Down

0 comments on commit 41600d0

Please sign in to comment.