Skip to content

Commit 2b41355

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into bipashabg-2025
2 parents b1d1190 + dee03ee commit 2b41355

File tree

7 files changed

+127
-186
lines changed

7 files changed

+127
-186
lines changed

.clang-tidy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Checks: >
2+
google-*,
3+
-google-readability-braces-around-statements,
4+
-google-readability-casting,
5+
clang-analyzer-*,
6+
clang-diagnostic-*,
7+
cppcoreguidelines-avoid-capturing-lambda-coroutines,
8+
cppcoreguidelines-avoid-goto,
9+
cppcoreguidelines-avoid-non-const-global-variables,
10+
cppcoreguidelines-avoid-reference-coroutine-parameters
11+
12+
WarningsAsErrors: ''
13+
HeaderFilterRegex: './include'
14+
FormatStyle: none
15+
InheritParentConfig: true

.github/scripts/tidy-vs-commit.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/clang.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ jobs:
8989
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
9090
mkdir build
9191
cd build
92-
CXX=clang++ CC=clang cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug -DWITH_DOC=OFF ..
92+
CXX=clang++ CC=clang cmake -DPOSTGRESQL_VERSION=${PGVER} \
93+
-DCMAKE_BUILD_TYPE=Debug -DBUILD_HTML=OFF -DBUILD_DOXY=OFF \
94+
-DUSE_CLANG_TIDY=ON ..
9395
9496
- name: Build
9597
run: |

.github/workflows/tidy-check.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 33 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -98,49 +98,56 @@ if(WIN32 AND MSVC)
9898
set(CMAKE_CXX_FLAGS "")
9999
endif()
100100

101-
#-----------------------------------------------------------------------------
102-
#-----------------------------------------------------------------------------
103-
# C/C++ Compiler requirements
104-
#-----------------------------------------------------------------------------
105-
#-----------------------------------------------------------------------------
101+
#---------------------------------------------
102+
# Boost
103+
#---------------------------------------------
106104

107105
find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED)
108106
if (NOT Boost_VERSION_MACRO)
109107
set(Boost_VERSION_MACRO ${Boost_VERSION})
110108
endif()
111109
set(BOOST_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
110+
add_definitions(-DBOOST_ALLOW_DEPRECATED_HEADERS)
112111

113-
include(CheckCCompilerFlag)
114-
include(CheckCXXCompilerFlag)
115-
if (BOOST_VERSION VERSION_LESS "1.75.0")
116-
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
117-
if(COMPILER_SUPPORTS_CXX11)
118-
set(CMAKE_CXX_STANDARD 11)
119-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
120-
set(CMAKE_CXX_EXTENSIONS OFF)
112+
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
113+
114+
#---------------------------------------------
115+
# Clang tidy
116+
#---------------------------------------------
117+
118+
option(USE_CLANG_TIDY "Use clang-tidy." OFF)
119+
120+
if(USE_CLANG_TIDY)
121+
find_program(CLANG_TIDY_COMMAND NAMES clang-tidy NO_CACHE)
122+
if (CLANG_TIDY_COMMAND)
123+
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND};--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy")
121124
else()
122-
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
123-
if(COMPILER_SUPPORTS_CXX0X)
124-
add_compile_options("-std=c++0x")
125-
message(STATUS "Using -std=c++0x.")
126-
else()
127-
message(WARNING "The compiler ${CMAKE_CXX_COMPILER} has no C++0x or C++11 flags support.
128-
Using: callback compiler's standard")
129-
endif()
125+
message(WARNING "Set to use clang_tidy, but not found.")
130126
endif()
131-
else()
132-
set(CMAKE_CXX_STANDARD 14)
133127
endif()
134128

135-
add_definitions(-DBOOST_ALLOW_DEPRECATED_HEADERS)
129+
#-----------------------------------------------------------------------------
130+
# C/C++ Compiler requirements
131+
#-----------------------------------------------------------------------------
132+
133+
include(CheckCCompilerFlag)
134+
include(CheckCXXCompilerFlag)
135+
136+
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard version to use (minimum requirement is c++17)")
137+
136138
set(COMPILER_VERSION "${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}")
137139

140+
#-----------------------------------------------------------------------------
141+
# C++ language version and compilation flags
142+
#-----------------------------------------------------------------------------
143+
message(STATUS "pgRouting: Require C++${CMAKE_CXX_STANDARD}")
144+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
145+
set(CMAKE_CXX_EXTENSIONS OFF)
138146

139147
#---------------------------------------------
140148
# Windows compiler flags
141149
#---------------------------------------------
142150

143-
144151
if(WIN32 AND NOT MSVC)
145152
set(OS_BUILD $ENV{OS_BUILD})
146153
if(NOT OS_BUILD)
@@ -169,23 +176,11 @@ if(WIN32 AND MSVC)
169176
-EHsc)
170177
endif()
171178

172-
#-----------------------------------------------------------------------------
173-
#-----------------------------------------------------------------------------
174179
#-----------------------------------------------------------------------------
175180
# Finding prerequisites
176181
#-----------------------------------------------------------------------------
177-
#-----------------------------------------------------------------------------
178-
#-----------------------------------------------------------------------------
179182

180-
#---------------------------------------------
181-
#---------------------------------------------
182-
# Perl
183-
#---------------------------------------------
184-
#---------------------------------------------
185-
include(FindPerl)
186-
if(NOT PERL_EXECUTABLE)
187-
message(FATAL_ERROR "perl NOT FOUND - Please check your Perl installation.")
188-
endif()
183+
find_package(Perl REQUIRED)
189184

