File tree Expand file tree Collapse file tree 10 files changed +32
-1
lines changed
Expand file tree Collapse file tree 10 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ matrix:
7878 compiler : " gcc-6-release-i686"
7979 env : >
8080 TARGET_ARCH='i686' CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'
81- CFLAGS='-m32 -msse2 -mfpmath=sse' CXXFLAGS='-m32 -msse2 -mfpmath=sse'
81+ CFLAGS='-m32 -msse2 -mfpmath=sse' CXXFLAGS='-m32 -msse2 -mfpmath=sse' CHECK_HEADERS=yes
8282
8383 - os : linux
8484 compiler : " gcc-4.9-release"
@@ -170,6 +170,7 @@ install:
170170 if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
171171 sudo ldconfig
172172 fi
173+ - if [[ ${CHECK_HEADERS} == yes ]] ; then make check-headers ; fi
173174 - popd
174175 - mkdir example/build && pushd example/build
175176 - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
Original file line number Diff line number Diff line change @@ -735,3 +735,21 @@ if (ENABLE_FUZZING)
735735
736736 add_subdirectory (fuzz )
737737endif ()
738+
739+
740+ ## add headers sanity check target that includes all headers independently
741+ set (check_headers_dir "${PROJECT_BINARY_DIR} /check-headers" )
742+ file (GLOB_RECURSE headers_to_check
743+ ${PROJECT_BINARY_DIR} /*.hpp
744+ ${PROJECT_SOURCE_DIR} /include/*.hpp )
745+ foreach (header ${headers_to_check} )
746+ get_filename_component (filename ${header} NAME_WE )
747+ set (filename "${check_headers_dir} /${filename} .cpp" )
748+ if (NOT EXISTS ${filename} )
749+ file (WRITE ${filename} "#include \" ${header} \"\n " )
750+ endif ()
751+ list (APPEND sources ${filename} )
752+ endforeach ()
753+ add_library (check-headers STATIC EXCLUDE_FROM_ALL ${sources} )
754+ set_target_properties (check-headers PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${check_headers_dir} )
755+
Original file line number Diff line number Diff line change 77#include " extractor/guidance/turn_instruction.hpp"
88#include " extractor/guidance/turn_lane_types.hpp"
99#include " extractor/profile_properties.hpp"
10+ #include " storage/shared_datatype.hpp"
1011#include " util/guidance/bearing_class.hpp"
1112#include " util/guidance/entry_class.hpp"
1213#include " util/guidance/turn_lanes.hpp"
Original file line number Diff line number Diff line change 33
44#include < cmath>
55#include < cstdint>
6+ #include < cstdlib>
67#include < string>
78
89#include " extractor/guidance/constants.hpp"
Original file line number Diff line number Diff line change 88#include < boost/assert.hpp>
99
1010#include " extractor/guidance/road_classification.hpp"
11+ #include " extractor/guidance/turn_lane_types.hpp"
1112#include " osrm/coordinate.hpp"
1213#include < utility>
1314
Original file line number Diff line number Diff line change 11#ifndef CONTAINER_HPP
22#define CONTAINER_HPP
33
4+ #include < utility>
5+
46namespace osrm
57{
68namespace util
Original file line number Diff line number Diff line change 11#ifndef DIST_TABLE_WRAPPER_H
22#define DIST_TABLE_WRAPPER_H
33
4+ #include " util/typedefs.hpp"
5+
46#include < algorithm>
57#include < boost/assert.hpp>
68#include < cstddef>
Original file line number Diff line number Diff line change 1+ #include "util/fingerprint.hpp"
12#include "util/exception.hpp"
23#include "util/exception_utils.hpp"
34
Original file line number Diff line number Diff line change 55#include < mutex>
66#include < string>
77
8+ #include " util/exception.hpp"
89#include " util/json_container.hpp"
910#include " util/json_renderer.hpp"
1011#include " util/log.hpp"
Original file line number Diff line number Diff line change 11#ifndef OSRM_GEOJSON_DEBUG_POLICY_TOOLKIT_HPP
22#define OSRM_GEOJSON_DEBUG_POLICY_TOOLKIT_HPP
33
4+ #include " extractor/external_memory_node.hpp"
5+ #include " util/coordinate.hpp"
46#include " util/json_container.hpp"
57
68#include < algorithm>
9+ #include < iterator>
710
811#include < boost/optional.hpp>
912
You can’t perform that action at this time.
0 commit comments