Skip to content

Commit

Permalink
Merge branch 'cmake-3.29' into 'master'
Browse files Browse the repository at this point in the history
[cmake] 3.29 updates

See merge request ogs/ogs!4959
  • Loading branch information
bilke committed Mar 22, 2024
2 parents 3eec2a8 + c9c01ea commit 93e6a9e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# ---- OGS-6 Project ----
cmake_minimum_required(VERSION 3.22)

if(CMAKE_VERSION GREATER_EQUAL 3.29)
cmake_policy(SET CMP0156 NEW)
endif()

project(OGS-6)

option(OGS_BUILD_WHEEL "Build Python wheels of OGS" OFF)
Expand Down
5 changes: 3 additions & 2 deletions scripts/cmake/CompilerSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL)
is required! Found version ${CMAKE_CXX_COMPILER_VERSION}. Update Xcode!"
)
endif()
# TODO: remove after CMake 3.29 is out:
# https://gitlab.kitware.com/cmake/cmake/-/issues/25297
add_link_options(LINKER:-no_warn_duplicate_libraries)
if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 15 AND CMAKE_VERSION LESS 3.29)
add_link_options(LINKER:-no_warn_duplicate_libraries)
endif()
else()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS
${ogs.minimum_version.clang}
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if(GUIX_BUILD)
else()
CPMAddPackage(
NAME tetgen GITHUB_REPOSITORY ufz/tetgen
GIT_TAG 603ba181ebfaed38eec88532720e282606009b73
GIT_TAG 213548f5bca1ec00269603703f0fec1272181587
)
if(tetgen_ADDED)
install(PROGRAMS $<TARGET_FILE:tetgen> DESTINATION bin)
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/json-cmake/JSONParser.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.5)

if (DEFINED JSonParserGuard)
return()
Expand Down

0 comments on commit 93e6a9e

Please sign in to comment.