forked from hans/Nominatim
add cmake mode for building documentation only
This commit is contained in:
@@ -35,7 +35,9 @@ add_definitions(-DNOMINATIM_VERSION="${NOMINATIM_VERSION}")
|
|||||||
|
|
||||||
set(BUILD_TESTS off CACHE BOOL "Build test suite" FORCE)
|
set(BUILD_TESTS off CACHE BOOL "Build test suite" FORCE)
|
||||||
set(WITH_LUA off CACHE BOOL "Build with lua support" FORCE)
|
set(WITH_LUA off CACHE BOOL "Build with lua support" FORCE)
|
||||||
|
set(ONLY_DOCS off CACHE BOOL "Build documentation only")
|
||||||
|
|
||||||
|
if (NOT ONLY_DOCS)
|
||||||
if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt")
|
if (NOT EXISTS "${CMAKE_SOURCE_DIR}/osm2pgsql/CMakeLists.txt")
|
||||||
message(FATAL_ERROR "The osm2pgsql directory is empty.\
|
message(FATAL_ERROR "The osm2pgsql directory is empty.\
|
||||||
Did you forget to check out Nominatim recursively?\
|
Did you forget to check out Nominatim recursively?\
|
||||||
@@ -86,6 +88,7 @@ if (NOT EXISTS ${PHP_BIN})
|
|||||||
message(FATAL_ERROR "PHP binary not found. Install php or provide location with -DPHP_BIN=/path/php ")
|
message(FATAL_ERROR "PHP binary not found. Install php or provide location with -DPHP_BIN=/path/php ")
|
||||||
endif()
|
endif()
|
||||||
message (STATUS "Using PHP binary " ${PHP_BIN})
|
message (STATUS "Using PHP binary " ${PHP_BIN})
|
||||||
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@@ -143,6 +146,7 @@ endforeach()
|
|||||||
#
|
#
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if (NOT ONLY_DOCS)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
set(TEST_BDD db osm2pgsql api)
|
set(TEST_BDD db osm2pgsql api)
|
||||||
@@ -158,11 +162,14 @@ endforeach()
|
|||||||
add_test(NAME php
|
add_test(NAME php
|
||||||
COMMAND phpunit ./
|
COMMAND phpunit ./
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests-php)
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests-php)
|
||||||
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if (NOT ONLY_DOCS)
|
||||||
add_subdirectory(module)
|
add_subdirectory(module)
|
||||||
add_subdirectory(nominatim)
|
add_subdirectory(nominatim)
|
||||||
|
endif()
|
||||||
add_subdirectory(docs)
|
add_subdirectory(docs)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user