From af833ff042339ad6da3d5da0a0343f150b4c1998 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Tue, 22 Oct 2019 20:25:35 +0300 Subject: [PATCH 1/8] Include CheckSymbolExists CMake module --- nominatim/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/nominatim/CMakeLists.txt b/nominatim/CMakeLists.txt index b391a342..d862b2b3 100644 --- a/nominatim/CMakeLists.txt +++ b/nominatim/CMakeLists.txt @@ -1,4 +1,5 @@ add_executable(nominatim export.c geometry.cpp import.c index.c input.c nominatim.c postgresql.c sprompt.c) +include(CheckSymbolExists) CHECK_SYMBOL_EXISTS(bswap_32 "byteswap.h" HAVE_BYTESWAP) CHECK_SYMBOL_EXISTS(bswap32 "sys/endian.h" HAVE_SYS_ENDIAN) From 4aca3700b24e42d741514b3da7417c5f89119b33 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Tue, 22 Oct 2019 21:15:38 +0300 Subject: [PATCH 2/8] Move nominatim lib deps to its dir --- CMakeLists.txt | 7 ------- nominatim/CMakeLists.txt | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 163b0494..1ad7ea2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,13 +72,6 @@ if (NOT ONLY_DOCS) message(FATAL_ERROR "Postgresql server package not found.") endif() - find_package(ZLIB REQUIRED) - - find_package(BZip2 REQUIRED) - - find_package(LibXml2 REQUIRED) - include_directories(${LIBXML2_INCLUDE_DIR}) - # Setting PHP binary variable as to command line (prevailing) or auto detect if (NOT PHP_BIN) find_program (PHP_BIN php) diff --git a/nominatim/CMakeLists.txt b/nominatim/CMakeLists.txt index d862b2b3..d8daa4b8 100644 --- a/nominatim/CMakeLists.txt +++ b/nominatim/CMakeLists.txt @@ -4,6 +4,12 @@ include(CheckSymbolExists) CHECK_SYMBOL_EXISTS(bswap_32 "byteswap.h" HAVE_BYTESWAP) CHECK_SYMBOL_EXISTS(bswap32 "sys/endian.h" HAVE_SYS_ENDIAN) +find_package(ZLIB REQUIRED) +find_package(BZip2 REQUIRED) +find_package(LibXml2 REQUIRED) + +include_directories(${LIBXML2_INCLUDE_DIR}) + target_compile_definitions(nominatim PRIVATE HAVE_BYTESWAP=$ PRIVATE HAVE_SYS_ENDIAN=$ From 544db4302625c1969d21195eb4653402405dc3f5 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Tue, 22 Oct 2019 21:21:49 +0300 Subject: [PATCH 3/8] Separate more dependencies --- nominatim/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nominatim/CMakeLists.txt b/nominatim/CMakeLists.txt index d8daa4b8..d6e70127 100644 --- a/nominatim/CMakeLists.txt +++ b/nominatim/CMakeLists.txt @@ -8,6 +8,13 @@ find_package(ZLIB REQUIRED) find_package(BZip2 REQUIRED) find_package(LibXml2 REQUIRED) +unset(PostgreSQL_TYPE_INCLUDE_DIR CACHE) +set(PostgreSQL_TYPE_INCLUDE_DIR "/usr/include/") +find_package(PostgreSQL REQUIRED) +include_directories(${PostgreSQL_INCLUDE_DIRS}) +link_directories(${PostgreSQL_LIBRARY_DIRS}) + + include_directories(${LIBXML2_INCLUDE_DIR}) target_compile_definitions(nominatim From 314de3c3c0ed9fc98e0ab35d6e6f601945819bdb Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Tue, 22 Oct 2019 21:26:21 +0300 Subject: [PATCH 4/8] Add options to compile only PG module/frontend It makes it easier to install Nominatim server and PostgresSQL on separate servers or use separate docker images for them. --- CMakeLists.txt | 104 +++++++++++++++++---------------------- module/CMakeLists.txt | 9 ++++ nominatim/CMakeLists.txt | 2 +- 3 files changed, 56 insertions(+), 59 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ad7ea2a..3c1668f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,11 @@ add_definitions(-DNOMINATIM_VERSION="${NOMINATIM_VERSION}") set(BUILD_TESTS off CACHE BOOL "Build test suite" FORCE) set(WITH_LUA off CACHE BOOL "Build with lua support" FORCE) -set(ONLY_DOCS off CACHE BOOL "Build documentation only") +set(BUILD_DOCS on CACHE BOOL "Build documentation") +set(BUILD_SERVER on CACHE BOOL "Build API server") +set(BUILD_MODULE on CACHE BOOL "Build module") -if (NOT ONLY_DOCS) +if (BUILD_SERVER) if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt") message(FATAL_ERROR "The osm2pgsql directory is empty.\ Did you forget to check out Nominatim recursively?\ @@ -45,14 +47,6 @@ if (NOT ONLY_DOCS) endif() add_subdirectory(osm2pgsql) - find_package(Threads REQUIRED) - - unset(PostgreSQL_TYPE_INCLUDE_DIR CACHE) - set(PostgreSQL_TYPE_INCLUDE_DIR "/usr/include/") - find_package(PostgreSQL REQUIRED) - include_directories(${PostgreSQL_INCLUDE_DIRS}) - link_directories(${PostgreSQL_LIBRARY_DIRS}) - find_program(PYOSMIUM pyosmium-get-changes) if (NOT EXISTS "${PYOSMIUM}") set(PYOSMIUM_PATH "") @@ -63,15 +57,6 @@ if (NOT ONLY_DOCS) endif() - find_program(PG_CONFIG pg_config) - execute_process(COMMAND ${PG_CONFIG} --pgxs - OUTPUT_VARIABLE PGXS - OUTPUT_STRIP_TRAILING_WHITESPACE) - - if (NOT EXISTS "${PGXS}") - message(FATAL_ERROR "Postgresql server package not found.") - endif() - # Setting PHP binary variable as to command line (prevailing) or auto detect if (NOT PHP_BIN) find_program (PHP_BIN php) @@ -89,49 +74,50 @@ endif() # #----------------------------------------------------------------------------- -set(WEBSITESCRIPTS - website/deletable.php - website/details.php - website/hierarchy.php - website/lookup.php - website/polygons.php - website/reverse.php - website/search.php - website/status.php -) - -set(CUSTOMSCRIPTS - utils/country_languages.php - utils/importWikipedia.php - utils/export.php - utils/query.php - utils/setup.php - utils/specialphrases.php - utils/update.php - utils/warm.php +if (BUILD_SERVER) + set(WEBSITESCRIPTS + website/deletable.php + website/details.php + website/hierarchy.php + website/lookup.php + website/polygons.php + website/reverse.php + website/search.php + website/status.php ) -foreach (script_source ${CUSTOMSCRIPTS}) - configure_file(${PROJECT_SOURCE_DIR}/cmake/script.tmpl - ${PROJECT_BINARY_DIR}/${script_source}) -endforeach() + set(CUSTOMSCRIPTS + utils/country_languages.php + utils/importWikipedia.php + utils/export.php + utils/query.php + utils/setup.php + utils/specialphrases.php + utils/update.php + utils/warm.php + ) -foreach (script_source ${WEBSITESCRIPTS}) - configure_file(${PROJECT_SOURCE_DIR}/cmake/website.tmpl - ${PROJECT_BINARY_DIR}/${script_source}) -endforeach() + foreach (script_source ${CUSTOMSCRIPTS}) + configure_file(${PROJECT_SOURCE_DIR}/cmake/script.tmpl + ${PROJECT_BINARY_DIR}/${script_source}) + endforeach() -configure_file(${PROJECT_SOURCE_DIR}/settings/defaults.php - ${PROJECT_BINARY_DIR}/settings/settings.php) + foreach (script_source ${WEBSITESCRIPTS}) + configure_file(${PROJECT_SOURCE_DIR}/cmake/website.tmpl + ${PROJECT_BINARY_DIR}/${script_source}) + endforeach() -set(WEBPATHS css images js) + configure_file(${PROJECT_SOURCE_DIR}/settings/defaults.php + ${PROJECT_BINARY_DIR}/settings/settings.php) -foreach (wp ${WEBPATHS}) - execute_process( - COMMAND ln -sf ${PROJECT_SOURCE_DIR}/website/${wp} ${PROJECT_BINARY_DIR}/website/ - ) -endforeach() + set(WEBPATHS css images js) + foreach (wp ${WEBPATHS}) + execute_process( + COMMAND ln -sf ${PROJECT_SOURCE_DIR}/website/${wp} ${PROJECT_BINARY_DIR}/website/ + ) + endforeach() +endif() #----------------------------------------------------------------------------- # @@ -139,7 +125,7 @@ endforeach() # #----------------------------------------------------------------------------- -if (NOT ONLY_DOCS) +if (BUILD_TESTS) include(CTest) set(TEST_BDD db osm2pgsql api) @@ -159,10 +145,12 @@ endif() #----------------------------------------------------------------------------- -if (NOT ONLY_DOCS) +if (BUILD_MODULE) add_subdirectory(module) add_subdirectory(nominatim) endif() -add_subdirectory(docs) +if (BUILD_DOCS) + add_subdirectory(docs) +endif() #----------------------------------------------------------------------------- diff --git a/module/CMakeLists.txt b/module/CMakeLists.txt index 318e5650..03beacb2 100644 --- a/module/CMakeLists.txt +++ b/module/CMakeLists.txt @@ -1,4 +1,13 @@ # just use the pgxs makefile +find_program(PG_CONFIG pg_config) +execute_process(COMMAND ${PG_CONFIG} --pgxs + OUTPUT_VARIABLE PGXS + OUTPUT_STRIP_TRAILING_WHITESPACE) + +if (NOT EXISTS "${PGXS}") +message(FATAL_ERROR "Postgresql server package not found.") +endif() + ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dummy COMMAND PGXS=${PGXS} PG_CONFIG=${PG_CONFIG} MODSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} $(MAKE) -f ${CMAKE_CURRENT_SOURCE_DIR}/Makefile COMMENT "Running external makefile ${PGXS}" diff --git a/nominatim/CMakeLists.txt b/nominatim/CMakeLists.txt index d6e70127..b2953044 100644 --- a/nominatim/CMakeLists.txt +++ b/nominatim/CMakeLists.txt @@ -7,6 +7,7 @@ CHECK_SYMBOL_EXISTS(bswap32 "sys/endian.h" HAVE_SYS_ENDIAN) find_package(ZLIB REQUIRED) find_package(BZip2 REQUIRED) find_package(LibXml2 REQUIRED) +find_package(Threads REQUIRED) unset(PostgreSQL_TYPE_INCLUDE_DIR CACHE) set(PostgreSQL_TYPE_INCLUDE_DIR "/usr/include/") @@ -14,7 +15,6 @@ find_package(PostgreSQL REQUIRED) include_directories(${PostgreSQL_INCLUDE_DIRS}) link_directories(${PostgreSQL_LIBRARY_DIRS}) - include_directories(${LIBXML2_INCLUDE_DIR}) target_compile_definitions(nominatim From 92d1f5122b52582b6ad212727ac55de8588654a3 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Wed, 23 Oct 2019 06:27:34 +0300 Subject: [PATCH 5/8] Separate Nominatim build --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c1668f4..3e55f628 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,8 @@ set(BUILD_TESTS off CACHE BOOL "Build test suite" FORCE) set(WITH_LUA off CACHE BOOL "Build with lua support" FORCE) set(BUILD_DOCS on CACHE BOOL "Build documentation") set(BUILD_SERVER on CACHE BOOL "Build API server") -set(BUILD_MODULE on CACHE BOOL "Build module") +set(BUILD_MODULE on CACHE BOOL "Build PostgreSQL module") +set(BUILD_NOMINATIM on CACHE BOOL "Build Nominatim executable") if (BUILD_SERVER) if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt") @@ -147,6 +148,8 @@ endif() if (BUILD_MODULE) add_subdirectory(module) +endif() +if (BUILD_NOMINATIM) add_subdirectory(nominatim) endif() if (BUILD_DOCS) From 72c0898409d5c496538287cea3c71edc3c170e62 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Wed, 23 Oct 2019 07:04:04 +0300 Subject: [PATCH 6/8] Add optional compilation of osm2pgsl --- CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e55f628..66886f63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,14 +39,17 @@ set(BUILD_DOCS on CACHE BOOL "Build documentation") set(BUILD_SERVER on CACHE BOOL "Build API server") set(BUILD_MODULE on CACHE BOOL "Build PostgreSQL module") set(BUILD_NOMINATIM on CACHE BOOL "Build Nominatim executable") +set(BUILD_OSM2PGSQL on CACHE BOOL "Build osm2pgsql") if (BUILD_SERVER) - if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt") - message(FATAL_ERROR "The osm2pgsql directory is empty.\ - Did you forget to check out Nominatim recursively?\ - \nTry updating submodules with: git submodule update --init") + if (BUILD_OSM2PGSQL) + if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt") + message(FATAL_ERROR "The osm2pgsql directory is empty.\ + Did you forget to check out Nominatim recursively?\ + \nTry updating submodules with: git submodule update --init") + endif() + add_subdirectory(osm2pgsql) endif() - add_subdirectory(osm2pgsql) find_program(PYOSMIUM pyosmium-get-changes) if (NOT EXISTS "${PYOSMIUM}") From 47fb2c9126c0731deb00ddeb22049302ea55bf6e Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 26 Apr 2020 14:17:21 +0200 Subject: [PATCH 7/8] cmake: restructure splitting between modules Make a clear distinction between parts used for the importer and parts used for the API. --- CMakeLists.txt | 136 ++++++++++++++++++++++++++------------------ docs/CMakeLists.txt | 36 +++++++++--- 2 files changed, 109 insertions(+), 63 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 31a572d6..ae611885 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,29 +28,39 @@ add_definitions(-DNOMINATIM_VERSION="${NOMINATIM_VERSION}") #----------------------------------------------------------------------------- -# -# Find external dependencies -# +# Configuration #----------------------------------------------------------------------------- -set(BUILD_TESTS off CACHE BOOL "Build test suite" FORCE) -set(WITH_LUA off CACHE BOOL "Build with lua support" FORCE) -set(BUILD_DOCS on CACHE BOOL "Build documentation") -set(BUILD_SERVER on CACHE BOOL "Build API server") +set(BUILD_IMPORTER on CACHE BOOL "Build everything for importing/updating the database") +set(BUILD_API on CACHE BOOL "Build everything for the API server") set(BUILD_MODULE on CACHE BOOL "Build PostgreSQL module") -set(BUILD_NOMINATIM on CACHE BOOL "Build Nominatim executable") -set(BUILD_OSM2PGSQL on CACHE BOOL "Build osm2pgsql") +set(BUILD_TESTS on CACHE BOOL "Build test suite") +set(BUILD_DOCS on CACHE BOOL "Build documentation") +set(BUILD_OSM2PGSQL on CACHE BOOL "Build osm2pgsql (expert only)") -if (BUILD_SERVER) - if (BUILD_OSM2PGSQL) - if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt") - message(FATAL_ERROR "The osm2pgsql directory is empty.\ - Did you forget to check out Nominatim recursively?\ - \nTry updating submodules with: git submodule update --init") - endif() - add_subdirectory(osm2pgsql) +#----------------------------------------------------------------------------- +# osm2pgsql (imports/updates only) +#----------------------------------------------------------------------------- + +if (BUILD_IMPORTER AND BUILD_OSM2PGSQL) + if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt") + message(FATAL_ERROR "The osm2pgsql directory is empty.\ + Did you forget to check out Nominatim recursively?\ + \nTry updating submodules with: git submodule update --init") endif() + set(BUILD_TESTS_SAVED "${BUILD_TESTS}") + set(BUILD_TESTS off) + set(WITH_LUA off CACHE BOOL "") + add_subdirectory(osm2pgsql) + set(BUILD_TESTS ${BUILD_TESTS_SAVED}) +endif() + +#----------------------------------------------------------------------------- +# python and pyosmium (imports/updates only) +#----------------------------------------------------------------------------- + +if (BUILD_IMPORTER) find_package(PythonInterp 3) find_program(PYOSMIUM pyosmium-get-changes) @@ -61,37 +71,28 @@ if (BUILD_SERVER) set(PYOSMIUM_PATH "${PYOSMIUM}") message(STATUS "Using pyosmium-get-changes at ${PYOSMIUM_PATH}") endif() - - - # Setting PHP binary variable as to command line (prevailing) or auto detect - if (NOT PHP_BIN) - find_program (PHP_BIN php) - endif() - # sanity check if PHP binary exists - if (NOT EXISTS ${PHP_BIN}) - message(FATAL_ERROR "PHP binary not found. Install php or provide location with -DPHP_BIN=/path/php ") - endif() - message (STATUS "Using PHP binary " ${PHP_BIN}) endif() #----------------------------------------------------------------------------- -# -# Setup settings and paths -# +# PHP #----------------------------------------------------------------------------- -if (BUILD_SERVER) - set(WEBSITESCRIPTS - website/deletable.php - website/details.php - website/hierarchy.php - website/lookup.php - website/polygons.php - website/reverse.php - website/search.php - website/status.php - ) +# Setting PHP binary variable as to command line (prevailing) or auto detect +if (NOT PHP_BIN) + find_program (PHP_BIN php) +endif() +# sanity check if PHP binary exists +if (NOT EXISTS ${PHP_BIN}) + message(FATAL_ERROR "PHP binary not found. Install php or provide location with -DPHP_BIN=/path/php ") +endif() +message (STATUS "Using PHP binary " ${PHP_BIN}) + +#----------------------------------------------------------------------------- +# import scripts and utilities (importer only) +#----------------------------------------------------------------------------- + +if (BUILD_IMPORTER) set(CUSTOMSCRIPTS utils/country_languages.php utils/importWikipedia.php @@ -107,15 +108,29 @@ if (BUILD_SERVER) configure_file(${PROJECT_SOURCE_DIR}/cmake/script.tmpl ${PROJECT_BINARY_DIR}/${script_source}) endforeach() +endif() + +#----------------------------------------------------------------------------- +# webserver scripts (API only) +#----------------------------------------------------------------------------- + +if (BUILD_API) + set(WEBSITESCRIPTS + website/deletable.php + website/details.php + website/hierarchy.php + website/lookup.php + website/polygons.php + website/reverse.php + website/search.php + website/status.php + ) foreach (script_source ${WEBSITESCRIPTS}) configure_file(${PROJECT_SOURCE_DIR}/cmake/website.tmpl ${PROJECT_BINARY_DIR}/${script_source}) endforeach() - configure_file(${PROJECT_SOURCE_DIR}/settings/defaults.php - ${PROJECT_BINARY_DIR}/settings/settings.php) - set(WEBPATHS css images js) foreach (wp ${WEBPATHS}) @@ -126,9 +141,14 @@ if (BUILD_SERVER) endif() #----------------------------------------------------------------------------- -# +# default settings +#----------------------------------------------------------------------------- + +configure_file(${PROJECT_SOURCE_DIR}/settings/defaults.php + ${PROJECT_BINARY_DIR}/settings/settings.php) + +#----------------------------------------------------------------------------- # Tests -# #----------------------------------------------------------------------------- if (BUILD_TESTS) @@ -138,27 +158,33 @@ if (BUILD_TESTS) foreach (test ${TEST_BDD}) add_test(NAME bdd_${test} - COMMAND lettuce features/${test} - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests) + COMMAND behave ${test} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test/bdd) set_tests_properties(bdd_${test} PROPERTIES ENVIRONMENT "NOMINATIM_DIR=${PROJECT_BINARY_DIR}") endforeach() add_test(NAME php COMMAND phpunit ./ - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests-php) + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test/php) + + add_test(NAME phpcs + COMMAND phpcs --report-width=120 --colors lib website utils + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) endif() +#----------------------------------------------------------------------------- +# Postgres module #----------------------------------------------------------------------------- if (BUILD_MODULE) add_subdirectory(module) endif() -if (BUILD_NOMINATIM) - add_subdirectory(nominatim) -endif() + +#----------------------------------------------------------------------------- +# Documentation +#----------------------------------------------------------------------------- + if (BUILD_DOCS) add_subdirectory(docs) endif() - -#----------------------------------------------------------------------------- diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index bdba63db..2735733a 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -7,19 +7,39 @@ configure_file(mkdocs.yml ../mkdocs.yml) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/appendix) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data-sources) -ADD_CUSTOM_TARGET(doc - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/admin ${CMAKE_CURRENT_BINARY_DIR}/admin - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/develop ${CMAKE_CURRENT_BINARY_DIR}/develop - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/api ${CMAKE_CURRENT_BINARY_DIR}/api - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/index.md ${CMAKE_CURRENT_BINARY_DIR}/index.md - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/extra.css ${CMAKE_CURRENT_BINARY_DIR}/extra.css - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/styles.css ${CMAKE_CURRENT_BINARY_DIR}/styles.css - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/data-sources/overview.md ${CMAKE_CURRENT_BINARY_DIR}/data-sources/overview.md +set (DOC_SOURCES + admin + develop + api + index.md + extra.css + styles.css + data-sources/overview.md + ) + +foreach (src ${DOC_SOURCES}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${CMAKE_CURRENT_BINARY_DIR}/${src} + ) +endforeach() + +execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_SOURCE_DIR}/data-sources/us-tiger/README.md ${CMAKE_CURRENT_BINARY_DIR}/data-sources/US-Tiger.md +) +execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_SOURCE_DIR}/data-sources/gb-postcodes/README.md ${CMAKE_CURRENT_BINARY_DIR}/data-sources/GB-Postcodes.md +) +execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_SOURCE_DIR}/data-sources/country-grid/README.md ${CMAKE_CURRENT_BINARY_DIR}/data-sources/Country-Grid.md +) +execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_SOURCE_DIR}/data-sources/country-grid/mexico.quad.png ${CMAKE_CURRENT_BINARY_DIR}/data-sources/mexico.quad.png +) +execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_SOURCE_DIR}/data-sources/wikipedia-wikidata/README.md ${CMAKE_CURRENT_BINARY_DIR}/data-sources/Wikipedia-Wikidata.md +) + +ADD_CUSTOM_TARGET(doc COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bash2md.sh ${PROJECT_SOURCE_DIR}/vagrant/Install-on-Centos-7.sh ${CMAKE_CURRENT_BINARY_DIR}/appendix/Install-on-Centos-7.md COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bash2md.sh ${PROJECT_SOURCE_DIR}/vagrant/Install-on-Ubuntu-16.sh ${CMAKE_CURRENT_BINARY_DIR}/appendix/Install-on-Ubuntu-16.md COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bash2md.sh ${PROJECT_SOURCE_DIR}/vagrant/Install-on-Ubuntu-18.sh ${CMAKE_CURRENT_BINARY_DIR}/appendix/Install-on-Ubuntu-18.md From bae69f0102c8d79ed7ed442810101d0736e41343 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 26 Apr 2020 16:17:43 +0200 Subject: [PATCH 8/8] cmake: reintroduce check script --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae611885..2596c104 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,6 +94,7 @@ message (STATUS "Using PHP binary " ${PHP_BIN}) if (BUILD_IMPORTER) set(CUSTOMSCRIPTS + utils/check_import_finished.php utils/country_languages.php utils/importWikipedia.php utils/export.php