diff --git a/3party/3party.pro b/3party/3party.pro index 48b68deb21..0d5ca49464 100644 --- a/3party/3party.pro +++ b/3party/3party.pro @@ -2,19 +2,23 @@ TEMPLATE = subdirs +# TODO: Avoid duplication here and in omim.pro by moving +# opening_hours tests out of 3party. +!iphone*:!tizen*:!android* { + CONFIG *= desktop +} + SUBDIRS = freetype fribidi minizip jansson tomcrypt protobuf osrm expat \ succinct \ -!linux* { - SUBDIRS += opening_hours - CONFIG(desktop):!CONFIG(no-tests) { - SUBDIRS += opening_hours/opening_hours_tests \ - opening_hours/opening_hours_integration_tests \ - opening_hours/opening_hours_supported_features_tests - } +SUBDIRS += opening_hours +CONFIG(desktop):!CONFIG(no-tests) { + SUBDIRS += opening_hours/opening_hours_tests \ + opening_hours/opening_hours_integration_tests \ + opening_hours/opening_hours_supported_features_tests } -!iphone*:!tizen*:!android* { +CONFIG(desktop) { SUBDIRS += gflags \ libtess2 \ gmock diff --git a/3party/opening_hours/opening_hours.cpp b/3party/opening_hours/opening_hours.cpp index dc02707301..f78982a951 100644 --- a/3party/opening_hours/opening_hours.cpp +++ b/3party/opening_hours/opening_hours.cpp @@ -27,15 +27,14 @@ #include #include #include -#include #include #include namespace { -template +template void PrintVector(std::ostream & ost, std::vector const & v, - SeparatorExtrauctor && sepFunc) + SeparatorExtractor && sepFunc) { auto it = begin(v); if (it == end(v)) diff --git a/3party/opening_hours/opening_hours.hpp b/3party/opening_hours/opening_hours.hpp index 164953c0e0..feea6b66e0 100644 --- a/3party/opening_hours/opening_hours.hpp +++ b/3party/opening_hours/opening_hours.hpp @@ -95,12 +95,12 @@ private: TStateRep m_state{State::IsNotTime}; }; -inline constexpr Time::THours operator ""_h(uint64_t h) +inline constexpr Time::THours operator ""_h(unsigned long long int h) { return Time::THours(h); } -inline constexpr Time::TMinutes operator ""_min(uint64_t m) +inline constexpr Time::TMinutes operator ""_min(unsigned long long int m) { return Time::TMinutes(m); } @@ -198,7 +198,7 @@ inline constexpr Weekday ToWeekday(uint64_t const day) : static_cast(day)); } -inline constexpr Weekday operator ""_day(uint64_t day) +inline constexpr Weekday operator ""_day(unsigned long long int day) { return ToWeekday(day); } @@ -385,7 +385,7 @@ inline constexpr MonthDay::Month ToMonth(uint64_t const month) : static_cast(month)); } -inline constexpr MonthDay::Month operator ""_M(uint64_t month) +inline constexpr MonthDay::Month operator ""_M(unsigned long long int month) { return ToMonth(month); } diff --git a/3party/opening_hours/opening_hours_supported_features_tests/opening_hours_supported_features_tests.cpp b/3party/opening_hours/opening_hours_supported_features_tests/opening_hours_supported_features_tests.cpp index 40b1e4c471..453051c63e 100644 --- a/3party/opening_hours/opening_hours_supported_features_tests/opening_hours_supported_features_tests.cpp +++ b/3party/opening_hours/opening_hours_supported_features_tests/opening_hours_supported_features_tests.cpp @@ -21,7 +21,7 @@ LongTimeRange RangeToLong(std::string const & start, std::string const & end) auto const r1 = mktime(&when); strptime(end.data(), fmt, &when); - return { r1, mktime(&when) }; + return std::make_tuple(r1, mktime(&when)); } diff --git a/indexer/indexer_tests/indexer_tests.pro b/indexer/indexer_tests/indexer_tests.pro index 4f2d07b93d..fa2b705834 100644 --- a/indexer/indexer_tests/indexer_tests.pro +++ b/indexer/indexer_tests/indexer_tests.pro @@ -5,9 +5,7 @@ TEMPLATE = app ROOT_DIR = ../.. DEPENDENCIES = indexer platform geometry coding base protobuf tomcrypt -!linux { DEPENDENCIES += opening_hours -} include($$ROOT_DIR/common.pri) diff --git a/map/map_tests/map_tests.pro b/map/map_tests/map_tests.pro index 50d789ea1a..57c4972ff2 100644 --- a/map/map_tests/map_tests.pro +++ b/map/map_tests/map_tests.pro @@ -9,9 +9,7 @@ ROOT_DIR = ../.. DEPENDENCIES = map render gui routing search storage graphics indexer platform anim geometry coding base \ freetype fribidi expat protobuf tomcrypt jansson osrm stats_client minizip succinct -!linux* { - DEPENDENCIES *= opening_hours -} +DEPENDENCIES *= opening_hours drape { DEPENDENCIES *= drape_frontend drape diff --git a/qt/qt.pro b/qt/qt.pro index 93a0ee7e99..239ee0ca96 100644 --- a/qt/qt.pro +++ b/qt/qt.pro @@ -4,10 +4,7 @@ DEPENDENCIES = map render gui routing search storage indexer graphics platform a freetype expat fribidi tomcrypt jansson protobuf osrm stats_client minizip succinct -!linux* { - DEPENDENCIES += opening_hours \ - -} +DEPENDENCIES += opening_hours \ drape { DEPENDENCIES *= drape_frontend drape diff --git a/routing/routing_integration_tests/routing_integration_tests.pro b/routing/routing_integration_tests/routing_integration_tests.pro index e7cf3a40fe..2103518ffd 100644 --- a/routing/routing_integration_tests/routing_integration_tests.pro +++ b/routing/routing_integration_tests/routing_integration_tests.pro @@ -1,4 +1,4 @@ -# This subproject implements integration tests. +# This subproject implements integration tests. # This tests are launched on the whole world dataset. # It is recommended to place tests here in the following cases: @@ -13,10 +13,7 @@ TEMPLATE = app ROOT_DIR = ../.. DEPENDENCIES = map routing search storage indexer platform geometry coding base osrm jansson protobuf tomcrypt succinct stats_client -# this dependency is not built on Linux -!linux* { - DEPENDENCIES += opening_hours -} +DEPENDENCIES += opening_hours macx-*: LIBS *= "-framework IOKit" "-framework SystemConfiguration" diff --git a/search/search_integration_tests/search_integration_tests.pro b/search/search_integration_tests/search_integration_tests.pro index 4b1acac89f..3b23194ced 100644 --- a/search/search_integration_tests/search_integration_tests.pro +++ b/search/search_integration_tests/search_integration_tests.pro @@ -9,10 +9,8 @@ ROOT_DIR = ../.. DEPENDENCIES = generator routing search storage stats_client jansson indexer platform geometry coding base \ tess2 protobuf tomcrypt -!linux* { - DEPENDENCIES += opening_hours \ +DEPENDENCIES += opening_hours \ -} include($$ROOT_DIR/common.pri)