Skip to content

Commit

Permalink
Revert "Merge pull request duckdb#9364 from taniabogatsch/increase-cm…
Browse files Browse the repository at this point in the history
…ake-version"

This reverts commit 2646836, reversing
changes made to 7127284.
  • Loading branch information
carlopi committed Oct 27, 2023
1 parent 4acf695 commit 23e1453
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 2.8.12)

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

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set (CMAKE_CXX_STANDARD 11)
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_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down Expand Up @@ -624,7 +629,12 @@ 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 @@ -1084,7 +1094,7 @@ if (NOT "${LOCAL_EXTENSION_REPO}" STREQUAL "")
message(STATUS "Extensions will be deployed to: ${LOCAL_EXTENSION_REPO}")
endif()

if (NOT EXTENSION_CONFIG_BUILD )
if (CMAKE_VERSION VERSION_GREATER "3.0" AND NOT EXTENSION_CONFIG_BUILD ) # this does not work with 2.8
# 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 3.5)
cmake_minimum_required(VERSION 2.8.12)

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 3.5)
cmake_minimum_required(VERSION 2.8.12)

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 3.5)
cmake_minimum_required(VERSION 2.8.12)

project(duckdb_pg_query CXX C)
if(POLICY CMP0063)
Expand Down
3 changes: 2 additions & 1 deletion third_party/re2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# 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.

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

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

0 comments on commit 23e1453

Please sign in to comment.