Skip to content

Commit

Permalink
[3party] Treat gflags as a system header
Browse files Browse the repository at this point in the history
* For compiler diagnostics
* For dependency management

Signed-off-by: Ferenc Géczi <[email protected]>
  • Loading branch information
Ferenc- authored and biodranik committed Mar 11, 2023
1 parent e88c75a commit 4ad4a1e
Show file tree
Hide file tree
Showing 25 changed files with 33 additions and 32 deletions.
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,15 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
add_subdirectory(3party/jansson/jansson/)
target_include_directories(jansson INTERFACE "${PROJECT_BINARY_DIR}/3party/jansson/jansson/include")

# Add gflags library.
add_subdirectory(3party/gflags)
target_compile_options(gflags_nothreads_static PRIVATE $<$<CXX_COMPILER_ID:GNU>:-Wno-subobject-linkage>)
# Not needed for the usual build process, but it fixes QtCreator editor,
# that doesn't see gflags/gflags.h in binary dir (gflags has tricky cmake configuration).
if (PLATFORM_DESKTOP)
include_directories("${PROJECT_BINARY_DIR}/3party/gflags/include")
endif()

# Add pugixml library.
add_subdirectory(3party/pugixml)

Expand All @@ -325,14 +334,6 @@ endif()
add_subdirectory(3party/agg)
add_subdirectory(3party/bsdiff-courgette)

add_subdirectory(3party/gflags)
target_compile_options(gflags_nothreads_static PRIVATE $<$<CXX_COMPILER_ID:GNU>:-Wno-subobject-linkage>)
# Not needed for the usual build process, but it fixes QtCreator editor,
# that doesn't see gflags/gflags.h in binary dir (gflags has tricky cmake configuration).
if (PLATFORM_DESKTOP)
include_directories("${PROJECT_BINARY_DIR}/3party/gflags/include")
endif()

if (LINUX_DETECTED)
find_package(ICU COMPONENTS uc i18n data REQUIRED)
find_package(Freetype REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion generator/complex_generator/complex_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#include "defines.hpp"

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(node_storage, "map",
"Type of storage for intermediate points representation. Available: raw, map, mem.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <set>
#include <string>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(srtm_dir_path, "", "Path to directory with SRTM files");
DEFINE_string(mwm_file_path, "", "Path to an mwm file.");
Expand Down
2 changes: 1 addition & 1 deletion generator/generator_tool/generator_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#include <memory>
#include <string>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

namespace
{
Expand Down
2 changes: 1 addition & 1 deletion generator/srtm_coverage_checker/srtm_coverage_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <limits>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(srtm_path, "", "Path to directory with SRTM files");
DEFINE_string(mwm_path, "", "Path to mwm files (writable dir)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <unordered_map>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>


DEFINE_string(path_resources, "", "OMaps resources directory");
Expand Down
2 changes: 1 addition & 1 deletion map/benchmark_tool/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <iostream>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

using namespace std;

Expand Down
2 changes: 1 addition & 1 deletion map/extrapolation_benchmark/extrapolation_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <utility>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>
#include "gflags/gflags_declare.h"

// This tool is written to estimate quality of location extrapolation. To launch the benchmark
Expand Down
2 changes: 1 addition & 1 deletion mapshot/mapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <iostream>
#include <string>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

#pragma mark Define options
//----------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "openlr/openlr_match_quality/openlr_assessment_tool/mainwindow.hpp"

#include "gflags/gflags.h"
#include <gflags/gflags.h>

#include <cstdio>

Expand Down
2 changes: 1 addition & 1 deletion openlr/openlr_stat/openlr_stat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <unordered_map>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>
#include <pugixml.hpp>

DEFINE_string(input, "", "Path to OpenLR file.");
Expand Down
2 changes: 1 addition & 1 deletion poly_borders/poly_borders_tool/poly_borders_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <exception>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(borders_path, "", "Path to directory with *.poly files.");
DEFINE_string(output_path, "", "Path to target directory where the output *.poly files will be placed.");
Expand Down
2 changes: 1 addition & 1 deletion qt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <cstdlib>
#include <sstream>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

#include <QtCore/QDir>
#include <QtGui/QScreen>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <utility>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_uint64(threads, 0,
"The number of threads. std::thread::hardware_concurrency() is used by default.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <map>
#include <string>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

namespace routing_consistency_tests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <utility>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(mapsme_old_results, "", "Path to directory with previous mapsme router results.");
DEFINE_string(mapsme_results, "", "Path to directory with mapsme router results.");
Expand Down
2 changes: 1 addition & 1 deletion search/search_quality/assessment_tool/assessment_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <QtGui/QScreen>
#include <QtWidgets/QApplication>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(resources_path, "", "Path to resources directory");
DEFINE_string(data_path, "", "Path to data directory");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <string>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

using namespace search::search_quality;
using namespace search::tests_support;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <unordered_map>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

using namespace search::search_quality;
using namespace search;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <string>
#include <vector>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

using namespace search::search_quality;
using namespace search::tests_support;
Expand Down
2 changes: 1 addition & 1 deletion skin_generator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <QtXml/QXmlSimpleReader>
#include <QtXml/QXmlInputSource>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(fontFileName, "../../data/01_dejavusans.ttf", "path to TrueType font file");
DEFINE_string(symbolsFile, "../../data/results.unicode", "file with 2bytes symbols for which the skin should be generated");
Expand Down
2 changes: 1 addition & 1 deletion topography_generator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "base/assert.hpp"
#include "base/logging.hpp"

#include "gflags/gflags.h"
#include <gflags/gflags.h>

#include <cstdlib>

Expand Down
2 changes: 1 addition & 1 deletion track_analyzing/track_analyzer/track_analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "base/checked_cast.hpp"

#include "gflags/gflags.h"
#include <gflags/gflags.h>

#include <string>

Expand Down
2 changes: 1 addition & 1 deletion track_generator/track_generator_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <string>

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(inputDir, "", "Path to kmls.");

Expand Down
2 changes: 1 addition & 1 deletion transit/world_feed/gtfs_converter/gtfs_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "base/logging.hpp"
#include "base/timer.hpp"

#include "gflags/gflags.h"
#include <gflags/gflags.h>

DEFINE_string(
path_mapping, "",
Expand Down

0 comments on commit 4ad4a1e

Please sign in to comment.