diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ca8eb59..d69f56955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,7 @@ - Bugfix: Adopt popup windows in order to force floating behavior on some window managers. (#3836) - Bugfix: Fix split focusing being broken in certain circumstances when the "Show input when it's empty" setting was disabled. (#3838, #3860) - Bugfix: Always refresh tab when a contained split's channel is set. (#3849) -- Dev: Remove official support for QMake. (#3839) +- Dev: Remove official support for QMake. (#3839, #3883) - Dev: Rewrite LimitedQueue (#3798) - Dev: Overhaul highlight system by moving all checks into a Controller allowing for easier tests. (#3399, #3801, #3835) - Dev: Use Game Name returned by Get Streams instead of querying it from the Get Games API. (#3662) diff --git a/lib/boost.pri b/lib/boost.pri deleted file mode 100644 index bea78de40..000000000 --- a/lib/boost.pri +++ /dev/null @@ -1,25 +0,0 @@ -# boost -# Exposed build flags: -# - BOOST_DIRECTORY (C:\local\boost\ by default) (Windows only) - -pajlada { - BOOST_DIRECTORY = C:\dev\projects\boost_1_66_0\ -} - -win32 { - isEmpty(BOOST_DIRECTORY) { - message(Using default boost directory C:\\local\\boost\\) - BOOST_DIRECTORY = C:\local\boost\ - } - - INCLUDEPATH += $$BOOST_DIRECTORY - - isEmpty(BOOST_LIB_SUFFIX) { - message(Using default boost lib directory suffix lib) - BOOST_LIB_SUFFIX = lib - } - - LIBS += -L$$BOOST_DIRECTORY\\$$BOOST_LIB_SUFFIX -} else { - LIBS += -lboost_system -lboost_filesystem -} diff --git a/lib/libcommuni.pri b/lib/libcommuni.pri deleted file mode 100644 index 8402eb747..000000000 --- a/lib/libcommuni.pri +++ /dev/null @@ -1,5 +0,0 @@ -DEFINES += IRC_NAMESPACE=Communi - -include(../lib/libcommuni/src/core/core.pri) -include(../lib/libcommuni/src/model/model.pri) -include(../lib/libcommuni/src/util/util.pri) diff --git a/lib/lrucache.pri b/lib/lrucache.pri deleted file mode 100644 index 1d5b67628..000000000 --- a/lib/lrucache.pri +++ /dev/null @@ -1 +0,0 @@ -INCLUDEPATH += $$PWD/lrucache/ diff --git a/lib/magic_enum.pri b/lib/magic_enum.pri deleted file mode 100644 index 15f1f21c2..000000000 --- a/lib/magic_enum.pri +++ /dev/null @@ -1 +0,0 @@ -INCLUDEPATH += $$PWD/magic_enum/include/ diff --git a/lib/openssl.pri b/lib/openssl.pri deleted file mode 100644 index a0e664b32..000000000 --- a/lib/openssl.pri +++ /dev/null @@ -1,17 +0,0 @@ -win32 { - isEmpty(OPENSSL_DIRECTORY) { - message(Using default openssl directory C:\\local\\openssl) - OPENSSL_DIRECTORY = C:\local\openssl - } - - INCLUDEPATH += $$OPENSSL_DIRECTORY\\include - - LIBS += -L$$OPENSSL_DIRECTORY\lib - - LIBS += -llibssl - LIBS += -llibcrypto -} else { - PKGCONFIG += openssl - - LIBS += -lssl -lcrypto -} diff --git a/lib/qtkeychain.pri b/lib/qtkeychain.pri deleted file mode 100644 index 0cda579cb..000000000 --- a/lib/qtkeychain.pri +++ /dev/null @@ -1,9 +0,0 @@ -freebsd { - INCLUDEPATH += /usr/local/include/qt5keychain - LIBS += -lqt5keychain -} else { - unix:!android:!macx:!ios { - DEFINES += KEYCHAIN_DBUS - } - include(qtkeychain/qt5keychain.pri) -} diff --git a/lib/rapidjson.pri b/lib/rapidjson.pri deleted file mode 100644 index 131f0401d..000000000 --- a/lib/rapidjson.pri +++ /dev/null @@ -1,15 +0,0 @@ -# rapidjson -# Chatterino2 is tested with RapidJSON v1.1.0 -# - RAPIDJSON_PREFIX ($$PWD by default) -# - RAPIDJSON_SYSTEM (1 = true) (Linux only, uses pkg-config) - -!defined(RAPIDJSON_PREFIX) { - RAPIDJSON_PREFIX = $$PWD -} - -linux:equals(RAPIDJSON_SYSTEM, "1") { - message("Building with system RapidJSON") - PKGCONFIG += RapidJSON -} else { - INCLUDEPATH += $$RAPIDJSON_PREFIX/rapidjson/include/ -} diff --git a/lib/serialize.pri b/lib/serialize.pri deleted file mode 100644 index fb05b8a5c..000000000 --- a/lib/serialize.pri +++ /dev/null @@ -1,2 +0,0 @@ -# serialize -INCLUDEPATH += $$PWD/serialize/include/ diff --git a/lib/settings.pri b/lib/settings.pri deleted file mode 100644 index 5ac990748..000000000 --- a/lib/settings.pri +++ /dev/null @@ -1,9 +0,0 @@ -# settings -DEFINES += PAJLADA_SETTINGS_BOOST_FILESYSTEM - -SOURCES += \ - $$PWD/settings/src/settings/settingdata.cpp \ - $$PWD/settings/src/settings/settingmanager.cpp \ - $$PWD/settings/src/settings/detail/realpath.cpp - -INCLUDEPATH += $$PWD/settings/include/ diff --git a/lib/signals.pri b/lib/signals.pri deleted file mode 100644 index 5b15016fa..000000000 --- a/lib/signals.pri +++ /dev/null @@ -1,2 +0,0 @@ -# signals -INCLUDEPATH += $$PWD/signals/include/ diff --git a/lib/warnings.pri b/lib/warnings.pri deleted file mode 100644 index d89075720..000000000 --- a/lib/warnings.pri +++ /dev/null @@ -1,43 +0,0 @@ -# Define warning flags for Chatterino -win32-msvc* { - QMAKE_CXXFLAGS_WARN_ON = /W4 - # 4714 - function marked as __forceinline not inlined - # 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated. - # These functions may have a different preferred name, may be insecure or have - # a more secure variant, or may be obsolete. - # 4505 - unreferenced local version has been removed - # 4127 - conditional expression is constant - # 4503 - decorated name length exceeded, name was truncated - # 4100 - unreferences formal parameter - # 4305 - possible truncation of data - # 4267 - possible loss of data in return - QMAKE_CXXFLAGS_WARN_ON += /wd4714 - QMAKE_CXXFLAGS_WARN_ON += /wd4996 - QMAKE_CXXFLAGS_WARN_ON += /wd4505 - QMAKE_CXXFLAGS_WARN_ON += /wd4127 - QMAKE_CXXFLAGS_WARN_ON += /wd4503 - QMAKE_CXXFLAGS_WARN_ON += /wd4100 - QMAKE_CXXFLAGS_WARN_ON += /wd4305 - QMAKE_CXXFLAGS_WARN_ON += /wd4267 - -} else { - QMAKE_CXXFLAGS_WARN_ON = -Wall - QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function - QMAKE_CXXFLAGS_WARN_ON += -Wno-switch - QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations - QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare - QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable - - # Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future - QMAKE_CXXFLAGS_WARN_ON += -Wno-strict-aliasing - - QMAKE_CXXFLAGS_WARN_ON += -Werror=return-type - - CXX_VERSION = $$system($$QMAKE_CXX --version) - contains(CXX_VERSION, "clang") { - QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef - QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-private-field - } else { - QMAKE_CXXFLAGS_WARN_ON += -Wno-class-memaccess - } -} diff --git a/lib/websocketpp.pri b/lib/websocketpp.pri deleted file mode 100644 index 2ae1289b4..000000000 --- a/lib/websocketpp.pri +++ /dev/null @@ -1,20 +0,0 @@ -# websocketpp -# Chatterino2 is tested with websocketpp 0.8.1 -# Exposed build flags: -# - WEBSOCKETPP_PREFIX ($$PWD by default) -# - WEBSOCKETPP_SYSTEM (1 = true) (unix only) - -!defined(WEBSOCKETPP_PREFIX) { - WEBSOCKETPP_PREFIX = $$PWD -} - -unix { - equals(WEBSOCKETPP_SYSTEM, "1") { - message("Building with system websocketpp") - } else { - message("Building with websocketpp submodule (Prefix: $$WEBSOCKETPP_PREFIX)") - INCLUDEPATH += $$WEBSOCKETPP_PREFIX/websocketpp/ - } -} else { - INCLUDEPATH += $$WEBSOCKETPP_PREFIX/websocketpp -} diff --git a/lib/winsdk.pri b/lib/winsdk.pri deleted file mode 100644 index 6961cceff..000000000 --- a/lib/winsdk.pri +++ /dev/null @@ -1,24 +0,0 @@ -win32 { - LIBS += -luser32 -} - -# Optional dependency on Windows SDK 7 -!contains(QMAKE_TARGET.arch, x86_64) { - win32:exists(C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\Windows.h) { - LIBS += -L"C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib" -ldwmapi - - DEFINES += "USEWINSDK" - message(Using Windows SDK 7) - } -} - -# Optional dependency on Windows SDK 10 -contains(QMAKE_TARGET.arch, x86_64) { - WIN_SDK_VERSION = $$(WindowsSDKVersion) - !isEmpty(WIN_SDK_VERSION) { - !equals(WIN_SDK_VERSION, "\\") { - DEFINES += "USEWINSDK" - message(Using Windows SDK 10) - } - } -} diff --git a/lib/wintoast.pri b/lib/wintoast.pri deleted file mode 100644 index b8a5ee85c..000000000 --- a/lib/wintoast.pri +++ /dev/null @@ -1,5 +0,0 @@ -win32 { - INCLUDEPATH += $$PWD/../lib/wintoast/src/ - SOURCES += \ - $$PWD/../lib/WinToast/src/wintoastlib.cpp -} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d622372e1..5b76d4b57 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -729,3 +729,55 @@ if (LIBRT) ) endif () + +# Configure compiler warnings +if (MSVC) + # 4714 - function marked as __forceinline not inlined + # 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated. + # These functions may have a different preferred name, may be insecure or have + # a more secure variant, or may be obsolete. + # 4505 - unreferenced local version has been removed + # 4127 - conditional expression is constant + # 4503 - decorated name length exceeded, name was truncated + # 4100 - unreferences formal parameter + # 4305 - possible truncation of data + # 4267 - possible loss of data in return + target_compile_options(${LIBRARY_PROJECT} PUBLIC + /W4 + # Disable the following warnings + /wd4714 + /wd4996 + /wd4505 + /wd4127 + /wd4503 + /wd4100 + /wd4305 + /wd4267 + ) +else () + target_compile_options(${LIBRARY_PROJECT} PUBLIC + -Wall + # Disable the following warnings + -Wno-unused-function + -Wno-switch + -Wno-deprecated-declarations + -Wno-sign-compare + -Wno-unused-variable + + # Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future + -Wno-strict-aliasing + + -Werror=return-type + ) + + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_compile_options(${LIBRARY_PROJECT} PUBLIC + -Wno-unused-local-typedef + -Wno-unused-private-field + ) + else () + target_compile_options(${LIBRARY_PROJECT} PUBLIC + -Wno-class-memaccess + ) + endif() +endif ()