Skip to content
Commits on Source (9)
# http://editorconfig.org
# top-most EditorConfig file
root = true
......@@ -5,18 +7,31 @@ root = true
[*]
indent_size = 4
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# C source and header files
[*.{c,h}]
# C++ files want tab indentation
[*.{c,h,cpp,hpp,inl}]
indent_style = space
indent_size = 4
# Makefiles want tab indentation
[Makefile]
indent_style = tab
indent_size = 8
# YML files want space indentation
[*.yml]
indent_style = space
# CMake configuration files
[CMakeLists.txt,*.cmake]
indent_style = space
indent_size = 4
# YAML and RST files
[*.{rst,yml}]
indent_size = 2
# RST files
[*.rst]
indent_size = 3
indent_style = space
......@@ -2,6 +2,7 @@
build
fix_typos
code_linter
src/version/_version.h
.DS_Store
.vagrant
......
......@@ -5,86 +5,144 @@
# Main configuration
# ------------------------------------------------------------------------------
#choose trusty
dist: trusty
dist: xenial
sudo: required
language: cpp
compiler:
- gcc
- g++
env: POSTGRESQL_VERSION=9.6 PG_USER=postgres
python:
- "3.5"
- "pypy3.5"
matrix:
include:
- os: linux
env: POSTGRESQL_VERSION=10 PG_USER=postgres DOCUMENTATION=OFF
env: POSTGRESQL_VERSION=10 DOCUMENTATION=OFF BUILD_TYPE=Debug
addons:
postgresql: 10
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-10-postgis-2.4
- postgresql-10-postgis-2.4-scripts
- postgresql-10-pgtap
- postgresql-server-dev-10
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.6 PG_USER=postgres DOCUMENTATION=OFF
env: POSTGRESQL_VERSION=9.6 DOCUMENTATION=OFF BUILD_TYPE=Debug
addons:
postgresql: 9.6
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-9.6-postgis-2.4
- postgresql-9.6-postgis-2.4-scripts
- postgresql-9.6-pgtap
- postgresql-server-dev-9.6
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.5 PG_USER=postgres DOCUMENTATION=OFF
env: POSTGRESQL_VERSION=9.5 DOCUMENTATION=OFF BUILD_TYPE=Debug
addons:
postgresql: 9.5
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-9.5-postgis-2.4
- postgresql-9.5-postgis-2.4-scripts
- postgresql-9.5-pgtap
- postgresql-server-dev-9.5
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.4 PG_USER=postgres DOCUMENTATION=OFF
env: POSTGRESQL_VERSION=9.4 DOCUMENTATION=OFF BUILD_TYPE=Debug
addons:
postgresql: 9.4
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-9.4-postgis-2.4
- postgresql-9.4-postgis-2.4-scripts
- postgresql-9.4-pgtap
- postgresql-server-dev-9.4
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.3 PG_USER=postgres DOCUMENTATION=OFF
env: POSTGRESQL_VERSION=9.6 DOCUMENTATION=OFF BUILD_TYPE=Release
addons:
postgresql: 9.6
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
packages:
- postgresql-9.6-postgis-2.4
- postgresql-9.6-postgis-2.4-scripts
- postgresql-9.6-pgtap
- postgresql-server-dev-9.6
- libboost-graph-dev
- libtap-parser-sourcehandler-pgtap-perl
- os: linux
env: POSTGRESQL_VERSION=9.6 PG_USER=postgres DOCUMENTATION=ON
# executed. So things have to be tested oe by one.
env: POSTGRESQL_VERSION=9.6 DOCUMENTATION=ON BUILD_TYPE=Release
addons:
postgresql: 9.6
apt:
sources:
- ubuntu-toolchain-r-test
# For cmake
- kubuntu-backports
- boost-latest
- ubuntu-toolchain-r-test
packages:
- cmake
- libboost-thread-dev
- postgresql-server-dev-9.6
- libboost-graph-dev
- libcgal-dev
- python-sphinx
- graphviz
- texlive
- texlive-font-utils
- texlive-latex-extra
- ghostscript
before_install:
- PGR_VERSION=$(grep -Po '(?<=project\(PGROUTING VERSION )[^;]+' CMakeLists.txt)
- echo "Building for $PGR_VERSION"
- sudo service postgresql stop
- sed -e 's/^port.*/port = 5432/' /etc/postgresql/$POSTGRESQL_VERSION/main/postgresql.conf > postgresql.conf
- sudo chown postgres postgresql.conf
- sudo mv postgresql.conf /etc/postgresql/$POSTGRESQL_VERSION/main
- sudo service postgresql start
install:
- pip install sphinx
- sudo ./tools/travis/install-doxygen.sh
- sudo ./tools/travis/install-postgres.sh $POSTGRESQL_VERSION $PG_USER
- if [ "$DOCUMENTATION" == "ON" ]; then sphinx-build --version; fi
before_script:
- psql -U postgres -c "create extension postgis"
- if [ "$DOCUMENTATION" == "OFF" ]; then psql -p 5432 -U postgres -c "CREATE EXTENSION postgis"; fi
- export PATH=/usr/lib/postgresql/$POSTGRESQL_VERSION/bin:$PATH
# initialize databases
- createdb -U $PG_USER ___pgr___test___
- createdb -U $PG_USER pgr_test__db__test
- ./tools/travis/check-extensions.sh $POSTGRESQL_VERSION ___pgr___test___
- createdb -U postgres ___pgr___test___
- createdb -U postgres pgr_test__db__test
- mkdir build
- cd build
- cmake -DPOSTGRESQL_VERSION=$POSTGRESQL_VERSION -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWITH_DOC=$DOCUMENTATION ..
script:
- ./tools/travis/pgrouting_build.sh $POSTGRESQL_VERSION $POSTGIS_VERSION
# tests as part of script so if a test fails the build fails
- if [ "$DOCUMENTATION" == "OFF" ]; then ./tools/testers/pg_prove_tests.sh $PG_USER 5432 DEBUG ; fi
- if [ "$DOCUMENTATION" == "OFF" ]; then make; sudo make install; fi
- if [ "$DOCUMENTATION" == "ON" ]; then make doc; fi
#after_script:
- ./tools/travis/pgrouting_test.sh $POSTGRESQL_VERSION $PG_USER
# tests as part of script so if a test fails the build fails
- cd ..
- if [ "$DOCUMENTATION" == "OFF" ]; then bash ./tools/testers/pg_prove_tests.sh postgres 5432 $BUILD_TYPE; fi
- if [ "$DOCUMENTATION" == "OFF" ] && [ "$BUILD_TYPE" == "Debug" ]; then bash ./ci/travis/doc-quieries_test.sh $POSTGRESQL_VERSION postgres; fi
#after_success:
# blank
This diff is collapsed.
......@@ -8,7 +8,11 @@
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
if(POLICY CMP0046)
cmake_policy(SET CMP0046 OLD)
cmake_policy(SET CMP0046 NEW)
endif()
if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
......@@ -20,91 +24,37 @@ endif()
#---------------------------------------------
# Setting kind of build
#---------------------------------------------
#
# for developing
# cmake -DMAKE_BUILD_TYPE=Develop
#----------------------
message(STATUS "CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")
if (CMAKE_BUILD_TYPE MATCHES Develop)
set(CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo
MinSizeRel."
FORCE)
set(WITH_INTERNAL_TESTS)
endif()
message(STATUS "CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(pgr/BuildType)
#---------------------------------------------
#---------------------------------------------
#---------------------------------------------
project(PGROUTING)
project(PGROUTING VERSION 3.0.0
LANGUAGES C CXX )
set(PGROUTING_VERSION_DEV "-beta")
#---------------------------------------------
#---------------------------------------------
#---------------------------------------------
include(pgr/GitInfo)
include(pgr/Version)
add_definitions(-DPGROUTING_VERSION="${PGROUTING_VERSION}${PGROUTING_VERSION_DEV}")
set(PGROUTING_LIB_NAME "pgrouting-${PGROUTING_LIB_VERSION}")
string(TIMESTAMP COMPILATION_DATE "%Y/%m/%d")
if(POLICY CMP0054)
cmake_policy(SET CMP0054 OLD)
endif()
if(MSVC)
cmake_policy(SET CMP0046 OLD)
endif()
#=============================================
# Set the working directories
#=============================================
#---------------------------------------------
# PgRouting_SOURCE_NAMES
# PGROUTING_SOURCE_NAMES
#---------------------------------------------
#
# Name of the directories that have C/C++ code
# - <directory>/src/CMakelists.txt must exist
# - <directory>/sql/CMakeLists.txt must exist
#----------------------
configure_file("configuration.conf" "configuration.conf")
file(STRINGS configuration.conf PgRouting_CONFIGURATION_FILE)
set(PgRouting_SOURCE_NAMES "")
set(PgRouting_SQL_DIRECTORIES "")
set(PgRouting_DOC_DIRECTORIES "")
foreach(line ${PgRouting_CONFIGURATION_FILE})
string(REGEX REPLACE "^(#).*" "\\1" comment ${line})
if("${comment}" MATCHES "#")
continue()
endif()
string(REGEX REPLACE "^(.*)\\|(.*)\\|(.*)\\|(.*)" "\\1" directory ${line})
string(REGEX REPLACE "^(.*)\\|(.*)\\|(.*)\\|(.*)" "\\2" has_code ${line})
string(REGEX REPLACE "^(.*)\\|(.*)\\|(.*)\\|(.*)" "\\3" has_sql ${line})
string(REGEX REPLACE "^(.*)\\|(.*)\\|(.*)\\|(.*)" "\\4" has_doc ${line})
string(STRIP ${directory} directory)
string(STRIP ${has_code} has_code)
string(STRIP ${has_sql} has_sql)
string(STRIP ${has_doc} has_doc)
if( ${has_code} MATCHES "Y")
list(APPEND PgRouting_SOURCE_NAMES "${directory}")
endif()
if( ${has_sql} MATCHES "Y")
list(APPEND PgRouting_SQL_DIRECTORIES "${directory}")
endif()
if( ${has_doc} MATCHES "Y")
list(APPEND PgRouting_DOC_DIRECTORIES "${directory}")
endif()
endforeach()
if (PGROUTING_DEBUG)
message(STATUS "${PgRouting_SOURCE_NAMES}")
message(STATUS "${PgRouting_SQL_DIRECTORIES}")
message(STATUS "${PgRouting_DOC_DIRECTORIES}")
endif()
include(pgr/Configure)
#---------------------------------------------
......@@ -114,7 +64,6 @@ set(DOXYGEN_MINIMUM_VERSION "1.7")
set(SPHINX_MINIMUM_VERSION "1.1")
set(POSTGRESQL_MINIMUM_VERSION "9.2.0")
set(BOOST_MINIMUM_VERSION "1.53")
set(CGAL_CXX_MINIMUM_VERSION "4.4")
set(POSTGIS_MINIMUM_VERSION "2.0.0")
set(GNU_CXX_MINIMUM_VERSION "4.6")
set(MSVC_CXX_MINIMUM_VERSION "18.0")
......@@ -132,7 +81,6 @@ message(STATUS "MSVC_CXX_MINIMUM_VERSION=${MSVC_CXX_MINIMUM_VERSION}")
# adding cmake modules
#---------------------------------------------
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
foreach(dir ${CMAKE_MODULE_PATH})
message(STATUS "dir='${dir}'")
endforeach()
......@@ -170,58 +118,9 @@ elseif(COMPILER_SUPPORTS_CXX0X)
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++0x or C++11 flags support.")
endif()
set(COMPILER_VERSION "${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}")
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# PGROUTING version variables
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
set(PGROUTING_VERSION_MAJOR "2")
set(PGROUTING_VERSION_MINOR "6")
set(PGROUTING_VERSION_PATCH "3")
set(PGROUTING_VERSION_DEV "")
set(PGROUTING_SHORT_VERSION "${PGROUTING_VERSION_MAJOR}.${PGROUTING_VERSION_MINOR}")
set(PGROUTING_VERSION "${PGROUTING_VERSION_MAJOR}.${PGROUTING_VERSION_MINOR}.${PGROUTING_VERSION_PATCH}")
set(PGROUTING_FULL_VERSION "v${PGROUTING_VERSION}${PGROUTING_VERSION_DEV}")
#---------------------------------------------
# Variables used in pgr_version()
#---------------------------------------------
file(STRINGS "${PGROUTING_SOURCE_DIR}/VERSION" PGROUTING_BUILD_STRING)
set(PGROUTING_GIT_HASH "")
string(REGEX REPLACE "^([0-9]+)-([0-9a-f]+) (.*)$" "\\2" PGROUTING_GIT_HASH ${PGROUTING_BUILD_STRING})
string(REGEX REPLACE "^([0-9]+)-([0-9a-f]+) (.*)$" "\\3" PGROUTING_GIT_BRANCH ${PGROUTING_BUILD_STRING})
#if (NOT "${PGROUTING_GIT_BRANCH}" STREQUAL "master")
# set (PGROUTING_GIT_HASH "")
# set (PGROUTING_GIT_BRANCH "")
#endif()
if (PGROUTING_DEBUG)
message(STATUS "PGROUTING_VERSION: ${PGROUTING_FULL_VERSION}")
message(STATUS "PGROUTING_SHORT_VERSION: ${PGROUTING_FULL_VERSION}")
message(STATUS "PGROUTING_FULL_VERSION: ${PGROUTING_FULL_VERSION}")
message(STATUS "VERSION file contents: ${PGROUTING_BUILD_STRING}")
message(STATUS "PGROUTING_GIT_HASH: ${PGROUTING_GIT_HASH}")
message(STATUS "PGROUTING_GIT_BRANCH: ${PGROUTING_GIT_BRANCH}")
message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}")
message(STATUS "PGROUTING_SOURCE_DIR: ${PGROUTING_SOURCE_DIR}")
message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
endif()
#----------------------
# PGROUTING library name used in the pgr_functions
# '$libdir/${PGROUTING_LIBRARY_NAME}'
#----------------------
set(PGROUTING_LIBRARY_NAME "libpgrouting-${PGROUTING_SHORT_VERSION}")
#-----------------------------------------------------------------------------
......@@ -241,17 +140,8 @@ if(WIN32 AND NOT MSVC)
set(BOOST_ROOT c:/ming${OS_BUILD}/msys/local)
endif(NOT BOOST_ROOT)
if (NOT CGAL_ROOT)
set(CGAL_ROOT c:/ming${OS_BUILD}/msys/local)
endif(NOT CGAL_ROOT)
if (NOT GMP_ROOT)
set(GMP_ROOT c:/ming${OS_BUILD}/mingw${OS_BUILD})
endif(NOT GMP_ROOT)
if (PGROUTING_DEBUG)
message(STATUS "OS_BUILD=${OS_BUILD}")
message(STATUS "CGAL_ROOT=${CGAL_ROOT}")
message(STATUS "GMP_ROOT=${GMP_ROOT}")
message(STATUS "BOOST_ROOT=${BOOST_ROOT}")
message(STATUS "CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}")
endif()
......@@ -320,9 +210,7 @@ if(WIN32)
endif(MSVC)
endif(WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPGSQL_VERSION=${PGSQL_VERSION}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DPGSQL_VERSION=${PGSQL_VERSION}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DPGSQL_VERSION=${PGSQL_VERSION}")
add_definitions(-DPGSQL_VERSION=${PGSQL_VERSION})
message(STATUS "PGSQL_VERSION=${PGSQL_VERSION}")
......@@ -332,31 +220,42 @@ message(STATUS "PGSQL_VERSION=${PGSQL_VERSION}")
#---------------------------------------------
#---------------------------------------------
find_package(Boost ${BOOST_MINIMUM_VERSION})
if(Boost_INCLUDE_DIRS)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
message(STATUS "Boost headers were found here: ${Boost_INCLUDE_DIRS}")
else(Boost_INCLUDE_DIRS)
else()
message(FATAL_ERROR " Please check your Boost installation ")
endif(Boost_INCLUDE_DIRS)
endif()
set(BOOST_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
include_directories(${Boost_INCLUDE_DIRS})
# Boost for Chinese postman needs 1.55 at least
# dijkstra_shortest_paths.hpp has an error fix on 1.55
# error affects prim
# BOOST_VERSION_OK if 1, use the boost file copy in the repository
if ("${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}" VERSION_LESS "1.55.0")
set(BOOST_VERSION_OK "0")
else()
set(BOOST_VERSION_OK "1")
endif()
# Boost Geometry structure is different
if ("${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}" VERSION_LESS "1.56.0")
set(BOOST_Geometry_VERSION_OK "0")
else()
set(BOOST_Geometry_VERSION_OK "1")
endif()
#---------------------------------------------
#---------------------------------------------
# CGAL
#---------------------------------------------
#---------------------------------------------
find_package(CGAL ${CGAL_MINIMUM_VERSION})
if(NOT CGAL_FOUND)
message(FATAL_ERROR " Please check your CGAL installation, or set correct path to CGAL_INCLUDE_DIR and CGAL_LIBRARIES.")
endif(NOT CGAL_FOUND)
#-------
include_directories(${CGAL_INCLUDE_DIR})
message(STATUS "Boost VERSION ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
message(STATUS "BOOST_VERSION_OK ${BOOST_VERSION_OK}")
message(STATUS "BOOST_Geometry_VERSION_OK ${BOOST_Geometry_VERSION_OK}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_VERSION_OK=${BOOST_VERSION_OK} -DBOOST_Geometry_VERSION_OK=${BOOST_Geometry_VERSION_OK}")
#---------------------------------------------
#---------------------------------------------
# PgRouting includes
# PGROUTING includes
#---------------------------------------------
#---------------------------------------------
......@@ -373,8 +272,7 @@ if (PGROUTING_DEBUG)
message(STATUS "PERL_VERSION_STRING = ${PERL_VERSION_STRING}")
message(STATUS "POSTGRESQL_VERSION is ${PGSQL_VERSION}")
message(STATUS "PGSQL_VERSION is ${PGSQL_VERSION}")
message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(STATUS "CGAL_INCLUDE_DIR: ${CGAL_INCLUDE_DIR}")
message(STATUS "BOOST_VERSION_OK ${BOOST_VERSION_OK}")
message(STATUS "PGROUTING_INCLUDE_DIRECTORIES = ${PGROUTING_INCLUDE_DIRECTORIES}")
message(STATUS "POSTGRESQL_INCLUDE_DIR = ${POSTGRESQL_INCLUDE_DIR}")
message(STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}")
......@@ -482,8 +380,8 @@ if(CXX_COMPILER_SUPPORTS_ROUNDING_MATH)
endif()
# TODO use -Werror when TRSP gets rewritten
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wconversion -pedantic -Wmissing-prototypes -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fno-implicit-inline-templates -Wconversion -pedantic -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wconversion -Wmissing-prototypes -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wconversion -pedantic -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
......@@ -512,14 +410,14 @@ endif()
if(WITH_INTERNAL_TESTS)
message("Including InternalQueryTests")
set(PgRouting_SOURCE_NAMES ${PgRouting_SOURCE_NAMES} "internalQueryTests")
set(PGROUTING_SOURCE_NAMES ${PGROUTING_SOURCE_NAMES} "internalQueryTests")
endif()
#-------------------
# add the subdirectories that have the C/C++ code
#-------------------
foreach (subdir ${PgRouting_SOURCE_NAMES})
foreach (subdir ${PGROUTING_SOURCE_NAMES})
add_subdirectory("${PGROUTING_SOURCE_DIR}/src/${subdir}")
endforeach()
......@@ -539,12 +437,12 @@ else(APPLE)
endif(APPLE)
LINK_LIBRARIES(${CGAL_LIBRARIES} ${GMP_LIBRARIES} ${BOOST_THREAD_LIBRARIES})
LINK_LIBRARIES(${BOOST_THREAD_LIBRARIES})
#-------------------
# pgRouting objects to be linked
#-------------------
foreach (subdir ${PgRouting_SOURCE_NAMES} )
foreach (subdir ${PGROUTING_SOURCE_NAMES} )
set(PGROUTING_OBJECTS ${PGROUTING_OBJECTS} "$<TARGET_OBJECTS:${subdir}>")
endforeach()
......@@ -557,7 +455,11 @@ endforeach()
#----------------------
# PGROUTING installation files names have the following name
#----------------------
set(PGROUTING_LIB_NAME "pgrouting-${PGROUTING_SHORT_VERSION}")
if (PGROUTING_DEBUG)
message(STATUS "PGROUTING_LIB_NAME ${PGROUTING_LIB_NAME}")
endif()
add_library(${PGROUTING_LIB_NAME}
......@@ -595,7 +497,7 @@ add_subdirectory(sql)
install(TARGETS ${PGROUTING_LIB_NAME} DESTINATION ${LIBRARY_INSTALL_PATH})
install(FILES
${PgRouting_SQL_FILES_TO_INSTALL}
${PGROUTING_SQL_FILES_TO_INSTALL}
DESTINATION "${SHARE_DIR}"
)
......@@ -606,10 +508,3 @@ install(FILES
#-----------------------------------------------------------------------------
add_subdirectory(doxygen)
add_subdirectory(doc)
if (PGROUTING_DEBUG)
foreach (f ${PgRouting_SQL_FILES})
message(STATUS ${f})
endforeach()
endif()
pgRouting 2.6.2 Release Notes
pgRouting 3.0.0 Release Notes
-------------------------------------------------------------------------------
*Fixed Issues*
* [#1153 ](https://github.com/pgRouting/pgrouting/issues/1153)_: Renamed pgr_eucledianTSP to pgr_TSPeuclidean
* [#1188 ](https://github.com/pgRouting/pgrouting/issues/1188)_: Removed CGAL dependency
* [#1002 ](https://github.com/pgRouting/pgrouting/issues/1002)_: Fixed contraction issues:
* [#1004 ](https://github.com/pgRouting/pgrouting/issues/1004)_: Contracts when forbidden vertices do not belong to graph
* [#1005 ](https://github.com/pgRouting/pgrouting/issues/1005)_: Intermideate results eliminated
* [#1006 ](https://github.com/pgRouting/pgrouting/issues/1006)_: No loss of information
*New functions*
* Kruskal family
* pgr_kruskal
* pgr_kruskalBFS
* pgr_kruskalDD
* pgr_kruskalDFS
* Prim family
* pgr_prim
* pgr_primDD
* pgr_primDFS
* pgr_primBFS
*Proposed moved to official on pgRouting*
* aStar Family
* pgr_aStar(one to many)
* pgr_aStar(many to one)
* pgr_aStar(many to many)
* pgr_aStarCost(one to one)
* pgr_aStarCost(one to many)
* pgr_aStarCost(many to one)
* pgr_aStarCost(many to many)
* pgr_aStarCostMatrix(one to one)
* pgr_aStarCostMatrix(one to many)
* pgr_aStarCostMatrix(many to one)
* pgr_aStarCostMatrix(many to many)
* bdAstar Family
* pgr_bdAstar(one to many)
* pgr_bdAstar(many to one)
* pgr_bdAstar(many to many)
* pgr_bdAstarCost(one to one)
* pgr_bdAstarCost(one to many)
* pgr_bdAstarCost(many to one)
* pgr_bdAstarCost(many to many)
* pgr_bdAstarCostMatrix(one to one)
* pgr_bdAstarCostMatrix(one to many)
* pgr_bdAstarCostMatrix(many to one)
* pgr_bdAstarCostMatrix(many to many)
* bdDijkstra Family
* pgr_bdDijkstra(one to many)
* pgr_bdDijkstra(many to one)
* pgr_bdDijkstra(many to many)
* pgr_bdDijkstraCost(one to one)
* pgr_bdDijkstraCost(one to many)
* pgr_bdDijkstraCost(many to one)
* pgr_bdDijkstraCost(many to many)
* pgr_bdDijkstraCostMatrix(one to one)
* pgr_bdDijkstraCostMatrix(one to many)
* pgr_bdDijkstraCostMatrix(many to one)
* pgr_bdDijkstraCostMatrix(many to many)
* Flow Family
* pgr_pushRelabel(one to one)
* pgr_pushRelabel(one to many)
* pgr_pushRelabel(many to one)
* pgr_pushRelabel(many to many)
* pgr_edmondsKarp(one to one)
* pgr_edmondsKarp(one to many)
* pgr_edmondsKarp(many to one)
* pgr_edmondsKarp(many to many)
* pgr_boykovKolmogorov (one to one)
* pgr_boykovKolmogorov (one to many)
* pgr_boykovKolmogorov (many to one)
* pgr_boykovKolmogorov (many to many)
* pgr_maxCardinalityMatching
* pgr_maxFlow
* pgr_edgeDisjointPaths(one to one)
* pgr_edgeDisjointPaths(one to many)
* pgr_edgeDisjointPaths(many to one)
* pgr_edgeDisjointPaths(many to many)
* Components family
* pgr_connectedComponents
* pgr_strongComponents
* pgr_biconnectedComponents
* pgr_articulationPoints
* pgr_bridges
* Contraction:
* Removed unnecessary column seq
* Bug Fixes
*New Experimental functions*
* pgr_maxFlowMinCost
* pgr_maxFlowMinCost_Cost
* pgr_extractVertices
* pgr_turnRestrictedPath
* pgr_stoerWagner
* pgr_dagShortestpath
* pgr_topologicalSort
* pgr_transitiveClosure
* VRP category
* pgr_pickDeliverEuclidean
* pgr_pickDeliver
* Chinese Postman family
* pgr_chinesePostman
* pgr_chinesePostmanCost
* Breadth First Search family
* pgr_breadthFirstSearch
* pgr_binaryBreadthFirstSearch
* Bellman Ford family
* pgr_bellmanFord
* pgr_edwardMoore
*Moved to legacy*
* Experimental functions
* pgr_labelGraph - Use the components family of functions instead.
* Max flow - functions were renamed on v2.5.0
* pgr_maxFlowPushRelabel
* pgr_maxFlowBoykovKolmogorov
* pgr_maxFlowEdmondsKarp
* pgr_maximumcardinalitymatching
* VRP
* pgr_gsoc_vrppdtw
* TSP old signatures
* pgr_pointsAsPolygon
* pgr_alphaShape old signature
pgRouting 2.6.3 Release Notes
-------------------------------------------------------------------------------
To see the issues closed by this release see the [Git closed milestone for 2.6.2 ](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%202.6.3%22%20) on Github.
To see the issues closed by this release see the [Git closed milestone for 2.6.3 ](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%202.6.3%22%20) on Github.
*Bug fixes*
......@@ -629,7 +790,7 @@ As a result of this effort:
* Support for table SCHEMA in function parameters
* Support for ``st_`` PostGIS function prefix
* Added ``pgr_`` prefix to functions and types
* Better documentation: http://docs.pgrouting.org
* Better documentation: https://docs.pgrouting.org
* shooting_star is discontinued
......
......@@ -6,9 +6,8 @@
### Branches
* The *master* branch has the release 2.6.1
* The *release/2.5* branch has the next micro-release 2.5.4 (if needed)
* The *develop* branch has the development of the next release 3.0.0-dev
* The *master* branch has the latest release
* The *develop* branch has the development of the next release
For the complete list of releases go to:
https://github.com/pgRouting/pgrouting/releases
......@@ -16,51 +15,13 @@ https://github.com/pgRouting/pgrouting/releases
## LINKS
* https://pgrouting.org/
* https://docs.pgrouting.org/
* https://workshop.pgrouting.org/
* http://pgrouting.org/
* http://docs.pgrouting.org/
* https://github.com/pgRouting/pgrouting
<table>
<tr>
<td>Branch</td>
<td>Travis</td>
<td>Appveyor</td>
<td>Jenkins</td>
<td>Comments</td>
</tr>
<tr>
<td>master</td>
<td><img src="https://travis-ci.org/pgRouting/pgrouting.png?branch=master" alt="Build Status"/></td>
<td><img src="https://ci.appveyor.com/api/projects/status/github/pgRouting/pgrouting?branch=master&svg=true" alt="Appveyor Status"/></td>
<td><img src="https://winnie.postgis.net:444/buildStatus/icon?job=pgRouting_matrix_master" alt="Jenkins Status"/></td>
<td></td>
</tr>
<tr>
<td>develop</td>
<td><img src="https://travis-ci.org/pgRouting/pgrouting.png?branch=develop" alt="Build Status"/></td>
<td><img src="https://ci.appveyor.com/api/projects/status/github/pgRouting/pgrouting?branch=develop&svg=true" alt="Appveyor Status"/></td>
<td><img src="https://winnie.postgis.net:444/buildStatus/icon?job=pgRouting_matrix_branch_develop" alt="Jenkins Status"/></td>
<td></td>
</tr>
<tr>
<td>gh-pages</td>
<td><img src="https://travis-ci.org/pgRouting/pgrouting.png?branch=gh-pages" alt="Build Status"/></td>
<td></td>
<td></td>
<td>not enabled</td>
</tr>
</table>
* travis: Postgis 2.3.3 for Postgres 9.5 & 9.6
* precise
* developed with Postgres 9.3 and Postgis 2.3.3
* jenkins: g++ 4.8 on 32 & 64 bits for Postgis 2.4.0dev and Postgres 9.5, 9.6, 10
* appveyor: vs1013 Postgis 2.3.3 on Postgres 9.4
## STATUS
Status of the project can be found [here](https://github.com/pgRouting/pgrouting/wiki#status)
## INTRODUCTION
......@@ -68,34 +29,20 @@ pgRouting extends the PostGIS/PostgreSQL geospatial database to provide geospati
This library contains following features:
* All Pairs Shortest Path, Johnson’s Algorithm
* All Pairs Shortest Path, Floyd-Warshall Algorithm
* Shortest Path A*
* Bi-directional Dijkstra Shortest Path
* Bi-directional A* Shortest Path
* Shortest Path Dijkstra Family of functions
* Shortest Path Dijkstra Cost Family of functions
* All Pairs Shortest Path Algorithms
* A-star algorithm
* Bi-directional algorithms
* A variety of applications of dijkstra algorithms
* Cost functions
* With points
* Driving Distance
* K-Shortest Path, Multiple Alternative Paths (Yen's algorithm)
* With points
* Yen's algorithm
* Traveling Sales Person (TSP)
* Turn Restriction Shortest Path (TRSP)
Additionally, ready for testing and to be part of 2.5 official version:
* Shortest Path Dijkstra With Points Family of functions
* Shortest Path Dijkstra Cost With Points Family of functions
* Driving Distance With Points
* K-Shortest Path With Points, Multiple Alternative Paths (Yen's algorithm)
* Dijkstra Via (Vertices)
and many more.
Family of functions include:
* one to one
* one to many
* many to one
* many to many
The latest documentation: http://docs.pgrouting.org/latest
## REQUIREMENTS
......@@ -103,23 +50,18 @@ Building requirements
--------------------
* Perl
* C and C++ compilers
* GNU >= 4.6
* GNU >= 4.8
* MSVC >= 18.0
* Postgresql >= 9.2
* Postgresql >= 9.4
* The Boost Graph Library (BGL) >= 1.53
* CMake >= 3.2
* CGAL >= 4.4
* Sphinx >= 1.2
User's requirements
--------------------
* PostGIS >= 2.0
## INSTALLATION
See online documentation: https://docs.pgrouting.org/
* PostGIS
## COMPILATION
......@@ -145,7 +87,7 @@ Build with documentation (requires [Sphinx](http://sphinx-doc.org/))
cmake -DWITH_DOC=ON ..
Postgresql 9.2+
Postgresql 9.3+
createdb mydatabase
psql mydatabase -c "CREATE EXTENSION postgis"
......@@ -153,7 +95,7 @@ Postgresql 9.2+
## USAGE
See online documentation: https://docs.pgrouting.org/dev/en/index.html
See online documentation: http://docs.pgrouting.org/dev/en/index.html
## LICENSE
......
6808-b14f4d56b master
......@@ -46,7 +46,6 @@ build_script:
- cd %PGROUTING_BUILD_DIR%
- msbuild PGROUTING.sln /target:Build /property:Configuration=%CONFIGURATION%
- msbuild INSTALL.vcxproj /target:Build /property:Configuration=%CONFIGURATION%
- copy c:\build\gmp\x64\lib\*.dll C:\Progra~1\PostgreSQL\%PG_VER%\bin\
test_script:
- set PGUSER=postgres
......@@ -55,4 +54,4 @@ test_script:
- set PGPORT=5432
- set PATH=%PATH%;%PGHOME%\bin
# Execute algorithm test by Cygwin
#- C:\cygwin\bin\bash -lc "cd /cygdrive/c/build/pgrouting && tools/testers/algorithm-tester.pl -psql \"/cygdrive/c/Progra~1/PostgreSQL/%PG_VER%/bin/psql\""
#- C:\cygwin\bin\bash -lc "cd /cygdrive/c/build/pgrouting && tools/testers/doc_queries_generator.pl -psql \"/cygdrive/c/Progra~1/PostgreSQL/%PG_VER%/bin/psql\""
@echo off
Setlocal EnableDelayedExpansion EnableExtensions
if defined CGAL_LOCAL_DEBUG echo APPVEYOR_BUILD_FOLDER %APPVEYOR_BUILD_FOLDER%
:: =========================================================
:: Set some defaults. Infer some variables.
::
if not defined BUILD_ROOT_DIR goto _error
if not defined COMMON_INSTALL_DIR goto _error
if not defined PLATFORM goto _error
if not defined DOWNLOADS_DIR goto _error
if not defined CGAL_VERSION goto _error
if not defined RUNTIME goto _error
if not defined CMAKE_GENERATOR goto _error
if not defined BOOST_INCLUDE_DIR goto _error
if not defined BOOST_LIBRARY_DIR goto _error
if defined CGAL_LOCAL_DEBUG (
echo BUILD_ROOT_DIR %BUILD_ROOT_DIR%
echo COMMON_INSTALL_DIR %COMMON_INSTALL_DIR%
echo PLATFORM %PLATFORM%
echo DOWNLOADS_DIR %DOWNLOADS_DIR%
echo CGAL_VERSION %CGAL_VERSION%
echo RUNTIME %RUNTIME%
echo CMAKE_GENERATOR %CMAKE_GENERATOR%
echo BOOST_INCLUDE_DIR %BOOST_INCLUDE_DIR%
echo BOOST_LIBRARY_DIR %BOOST_LIBRARY_DIR%
)
set MSBUILD_CONFIGURATION=RelWithDebInfo
::
:: =========================================================
:: create a download directory:
mkdir %DOWNLOADS_DIR% 2>NUL
mkdir %COMMON_INSTALL_DIR% 2>NUL
if defined CGAL_LOCAL_DEBUG dir %DOWNLOADS_DIR%
if defined CGAL_LOCAL_DEBUG dir %COMMON_INSTALL_DIR%
if not defined GMP_SRC_DIR set GMP_SRC_DIR=%BUILD_ROOT_DIR%\gmp\%PLATFORM%
pushd %BUILD_ROOT_DIR%
mkdir gmp\%PLATFORM% 2>NUL
popd
if defined CGAL_LOCAL_DEBUG (
echo GMP_SRC_DIR %GMP_SRC_DIR%
dir %GMP_SRC_DIR%
)
echo ----------------------------------- GMP
if not exist %GMP_SRC_DIR%\gmp.COPYING (
if not exist %DOWNLOADS_DIR%\gmp-all-CGAL-3.9.zip (
echo Downloading gmp-all-CGAL-3.9.zip
pushd %DOWNLOADS_DIR%
curl -L -O -S -s http://cgal.geometryfactory.com/CGAL/precompiled_libs/auxiliary/%PLATFORM%/GMP/5.0.1/gmp-all-CGAL-3.9.zip
if not exist %DOWNLOADS_DIR%\gmp-all-CGAL-3.9.zip (
echo Something went wrong Downloading gmp-all-CGAL-3.9.zip
)
popd
)
echo Extracting gmp-all-CGAL-3.9.zip
pushd %DOWNLOADS_DIR%
7z x -o%GMP_SRC_DIR% gmp-all-CGAL-3.9.zip
popd
) else (
echo GMP already installed at %GMP_SRC_DIR%
)
set GMP_LIBRARIES=%GMP_SRC_DIR%\lib\libgmp-10.lib
set GMP_INCLUDE_DIR=%GMP_SRC_DIR%\include
if defined CGAL_LOCAL_DEBUG (
echo GMP_LIBRARIES %GMP_LIBRARIES%
dir %GMP_SRC_DIR%
)
echo -----------------------------------
echo ----------------------------------- MPFR
if not exist %GMP_SRC_DIR%\mpfr.COPYING (
if not exist %DOWNLOADS_DIR%\mpfr-all-CGAL-3.9.zip (
echo Downloading mpfr-all-CGAL-3.9.zip
pushd %DOWNLOADS_DIR%
curl -L -O -S -s http://cgal.geometryfactory.com/CGAL/precompiled_libs/auxiliary/%PLATFORM%/MPFR/3.0.0/mpfr-all-CGAL-3.9.zip
if not exist %DOWNLOADS_DIR%\mpfr-all-CGAL-3.9.zip (
echo Something went wrong Downloading mpfr-all-CGAL-3.9.zip
)
popd
)
echo Extracting mpfr-all-CGAL-3.9.zip
pushd %DOWNLOADS_DIR%
7z x -o%GMP_SRC_DIR% mpfr-all-CGAL-3.9.zip
popd
) else (
echo MPFR already installed at %GMP_SRC_DIR%
)
set MPFR_LIBRARIES=%GMP_SRC_DIR%\lib\libmpfr-4.lib
if defined CGAL_LOCAL_DEBUG (
dir %GMP_SRC_DIR%
)
echo -----------------------------------
echo ==================================== CGAL
if exist %COMMON_INSTALL_DIR%/include/CGAL (
echo CGAL already installed
goto _ExitCGAL
)
if not exist %BUILD_ROOT_DIR%\CGAL-%CGAL_VERSION%\ (
if not exist %DOWNLOADS_DIR%\CGAL-%CGAL_VERSION%.zip (
echo Downloading CGAL-%CGAL_VERSION%.zip
pushd %DOWNLOADS_DIR%
curl -L -O -S -s http://github.com/CGAL/cgal/releases/download/releases/CGAL-%CGAL_VERSION%/CGAL-%CGAL_VERSION%.zip
if not exist %DOWNLOADS_DIR%\CGAL-%CGAL_VERSION%.zip (
echo Something went wrong Downoading CGAL-%CGAL_VERSION%.zip
)
popd
)
echo Extracting CGAL-%CGAL_VERSION%.zip
pushd %DOWNLOADS_DIR%
7z x -o%BUILD_ROOT_DIR% CGAL-%CGAL_VERSION%.zip
popd
)
set CGAL_SRC_DIR=%BUILD_ROOT_DIR%\CGAL-%CGAL_VERSION%
set CGAL_BUILD_DIR=%CGAL_SRC_DIR%\build\%RUNTIME%\%PLATFORM%
if defined CGAL_LOCAL_DEBUG (
echo CGAL_SRC_DIR %CGAL_SRC_DIR%
dir %CGAL_SRC_DIR%
echo CGAL_BUILD_DIR %CGAL_BUILD_DIR%
)
set PROJ_EXT=vcxproj
echo PROJ_EXT %PROJ_EXT%
mkdir %CGAL_BUILD_DIR% %2>null
pushd %CGAL_BUILD_DIR%
cmake -G "%CMAKE_GENERATOR%" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=%COMMON_INSTALL_DIR% ^
-DBoost_USE_MULTITHREADED=ON ^
-DCGAL_Boost_USE_STATIC_LIBS=ON -DBoost_USE_STATIC_RUNTIME=OFF ^
-DBoost_INCLUDE_DIR:PATH=%BOOST_INCLUDE_DIR% ^
-DBOOST_LIBRARYDIR=%BOOST_LIBRARY_DIR% ^
-DGMP_INCLUDE_DIR=%GMP_SRC_DIR%\include ^
-DMPFR_INCLUDE_DIR=%GMP_SRC_DIR%\include ^
-DGMP_LIBRARIES=%GMP_LIBRARIES% ^
-DMPFR_LIBRARIES=%MPFR_LIBRARIES% ..\..\..\
msbuild CGAL.sln /target:Build /property:Configuration=%MSBUILD_CONFIGURATION%
msbuild INSTALL.%PROJ_EXT% /target:Build /property:Configuration=%MSBUILD_CONFIGURATION%
popd
if defined CGAL_LOCAL_DEBUG (
echo DOWNLOADS_DIR %DOWNLOADS_DIR%
dir %DOWNLOADS%
echo BUILD_ROOT_DIR %BUILD_ROOT_DIR%
dir %BUILD_ROOT_DIR%
echo GMP_SRC_DIR %GMP_SRC_DIR%
dir %GMP_SRC_DIR%
dir C:/build/local/msvc120/x64/include/CGAL
)
:_ExitCGAL
echo --------------------------------
set CGAL_LIBRARIES=%COMMON_INSTALL_DIR%\lib\libCGAL-vc%MSVC_VER:.=%-mt-%CGAL_VERSION%.lib&
set CGAL_INCLUDE_DIR=%COMMON_INSTALL_DIR%\include
echo Installation of CGAL done.
echo Environment variables set:
echo GMP_LIBRARIES %GMP_LIBRARIES%
echo MPFR_LIBRARIES %MPFR_LIBRARIES%
echo CGAL_LIBRARIES %CGAL_LIBRARIES%
echo CGAL_INCLUDE_DIR %CGAL_INCLUDE_DIR%
echo GMP_INCLUDE_DIR %GMP_INCLUDE_DIR%
echo ======================================================
endlocal & (
set GMP_LIBRARIES=%GMP_LIBRARIES%
set MPFR_LIBRARIES=%MPFR_LIBRARIES%
set CGAL_LIBRARIES=%CGAL_LIBRARIES%
set CGAL_INCLUDE_DIR=%CGAL_INCLUDE_DIR%
set GMP_INCLUDE_DIR=%GMP_INCLUDE_DIR%
)
goto :eof
:_error
echo an environment variable is missing:
echo BUILD_ROOT_DIR %BUILD_ROOT_DIR%
echo COMMON_INSTALL_DIR %COMMON_INSTALL_DIR%
echo PLATFORM %PLATFORM%
echo DOWNLOADS_DIR %DOWNLOADS_DIR%
echo CGAL_VERSION %CGAL_VERSION%
echo RUNTIME %RUNTIME%
echo CMAKE_GENERATOR %CMAKE_GENERATOR%
echo BOOST_INCLUDE_DIR %BOOST_INCLUDE_DIR%
echo BOOST_LIBRARY_DIR %BOOST_LIBRARY_DIR%
echo MSBUILD_CONFIGURATION %MSBUILD_CONFIGURATION%
......@@ -22,7 +22,6 @@ if not defined COMMON_INSTALL_DIR set COMMON_INSTALL_DIR=%BUILD_ROOT_DIR%\local\
if not defined CMAKE_VERSION set CMAKE_VERSION=3.5.2
if not defined PGIS_VERSION set PGIS_VERSION=2.3
if not defined BOOST_VERSION set BOOST_VERSION=1.58.0
if not defined CGAL_VERSION set CGAL_VERSION=4.8.1
set PG_VER_NO_DOT=pg%PG_VER:.=%
......@@ -157,14 +156,6 @@ echo ====================================
:: set BOOST_LOCAL_DEBUG=1
call ci/appveyor/install-boost.bat
::
:: CGAL & GMP & MPFR
::
::
set CGAL_LOCAL_DEBUG=1
call ci/appveyor/install-CGAL.bat
echo ======================================================
echo Installation of Prerequisites done.
echo Environment variables set:
......@@ -172,11 +163,6 @@ echo Environment variables set:
echo BOOST_THREAD_LIB %BOOST_THREAD_LIB%
echo BOOST_SYSTEM_LIB %BOOST_SYSTEM_LIB%
echo BOOST_INCLUDE_DIR %BOOST_INCLUDE_DIR%
echo GMP_LIBRARIES %GMP_LIBRARIES%
echo MPFR_LIBRARIES %MPFR_LIBRARIES%
echo CGAL_LIBRARIES %CGAL_LIBRARIES%
echo CGAL_INCLUDE_DIR %CGAL_INCLUDE_DIR%
echo GMP_INCLUDE_DIR %GMP_INCLUDE_DIR%
echo CMAKE_GENERATOR %CMAKE_GENERATOR%
echo ======================================================
......@@ -186,11 +172,6 @@ endlocal & (
set BOOST_THREAD_LIB=%BOOST_THREAD_LIB%
set BOOST_SYSTEM_LIB=%BOOST_SYSTEM_LIB%
set BOOST_INCLUDE_DIR=%BOOST_INCLUDE_DIR%
set GMP_LIBRARIES=%GMP_LIBRARIES%
set MPFR_LIBRARIES=%MPFR_LIBRARIES%
set CGAL_LIBRARIES=%CGAL_LIBRARIES%
set CGAL_INCLUDE_DIR=%CGAL_INCLUDE_DIR%
set GMP_INCLUDE_DIR=%GMP_INCLUDE_DIR%
set CMAKE_GENERATOR=%CMAKE_GENERATOR%
)
......
......@@ -4,16 +4,11 @@ set PG_VER=%1
echo MSVC_VER %MSVC_VER%
echo BUILD_ROOT_DIR %BUILD_ROOT_DIR%
echo CGAL_LIBRARIES %CGAL_LIBRARIES%
echo GMP_LIBRARIES %GMP_LIBRARIES%
echo MPFR_LIBRARIES %MPFR_LIBRARIES%
echo CMAKE_GENERATOR %CMAKE_GENERATOR%
echo BOOST_THREAD_LIB %BOOST_THREAD_LIB%
echo BOOST_SYSTEM_LIB %BOOST_SYSTEM_LIB%
echo BOOST_INCLUDE_DIR %BOOST_INCLUDE_DIR%
echo PLATFORM %PLATFORM%
echo GMP_INCLUDE_DIR %GMP_INCLUDE_DIR%
echo CGAL_INCLUDE_DIR %CGAL_INCLUDE_DIR%
echo PG_VER %PG_VER%
echo PROGRAMFILES %PROGRAMFILES%
......@@ -46,10 +41,7 @@ cmake -G "%CMAKE_GENERATOR%" -DPOSTGRESQL_INCLUDE_DIR:PATH="%POSTGRESQL_DIR%\inc
-DPOSTGRESQL_EXECUTABLE:FILEPATH="%POSTGRESQL_DIR%\bin\postgres.exe" ^
-DPOSTGRESQL_PG_CONFIG:FILEPATH="%POSTGRESQL_DIR%\bin\pg_config.exe" ^
-DBoost_INCLUDE_DIR:PATH=%BOOST_INCLUDE_DIR% ^
-DBOOST_THREAD_LIBRARIES:FILEPATH="%BOOST_THREAD_LIB%;%BOOST_SYSTEM_LIB%" ^
-DCGAL_INCLUDE_DIR:PATH="%CGAL_INCLUDE_DIR%;%GMP_INCLUDE_DIR%" ^
-DCGAL_LIBRARIES:FILEPATH=%CGAL_LIBRARIES% ^
-DGMP_LIBRARIES:FILEPATH="%GMP_LIBRARIES%;%MPFR_LIBRARIES%" ..\..\..\
-DBOOST_THREAD_LIBRARIES:FILEPATH="%BOOST_THREAD_LIB%;%BOOST_SYSTEM_LIB%" ..\..\..\
@echo off
popd
......@@ -10,23 +10,23 @@ export PGROUTING_VER=$BRANCH
# File used in Jenkins setup
#-------------------------
export PATH=${PATH}:/usr/local::/usr/local/lib::/usr/local/bin
echo $PATH
echo "$PATH"
export PGUSER=postgres
export PGROUTING_VER=$BRANCH
rm -rf ${WORKSPACE}/build${BRANCH}
mkdir ${WORKSPACE}/build${BRANCH}
rm -rf "${WORKSPACE}/build${BRANCH}"
mkdir "${WORKSPACE}/build${BRANCH}"
cmake --version
cd ../build${BRANCH}
cmake ../${BRANCH}
cd "../build${BRANCH}"
cmake "../${BRANCH}"
make
sudo make install
cd ../${BRANCH}
perl tools/testers/algorithm-tester.pl
cd "../${BRANCH}"
perl tools/testers/doc_queries_generator.pl
psql -c "CREATE DATABASE ___pgr___test___"
sh tools/testers/pg_prove_tests.sh ${PGUSER}
sh tools/testers/pg_prove_tests.sh "${PGUSER}"
psql -c "DROP DATABASE ___pgr___test___"
......@@ -10,23 +10,23 @@ export PGROUTING_VER=$BRANCH
# File used in Jenkins setup
#-------------------------
export PATH=${PATH}:/usr/local::/usr/local/lib::/usr/local/bin
echo $PATH
echo "$PATH"
export PGUSER=postgres
export PGROUTING_VER=$BRANCH
rm -rf ${WORKSPACE}/build${BRANCH}
mkdir ${WORKSPACE}/build${BRANCH}
rm -rf "${WORKSPACE}/build${BRANCH}"
mkdir "${WORKSPACE}/build${BRANCH}"
cmake --version
cd ../build${BRANCH}
cmake ../${BRANCH}
cd "../build${BRANCH}"
cmake "../${BRANCH}"
make
sudo make install
cd ../${BRANCH}
perl tools/testers/algorithm-tester.pl
cd "../${BRANCH}"
perl tools/testers/doc_queries_generator.pl
psql -c "CREATE DATABASE ___pgr___test___"
sh tools/testers/pg_prove_tests.sh ${PGUSER}
sh tools/testers/pg_prove_tests.sh "${PGUSER}"
psql -c "DROP DATABASE ___pgr___test___"
......@@ -30,14 +30,14 @@ PGSTARTLOG=${PGDATA}/start_log.log
#initialize the database
${PGPATH}/bin/initdb -U postgres -D ${PGDATA} -A trust
"${PGPATH}"/bin/initdb -U postgres -D "${PGDATA}" -A trust
# check to see if pg is already running
state=`${PGPATH}/bin/pg_ctl status -D ${PGDATA} -l ${PGDATA}/logfile | grep "server is running" `
state=$("${PGPATH}"/bin/pg_ctl status -D "${PGDATA}" -l "${PGDATA}"/logfile | grep "server is running")
# start pg if not running
if [ "0" == "0$state" ]; then
${PGPATH}/bin/pg_ctl start -D ${PGDATA} -l ${PGDATA}/logfile >> ${PGSTARTLOG} 2>&1
"${PGPATH}/bin/pg_ctl" start -D "${PGDATA}" -l "${PGDATA}/logfile" >> "${PGSTARTLOG}" 2>&1
fi
echo "ok"
......@@ -49,38 +49,39 @@ echo "ok"
# File used in Jenkins setup
#-------------------------
echo $PATH
echo "$PATH"
export PGUSER=postgres
export PGROUTING_VER=$BRANCH
export PGROUTING_VER="$BRANCH"
rm -rf ${WORKSPACE}/build${BRANCH}
mkdir ${WORKSPACE}/build${BRANCH}
rm -rf "${WORKSPACE}/build${BRANCH}"
mkdir "${WORKSPACE}/build${BRANCH}"
cmake --version
cd ../build${BRANCH}
cmake ../${BRANCH}
cd ../build"${BRANCH}"
cmake "../${BRANCH}"
make
make install
cd ../${BRANCH}
export PERL5LIB=$(echo pwd)
perl tools/testers/algorithm-tester.pl -pgisver "${POSTGIS_VER}" -pgport "${PGPORT}"
cd ../"${BRANCH}"
PERL5LIB=$(echo pwd)
export PERL5LIB
perl tools/testers/doc_queries_generator.pl -pgisver "${POSTGIS_VER}" -pgport "${PGPORT}"
#pgTap tests disable for now until we have installed
if false; then
psql -c "CREATE DATABASE ___pgr___test___"
sh tools/testers/pg_prove_tests.sh ${PGUSER}
sh tools/testers/pg_prove_tests.sh "${PGUSER}"
psql -c "DROP DATABASE ___pgr___test___"
fi
#stop the postgres server
state=`${PGPATH}/bin/pg_ctl status -D ${PGDATA} -l ${PGPATH}/data/logfile | grep "server is running"`
echo $state
state=$("${PGPATH}"/bin/pg_ctl status -D "${PGDATA}" -l "${PGPATH}"/data/logfile | grep "server is running")
echo "${state}"
if [ "0" != "0$state" ]; then
${PGPATH}/bin/pg_ctl stop -D ${PGDATA} -l logfile -m fast
rm -rf ${PGDATA}
"${PGPATH}"/bin/pg_ctl stop -D "${PGDATA}" -l logfile -m fast
rm -rf "${PGDATA}"
fi
echo "done"
......
......@@ -28,22 +28,14 @@ ERROR=0
# Define alias function for psql command
run_psql () {
PGOPTIONS='--client-min-messages=warning' psql -U $PGUSER -d $PGDATABASE -X -q -v ON_ERROR_STOP=1 --pset pager=off "$@"
PGOPTIONS='--client-min-messages=warning' psql -U "${PGUSER}" -d "${PGDATABASE}" -X -q -v ON_ERROR_STOP=1 --pset pager=off "$@"
if [ "$?" -ne 0 ]
then
echo "Test query failed: $@"
echo "Test query failed:" "$@"
ERROR=1
fi
}
# ------------------------------------------------------------------------------
# CREATE DATABASE
# ------------------------------------------------------------------------------
#export PGUSER
#run_psql -l
#run_psql -c "CREATE DATABASE ____tmp_pgdb______;"
#export PGDATABASE
# ------------------------------------------------------------------------------
# CREATE EXTENSION
# ------------------------------------------------------------------------------
......@@ -55,25 +47,31 @@ run_psql -c "CREATE EXTENSION pgrouting;"
# ------------------------------------------------------------------------------
run_psql -c "SELECT version();"
run_psql -c "SELECT postgis_full_version();"
run_psql -c "SELECT pgr_version();"
run_psql -c "SELECT pgr_full_version();"
#PGROUTING_VERSION=`run_psql -A -t -c "SELECT version FROM pgr_version();"`
# ------------------------------------------------------------------------------
# Test runner
# Regenerate the signature file & check if it was updated
# ------------------------------------------------------------------------------
# use -v -v for more verbose debuging output
# ./tools/test-runner.pl -v -v -pgver $POSTGRESQL_VERSION
#./tools/test-runner.pl -pgver $POSTGRESQL_VERSION $IGNORE
#./tools/test-runner.pl -pgver $POSTGRESQL_VERSION $IGNORE -v -alg ksp
VERSION=$(grep -Po '(?<=project\(PGROUTING VERSION )[^;]+' CMakeLists.txt)
FILE="sql/sigs/pgrouting--$VERSION.sig"
echo "#VERSION pgrouting $VERSION" > "${FILE}"
echo "#TYPES" >> "${FILE}"
run_psql -c '\dx+ pgrouting' -A | grep '^type' | cut -d ' ' -f2- | sort >> "${FILE}"
echo "#FUNCTIONS" >> "${FILE}"
run_psql -c '\dx+ pgrouting' -A | grep '^function' | cut -d ' ' -f2- | sort >> "${FILE}"
DIFF=$(git diff "sql/sigs/pgrouting--${VERSION}.sig")
#cd ./tools/testers/
#psql -f setup_db.sql
#pg_prove ../../src/trsp/test/pgtap/*
#dropdb ___pgr___test___
#cd ../../
if [[ ! -z "${DIFF}" ]]
then
echo Signature file not updated
echo "${DIFF}"
ERROR=1
fi
./tools/testers/algorithm-tester.pl -pgver $POSTGRESQL_VERSION -pguser $PGUSER
./tools/testers/doc_queries_generator.pl -pgver "${POSTGRESQL_VERSION}" -pguser "${PGUSER}" -documentation
./tools/testers/doc_queries_generator.pl -pgver "${POSTGRESQL_VERSION}" -pguser "${PGUSER}"
if [ "$?" -ne 0 ]
then
......@@ -82,4 +80,4 @@ fi
# Return success or failure
# ------------------------------------------------------------------------------
exit $ERROR
exit "${ERROR}"
# - Find CGAL
# Find the CGAL includes and client library
# This module defines
# CGAL_INCLUDE_DIR, where to find CGAL.h
# CGAL_LIBRARIES, the libraries needed to use CGAL.
# CGAL_FOUND, If false, do not try to use CGAL.
if(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES AND BOOST_THREAD_LIBRARIES AND GMP_LIBRARIES)
set(CGAL_FOUND TRUE)
else(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES AND BOOST_THREAD_LIBRARIES AND GMP_LIBRARIES)
FIND_PATH(CGAL_INCLUDE_DIR CGAL/basic.h
${CGAL_ROOT}/include
/usr/include
/usr/local/include
$ENV{ProgramFiles}/CGAL/*/include
$ENV{SystemDrive}/CGAL/*/include
)
find_library(CGAL_LIBRARIES NAMES CGAL libCGAL
PATHS
${CGAL_ROOT}/lib
/usr/lib
/usr/local/lib
/usr/lib/CGAL
/usr/lib64
/usr/local/lib64
/usr/lib64/CGAL
$ENV{ProgramFiles}/CGAL/*/lib
$ENV{SystemDrive}/CGAL/*/lib
)
# set(Boost_DEBUG ON)
find_package(Boost COMPONENTS thread REQUIRED)
if(Boost_FOUND)
set(BOOST_THREAD_LIBRARIES ${Boost_LIBRARIES})
endif(Boost_FOUND)
# check boost version we may need other components
if("${Boost_VERSION}" VERSION_GREATER "104900")
find_package(Boost COMPONENTS thread system REQUIRED)
if(Boost_FOUND)
set(BOOST_THREAD_LIBRARIES ${Boost_LIBRARIES})
endif(Boost_FOUND)
endif("${Boost_VERSION}" VERSION_GREATER "104900")
find_library(GMP_LIBRARIES NAMES gmp libgmp
PATHS
${GMP_ROOT}/lib
/usr/lib
/usr/local/lib
/usr/lib/gmp
/usr/lib64
/usr/local/lib64
/usr/lib64/gmp
$ENV{ProgramFiles}/gmp/*/lib
$ENV{SystemDrive}/gmp/*/lib
)
message(STATUS "CGAL_INCLUDE_DIR=${CGAL_INCLUDE_DIR}")
message(STATUS "CGAL_LIBRARIES=${CGAL_LIBRARIES}")
message(STATUS "BOOST_THREAD_LIBRARIES=${BOOST_THREAD_LIBRARIES}")
message(STATUS "GMP_LIBRARIES=${GMP_LIBRARIES}")
if(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES AND BOOST_THREAD_LIBRARIES AND GMP_LIBRARIES)
set(CGAL_FOUND TRUE)
message(STATUS "Found CGAL: ${CGAL_INCLUDE_DIR}, ${CGAL_LIBRARIES}, ${BOOST_THREAD_LIBRARIES}, ${GMP_LIBRARIES}")
INCLUDE_DIRECTORIES(${CGAL_INCLUDE_DIR} $ENV{CGAL_CFG})
else(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES AND BOOST_THREAD_LIBRARIES AND GMP_LIBRARIES)
set(CGAL_FOUND FALSE)
message(STATUS "CGAL not found.")
endif(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES AND BOOST_THREAD_LIBRARIES AND GMP_LIBRARIES)
mark_as_advanced(CGAL_INCLUDE_DIR CGAL_LIBRARIES BOOST_THREAD_LIBRARIES GMP_LIBRARIES)
endif(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES AND BOOST_THREAD_LIBRARIES AND GMP_LIBRARIES)
# Set a default build type if none was specified
set(PGROUTING_DEFULT_BUILD_TYPE "Release")
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
set(PGROUTING_DEFULT_BUILD_TYPE "Debug")
endif()
if (CMAKE_BUILD_TYPE AND
NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}
valid values are Debug|Release|RelWithDebInfo|MinSizeRel")
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${PGROUTING_DEFULT_BUILD_TYPE}' as none was specified.")
set(CMAKE_BUILD_TYPE "${PGROUTING_DEFULT_BUILD_TYPE}" CACHE
STRING "Choose the type of build." FORCE)
endif()
message(STATUS "CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")
#---------------------------------------------
# PGROUTING_SOURCE_NAMES
#---------------------------------------------
#
# Name of the directories that have
# - C/C++ code
# - SQL code
# - documentation code
#
# structure:
#
# directory | code | sql | doc
#
# where:
#
# directory: is the name of the directory
# code: Y / N value, when "Y" C/C++ code will be looked for
# sql: Y / N value, when "Y" SQL code will be looked for
# doc: Y / N value, when "Y" Documentation code will be looked for
#----------------------
configure_file("configuration.conf" "configuration.conf")
file(STRINGS configuration.conf PGROUTING_CONFIGURATION_FILE)
set(PGROUTING_SOURCE_NAMES "")
set(PGROUTING_SQL_DIRECTORIES "")
set(PGROUTING_DOC_DIRECTORIES "")
foreach(line ${PGROUTING_CONFIGURATION_FILE})
string(REGEX REPLACE "^(#).*" "\\1" comment ${line})
if("${comment}" MATCHES "#")
continue()
endif()
string(REGEX REPLACE "^(.*)\\|(.*)\\|(.*)\\|(.*)" "\\1" directory ${line})
string(REGEX REPLACE "^(.*)\\|(.*)\\|(.*)\\|(.*)" "\\2" has_code ${line})
string(REGEX REPLACE "^(.*)\\|(.*)\\|(.*)\\|(.*)" "\\3" has_sql ${line})
string(REGEX REPLACE "^(.*)\\|(.*)\\|(.*)\\|(.*)" "\\4" has_doc ${line})
string(STRIP ${directory} directory)
string(STRIP ${has_code} has_code)
string(STRIP ${has_sql} has_sql)
string(STRIP ${has_doc} has_doc)
if( ${has_code} MATCHES "Y")
list(APPEND PGROUTING_SOURCE_NAMES "${directory}")
endif()
if( ${has_sql} MATCHES "Y")
list(APPEND PGROUTING_SQL_DIRECTORIES "${directory}")
endif()
if( ${has_doc} MATCHES "Y")
list(APPEND PGROUTING_DOC_DIRECTORIES "${directory}")
endif()
endforeach()
if (PGROUTING_DEBUG)
message(STATUS "PGROUTING_SOURCE_NAMES ${PGROUTING_SOURCE_NAMES}")
message(STATUS "PGROUTING_SQL_DIRECTORIES ${PGROUTING_SQL_DIRECTORIES}")
message(STATUS "PGROUTING_DOC_DIRECTORIES ${PGROUTING_DOC_DIRECTORIES}")
endif()
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
# Get the current working branch
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE PGROUTING_GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE PGROUTING_GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the number of commits of the working branch
execute_process(
COMMAND git rev-list HEAD --count
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE PGROUTING_GIT_COMMITS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (SET_VERSION_BRANCH)
file(WRITE "${PGROUTING_SOURCE_DIR}/VERSION" "${PGROUTING_GIT_COMMITS}-${PGROUTING_GIT_HASH} ${SET_VERSION_BRANCH}")
endif()
else()
set(PGROUTING_GIT_HASH "unknown")
endif()
if (PGROUTING_DEBUG)
message(STATUS "PGROUTING_GIT_HASH: ${PGROUTING_GIT_HASH}")
endif()