Skip to content
Snippets Groups Projects
Commit c533b0ba authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Add include-what-you-use

parent 437c5d5d
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ option(ASAN "Compile with address sanitizers" OFF)
option(BUILD_LIB_TESTS "Build tests" ON)
option(BUILD_LIB_EXAMPLES "Build examples" ON)
option(COVERAGE "Calculate test coverage" OFF)
option(IWYU "Check headers with include-what-you-use" OFF)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
......@@ -132,6 +133,15 @@ add_dependencies(matrix_client ${MTXCLIENT_DEPS})
target_link_libraries(matrix_client ${MTXCLIENT_LIBS})
target_include_directories(matrix_client SYSTEM PRIVATE $ENV{INCLUDE})
if (IWYU)
find_program(iwyu_path NAMES include-what-you-use iwyu)
if (iwyu_path)
set_property(TARGET matrix_client PROPERTY CXX_INCLUDE_WHAT_YOU_USE ${iwyu_path})
else()
message(WARNING "Could not find the program include-what-you-use")
endif()
endif()
if (BUILD_LIB_EXAMPLES)
add_executable(room_feed examples/room_feed.cpp)
target_link_libraries(room_feed matrix_client ${MATRIX_STRUCTS_LIBRARY})
......
#include "utils.hpp"
#include <iostream>
#include <sstream>
#include <string>
#include <utility>
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/detail/error.hpp>
#include <boost/iostreams/detail/forward.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/traits.hpp>
#include <boost/random/random_device.hpp>
#include <boost/random/uniform_int_distribution.hpp>
......
#pragma once
#include <boost/iostreams/stream.hpp>
#include <_types/_uint8_t.h>
#include <boost/iostreams/device/array.hpp>
#include <iosfwd>
#include <map>
#include <string>
namespace mtx {
namespace client {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment