diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-08 15:34:11 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-08 15:34:11 +0100 |
commit | 6b2326d0b61d588a7b9d1a8a1b2ca434cda1799f (patch) | |
tree | d0564ae69966fcf1d8dcc62eded78b2ba1413098 /CMakeLists.txt | |
parent | Added .clang-format (diff) | |
download | smolbote-6b2326d0b61d588a7b9d1a8a1b2ca434cda1799f.tar.xz |
Fixed bugs with QDockWidgets
- QDockWidgets are now deleted on close
- Opening a new BookmarksWidget no longer leaves an empty dock widget
- Fixed crash with deleting dock widgets
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 600ac8e..fdc3b2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.1.0) project(smolbote) # Options +option(CompilerWarnings "Compiler warnings" ON) +option(QtDeprecatedWarnings "Qt deprecated warnings" ON) option(UseLibCpp "Use libc++ over stdlibc++ (requires clang)" OFF) option(CLikeConfig "Use a C-like style for the config" ON) @@ -20,7 +22,19 @@ set(CMAKE_AUTORCC ON) # Global C++ settings set(CMAKE_CXX_STANDARD 17) -add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050900) + +if(CompilerWarnings) + if(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + endif() + if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + endif() +endif(CompilerWarnings) + +if(QtDeprecatedWarnings) + add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050900) +endif(QtDeprecatedWarnings) # link to libc++ if (UseLibCpp) |