1- set (PACKAGE osm2pgsql)
2- set (PACKAGE_NAME osm2pgsql)
3- set (PACKAGE_VERSION 1.5.1)
41
5- cmake_minimum_required (VERSION 2.8.12 )
2+ cmake_minimum_required (VERSION 3.5.0 )
63
7- project (osm2pgsql)
4+ project (osm2pgsql VERSION 1.5.1 LANGUAGES CXX )
85
96set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
107
@@ -34,7 +31,7 @@ if (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
3431 message (FATAL_ERROR "In-source builds are not allowed, please use a separate build directory like `mkdir build && cd build && cmake ..`" )
3532endif ()
3633
37- message (STATUS "Building osm2pgsql ${PACKAGE_VERSION } " )
34+ message (STATUS "Building osm2pgsql ${PROJECT_VERSION } " )
3835
3936if (NOT CMAKE_BUILD_TYPE )
4037 set (CMAKE_BUILD_TYPE RelWithDebInfo)
@@ -48,13 +45,11 @@ set(CMAKE_CXX_EXTENSIONS OFF)
4845set (CMAKE_CXX_STANDARD_REQUIRED ON )
4946
5047if (MSVC )
51- add_definitions (-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX -wd4996)
48+ add_definitions (-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
49+ add_compile_options (-wd4996)
5250 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099 /STACK:30000000" )
5351else ()
54- add_definitions (-Wall)
55- if (CMAKE_VERSION VERSION_LESS 3.1)
56- add_definitions (-std=c++14)
57- endif ()
52+ add_compile_options (-Wall)
5853endif ()
5954
6055option (EXTERNAL_LIBOSMIUM "Do not use the bundled libosmium" OFF )
@@ -71,10 +66,10 @@ if (NOT WIN32 AND NOT APPLE)
7166 set (PostgreSQL_TYPE_INCLUDE_DIR /usr/include )
7267endif ()
7368
74- set (MINIMUM_POSTGRESQL_SERVER_VERSION "9.3 " )
75- set (MINIMUM_POSTGRESQL_SERVER_VERSION_NUM "90300 " )
69+ set (MINIMUM_POSTGRESQL_SERVER_VERSION "9.5 " )
70+ set (MINIMUM_POSTGRESQL_SERVER_VERSION_NUM "90500 " )
7671
77- set (PostgreSQL_ADDITIONAL_VERSIONS "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3 " )
72+ set (PostgreSQL_ADDITIONAL_VERSIONS "14" " 13" "12" "11" "10" "9.6" "9.5" )
7873
7974#############################################################
8075# Version
@@ -132,7 +127,7 @@ if (BUILD_COVERAGE)
132127 message (STATUS " found" )
133128 endif ()
134129
135- add_definitions (-g -O0 -fno-inline-functions -fno-inline --coverage)
130+ add_compile_options (-g -O0 -fno-inline-functions -fno-inline --coverage)
136131
137132 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage"
138133 CACHE
@@ -190,7 +185,7 @@ endif()
190185
191186include_directories (${CMAKE_CURRENT_SOURCE_DIR} /src ${CMAKE_CURRENT_BINARY_DIR} )
192187
193- find_package (Osmium 2.17.0 REQUIRED COMPONENTS io)
188+ find_package (Osmium 2.17.2 REQUIRED COMPONENTS io)
194189include_directories (SYSTEM ${OSMIUM_INCLUDE_DIRS} ${PROTOZERO_INCLUDE_DIR} ${FMT_INCLUDE_DIR} ${RAPIDJSON_INCLUDE_DIR} )
195190
196191if (WITH_LUA)
@@ -297,7 +292,7 @@ target_link_libraries(osm2pgsql osm2pgsql_lib ${LIBS})
297292
298293message (STATUS "Looking for clang-tidy" )
299294find_program (CLANG_TIDY
300- NAMES clang-tidy clang-tidy-12 clang-tidy-11 clang-tidy-10 clang-tidy-9 clang-tidy-8 clang-tidy-7 )
295+ NAMES clang-tidy clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11 )
301296
302297if (CLANG_TIDY)
303298 message (STATUS "Looking for clang-tidy - found ${CLANG_TIDY} " )
0 commit comments