Added cmake-files for missing projects

This commit is contained in:
r.kuznetsov 2017-11-02 16:05:11 +03:00 committed by Yuri Gorshenin
parent a93db184e1
commit 53d7a87af1
12 changed files with 282 additions and 6 deletions

View file

@ -34,3 +34,5 @@ set(
add_library(opening_hours ${SRC})
omim_add_test_subdirectory(opening_hours_tests)
omim_add_test_subdirectory(opening_hours_integration_tests)
omim_add_test_subdirectory(opening_hours_supported_features_tests)

View file

@ -0,0 +1,11 @@
project(opening_hours_integration_tests)
include_directories(${PROJECT_SOURCE_DIR} ${OMIM_ROOT}/3party/opening_hours)
set(
SRC
opening_hours_integration_tests.cpp
)
add_executable(${PROJECT_NAME} ${SRC})
omim_link_libraries(${PROJECT_NAME} base opening_hours)

View file

@ -0,0 +1,11 @@
project(opening_hours_supported_features_tests)
include_directories(${PROJECT_SOURCE_DIR} ${OMIM_ROOT}/3party/opening_hours)
set(
SRC
opening_hours_supported_features_tests.cpp
)
add_executable(${PROJECT_NAME} ${SRC})
omim_link_libraries(${PROJECT_NAME} base opening_hours)

View file

@ -1,12 +1,11 @@
set(OPENING_HOURS_INCLUDE ../opening_hours)
include_directories(${PROJECT_SOURCE_DIR})
project(opening_hours_tests)
include_directories(${PROJECT_SOURCE_DIR} ${OMIM_ROOT}/3party/opening_hours)
set(
SRC
opening_hours_tests.cpp
)
add_executable(opening_hours_tests ${SRC})
omim_link_libraries(opening_hours_tests base opening_hours)
add_executable(${PROJECT_NAME} ${SRC})
omim_link_libraries(${PROJECT_NAME} base opening_hours)

View file

@ -117,3 +117,8 @@ omim_add_test_subdirectory(generator_tests)
if (NOT SKIP_GTOOL)
add_subdirectory(generator_tool)
endif()
add_subdirectory(booking_quality_check)
add_subdirectory(feature_segments_checker)
add_subdirectory(restaurants_info)
add_subdirectory(srtm_coverage_checker)

View file

@ -0,0 +1,40 @@
project(booking_quality_check)
include_directories(
${OMIM_ROOT}/3party/gflags/src
${OMIM_ROOT}/3party/jansson/src
)
set(
SRC
booking_quality_check.cpp
)
omim_add_executable(${PROJECT_NAME} ${SRC})
omim_link_libraries(
${PROJECT_NAME}
generator
search
routing
routing_common
indexer
geometry
editor
platform
coding
base
expat
gflags
icu
jansson
oauthcpp
opening_hours
protobuf
pugixml
stats_client
succinct
${LIBZ}
)
link_qt5_core(${PROJECT_NAME})

View file

@ -0,0 +1,44 @@
project(feature_segments_checker)
include_directories(
${OMIM_ROOT}/3party/gflags/src
${OMIM_ROOT}/3party/jansson/src
)
set(
SRC
feature_segments_checker.cpp
)
omim_add_executable(${PROJECT_NAME} ${SRC})
omim_link_libraries(
${PROJECT_NAME}
generator
map
editor
routing
traffic
routing_common
storage
ugc
indexer
platform
geometry
coding
base
expat
gflags
icu
jansson
minizip
oauthcpp
opening_hours
protobuf
pugixml
stats_client
succinct
${LIBZ}
)
link_qt5_core(${PROJECT_NAME})

View file

@ -0,0 +1,41 @@
project(restaurants_info)
include_directories(
${OMIM_ROOT}/3party/gflags/src
${OMIM_ROOT}/3party/jansson/src
)
set(
SRC
restaurants_info.cpp
)
omim_add_executable(${PROJECT_NAME} ${SRC})
omim_link_libraries(
${PROJECT_NAME}
generator
search
routing
routing_common
indexer
geometry
editor
platform
coding
base
minizip
jansson
pugixml
stats_client
opening_hours
succinct
gflags
oauthcpp
expat
protobuf
icu
${LIBZ}
)
link_qt5_core(${PROJECT_NAME})

View file

@ -0,0 +1,47 @@
project(srtm_coverage_checker)
include_directories(
${OMIM_ROOT}/3party/gflags/src
${OMIM_ROOT}/3party/jansson/src
)
set(
SRC
srtm_coverage_checker.cpp
)
omim_add_executable(${PROJECT_NAME} ${SRC})
omim_link_libraries(
${PROJECT_NAME}
generator
map
editor
routing
routing_common
search
storage
ugc
traffic
indexer
platform
editor
geometry
coding
base
agg
gflags
icu
jansson
minizip
oauthcpp
opening_hours
osrm
protobuf
pugixml
stats_client
succinct
${LIBZ}
)
link_qt5_core(${PROJECT_NAME})

View file

@ -20,6 +20,37 @@
DEFINE_string(srtm_path, "", "Path to directory with SRTM files");
DEFINE_string(mwm_path, "", "Path to mwm files (writable dir)");
// TODO: remove when routing_test_tools becomes a library.
namespace
{
void ChangeMaxNumberOfOpenFiles(size_t n)
{
struct rlimit rlp;
getrlimit(RLIMIT_NOFILE, &rlp);
rlp.rlim_cur = n;
setrlimit(RLIMIT_NOFILE, &rlp);
}
shared_ptr<model::FeaturesFetcher> CreateFeaturesFetcher(vector<LocalCountryFile> const & localFiles)
{
size_t const maxOpenFileNumber = 1024;
ChangeMaxNumberOfOpenFiles(maxOpenFileNumber);
shared_ptr<model::FeaturesFetcher> featuresFetcher(new model::FeaturesFetcher);
featuresFetcher->InitClassificator();
for (LocalCountryFile const & localFile : localFiles)
{
auto p = featuresFetcher->RegisterMap(localFile);
if (p.second != MwmSet::RegResult::Success)
{
ASSERT(false, ("Can't register", localFile));
return nullptr;
}
}
return featuresFetcher;
}
} // namespace
int main(int argc, char * argv[])
{
google::SetUsageMessage("SRTM coverage checker.");
@ -42,7 +73,7 @@ int main(int argc, char * argv[])
platform::FindAllLocalMapsAndCleanup(numeric_limits<int64_t>::max() /* latestVersion */,
localFiles);
auto fetcher = integration::CreateFeaturesFetcher(localFiles);
auto fetcher = CreateFeaturesFetcher(localFiles);
generator::SrtmTileManager manager(FLAGS_srtm_path);
for (auto & file : localFiles)

View file

@ -84,3 +84,5 @@ add_library(${PROJECT_NAME} ${SRC})
omim_add_test_subdirectory(map_tests)
omim_add_test_subdirectory(mwm_tests)
omim_add_test_subdirectory(style_tests)
add_subdirectory(benchmark_tool)

View file

@ -0,0 +1,43 @@
project(benchmark_tool)
include_directories(
${OMIM_ROOT}/3party/gflags/src
${OMIM_ROOT}/3party/jansson/src
)
set(
SRC
api.cpp
api.hpp
features_loading.cpp
main.cpp
)
omim_add_executable(${PROJECT_NAME} ${SRC})
omim_link_libraries(
${PROJECT_NAME}
map
ugc
indexer
platform
editor
geometry
coding
base
opening_hours
gflags
jansson
protobuf
succinct
pugixml
oauthcpp
gflags
stats_client
icu
agg
${LIBZ}
)
link_qt5_core(${PROJECT_NAME})
link_qt5_network(${PROJECT_NAME})