Skip to content

Commit

Permalink
Merge pull request duckdb#9364 from taniabogatsch/increase-cmake-version
Browse files Browse the repository at this point in the history
Increase the minimum cmake version to 3.5
  • Loading branch information
Mytherin authored Oct 17, 2023
2 parents 7127284 + c2d4e55 commit 2646836
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
16 changes: 3 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)

if(POLICY CMP0026)
cmake_policy(SET CMP0026 NEW)
Expand All @@ -22,12 +22,7 @@ find_package(Threads REQUIRED)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if (CMAKE_VERSION VERSION_LESS "3.1")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()

set (CMAKE_CXX_STANDARD 11)

set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down Expand Up @@ -629,12 +624,7 @@ function(link_extension_libraries LIBRARY)
endfunction()

function(link_threads LIBRARY)
if (CMAKE_VERSION VERSION_LESS "3.1")
target_link_libraries(${LIBRARY} pthread)

else()
target_link_libraries(${LIBRARY} Threads::Threads)
endif()
endfunction()

function(build_loadable_extension_directory NAME OUTPUT_DIRECTORY PARAMETERS)
Expand Down Expand Up @@ -1094,7 +1084,7 @@ if (NOT "${LOCAL_EXTENSION_REPO}" STREQUAL "")
message(STATUS "Extensions will be deployed to: ${LOCAL_EXTENSION_REPO}")
endif()

if (CMAKE_VERSION VERSION_GREATER "3.0" AND NOT EXTENSION_CONFIG_BUILD ) # this does not work with 2.8
if (NOT EXTENSION_CONFIG_BUILD )
# Write the export set for build and install tree
install(EXPORT "${DUCKDB_EXPORT_SET}" DESTINATION "${INSTALL_CMAKE_DIR}")
export(EXPORT "${DUCKDB_EXPORT_SET}"
Expand Down
2 changes: 1 addition & 1 deletion extension/parquet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)

project(ParquetExtension)

Expand Down
2 changes: 1 addition & 1 deletion third_party/imdb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)

if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
Expand Down
2 changes: 1 addition & 1 deletion third_party/libpg_query/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)

project(duckdb_pg_query CXX C)
if(POLICY CMP0063)
Expand Down
3 changes: 1 addition & 2 deletions third_party/re2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright 2015 The RE2 Authors. All Rights Reserved. Use of this source code
# is governed by a BSD-style license that can be found in the LICENSE file.

# Old enough to support Ubuntu Trusty.
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)

if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
Expand Down

0 comments on commit 2646836

Please sign in to comment.