Build with -Wmissing-declarations (#71)

This flag is used to find global functions defined without a previous
declaration. Usually it spots accidental globals, but in this case it
was just missing headers.
This commit is contained in:
Robin Lindén 2021-02-11 00:45:42 +01:00 committed by GitHub
parent 0a9a72cbaa
commit 73a3c24394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -142,6 +142,7 @@ foreach(lib screen dom component)
target_compile_options(${lib} PRIVATE "-Wextra") target_compile_options(${lib} PRIVATE "-Wextra")
target_compile_options(${lib} PRIVATE "-pedantic") target_compile_options(${lib} PRIVATE "-pedantic")
target_compile_options(${lib} PRIVATE "-Werror") target_compile_options(${lib} PRIVATE "-Werror")
target_compile_options(${lib} PRIVATE "-Wmissing-declarations")
target_compile_options(${lib} PRIVATE "-Wno-sign-compare") target_compile_options(${lib} PRIVATE "-Wno-sign-compare")
endif() endif()

View File

@ -1,3 +1,4 @@
#include "ftxui/dom/elements.hpp"
#include "ftxui/dom/node.hpp" #include "ftxui/dom/node.hpp"
namespace ftxui { namespace ftxui {

View File

@ -1,4 +1,5 @@
#include <algorithm> #include <algorithm>
#include "ftxui/dom/elements.hpp"
#include "ftxui/dom/node.hpp" #include "ftxui/dom/node.hpp"
#include "ftxui/screen/string.hpp" #include "ftxui/screen/string.hpp"