[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require cmake 3.10 or newer #3724

Merged
merged 1 commit into from
Jan 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Require cmake 3.10 or newer
CMakeLists.txt uses TREE (supported since cmake 3.8) and
check_ipo_supported (supported since cmake 3.9).

Require 3.10 which is provided by Ubuntu bionic and newer distributions.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jan 16, 2022
commit 1c1e25fc9a93439862cd66e0b62af0fa7dd6b60b
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# ##############################################################################

cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)

# In-source builds are disabled.
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
Expand Down Expand Up @@ -292,9 +292,7 @@ if(OPENMP_BUILD)
if(OpenMP_FOUND)
message(">> OpenMP_FOUND ${OpenMP_FOUND} ${OpenMP_VERSION}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if(${CMAKE_VERSION} VERSION_LESS "3.9.0")
add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
endif()
add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
endif()
# https://stackoverflow.com/questions/12399422
# how-to-set-linker-flags-for-openmp-in-cmakes-try-compile-function
Expand Down