190185
#---------------------------------------------
191186
#---------------------------------------------
@@ -224,16 +219,6 @@ endif()
224219
add_definitions(-DPGSQL_VERSION=${PGSQL_VERSION})
225220
message(STATUS "PGSQL_VERSION=${PGSQL_VERSION}")
226221

227-
228-
#---------------------------------------------
229-
#---------------------------------------------
230-
# Boost
231-
#---------------------------------------------
232-
#---------------------------------------------
233-
234-
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
235-
236-
237222
#---------------------------------------------
238223
if (PROJECT_DEBUG)
239224
message(STATUS "PERL_VERSION_STRING = ${PERL_VERSION_STRING}")

NEWS.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,43 @@ To see all issues & pull requests closed by this release see the
1313
[#4.0.0](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%204.0.0%22)
1414

1515

16+
Build
17+
18+
* C++ standard is std17
19+
20+
* Using this standard all versions of will work
21+
* The code is not yet modified to use std17:
22+
23+
* If needed: ``-DCMAKE_CXX_STANDARD=14`` to lower the standard.
24+
25+
* The user's documentation is build by default
26+
* The doxygen documentation is build by default
27+
28+
For developers:
29+
30+
* Set `-DUSE_CLANG_TIDY=ON` for clang tidy checks.
31+
* Tidy checks are done on CI.
32+
33+
Documentation build
34+
35+
* The doxygen documentation is build by default
36+
* The HTML documentation is build by default
37+
* The translated languages (en, es, zh_Hans) HTML documentation is build by default
38+
* `WITH-DOC` is not used anymore
39+
40+
User's Documentation is not build when
41+
42+
* Sphinx is not found
43+
* When all Sphinx formats are OFF
44+
* When all languages are OFF
45+
* Documentation output changed location to [build/doc/_build/](format) directory
46+
47+
* For example: for HTML output is on `build/doc/_build/html` directory
48+
49+
Developers's Documentation is not build when
50+
51+
* Doxygen is not found
52+
1653
Summary of changes by function
1754

1855
* pgr_aStar
@@ -454,25 +491,6 @@ Summary of functions and signatures no longer on pgrouting
454491
* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withpoints(text,text,text,boolean,character,boolean)
455492
* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withpointsvia(text,text,anyarray,boolean,boolean,boolean,character,boolean)
456493

457-
Documentation build
458-
459-
WITH-DOC is not used anymore
460-
461-
* The doxygen documentation is build by default
462-
* The HTML documentation is build by default
463-
* The translated languages (en, es, zh_Hans) HTML documentation is build by default
464-
465-
User's Documentation is not build when
466-
467-
* Sphinx is not found
468-
* When all Sphinx formats are OFF
469-
* When all languages are OFF
470-
* Output is on build/doc/_build/<format> directory
471-
472-
Developers's Documentation is not build when
473-
474-
* Doxygen is not found
475-
476494
Code enhancements
477495

478496
* Removal of unused C/C++ code

doc/src/release_notes.rst

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,45 @@ To see all issues & pull requests closed by this release see the
4646
:local:
4747
:depth: 1
4848

49+
Build
50+
...............................................................................
51+
52+
* C++ standard is std17
53+
54+
* Using this standard all versions of boost will work
55+
* The code is not yet modified to use std17:
56+
57+
* If needed: ``-DCMAKE_CXX_STANDARD=14`` to lower the standard.
58+
59+
* The user's documentation is build by default
60+
* The doxygen documentation is build by default
61+
62+
For developers:
63+
64+
* Set `-DUSE_CLANG_TIDY=ON` for clang tidy checks.
65+
* Tidy checks are done on CI.
66+
67+
Documentation build
68+
...............................................................................
69+
70+
* The doxygen documentation is build by default
71+
* The HTML documentation is build by default
72+
* The translated languages (en, es, zh_Hans) HTML documentation is build by default
73+
* `WITH-DOC` is not used anymore
74+
75+
User's Documentation is not build when
76+
77+
* Sphinx is not found
78+
* When all Sphinx formats are OFF
79+
* When all languages are OFF
80+
* Documentation output changed location to `build/doc/_build/<format>` directory
81+
82+
* For example: for HTML output is on `build/doc/_build/html` directory
83+
84+
Developers's Documentation is not build when
85+
86+
* Doxygen is not found
87+
4988
Summary of changes by function
5089
...............................................................................
5190

@@ -524,26 +563,6 @@ Summary of functions and signatures no longer on pgrouting
524563
* :issue:`2919` pgr_withpoints(text,text,text,boolean,character,boolean)
525564
* :issue:`2919` pgr_withpointsvia(text,text,anyarray,boolean,boolean,boolean,character,boolean)
526565

527-
Documentation build
528-
...............................................................................
529-
530-
WITH-DOC is not used anymore
531-
532-
* The doxygen documentation is build by default
533-
* The HTML documentation is build by default
534-
* The translated languages (en, es, zh_Hans) HTML documentation is build by default
535-
536-
User's Documentation is not build when
537-
538-
* Sphinx is not found
539-
* When all Sphinx formats are OFF
540-
* When all languages are OFF
541-
* Output is on build/doc/_build/<format> directory
542-
543-
Developers's Documentation is not build when
544-
545-
* Doxygen is not found
546-
547566
Code enhancements
548567
...............................................................................
549568

0 commit comments

Comments
 (0)