Skip to content

Commit f8458f3

Browse files
author
Kasper Peeters
committed
Eliminate cmake warnings on more recent cmake versions.
1 parent 6bc02a2 commit f8458f3

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

client_server/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION})
1+
# cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION})
22
project(Cadabra)
33

4+
if(POLICY CMP0167)
5+
cmake_policy(SET CMP0167 NEW)
6+
endif()
47

58
#---------------------------------------------------------------------------
69
# Preamble.

core/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION}) # Required for various macros
1+
# cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION}) # Required for various macros
22
project(Cadabra)
3-
3+
if(POLICY CMP0167)
4+
cmake_policy(SET CMP0167 NEW)
5+
endif()
46

57
#---------------------------------------------------------------------------
68
# Preamble.

frontend/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION})
1+
# cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION})
22
project(Cadabra)
33

44

frontend/gtkmm/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION})
22
project(CadabraGtkmm)
33
include(FetchContent)
44

5+
if(POLICY CMP0167)
6+
cmake_policy(SET CMP0167 NEW)
7+
endif()
8+
59
#---------------------------------------------------------------------------
610
# Preamble.
711
#---------------------------------------------------------------------------

libs/pybind11/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ else()
208208
set(PYBIND11_INSTALL OFF)
209209
endif()
210210

211+
# KP: eventually this policy inheritance will all work, for now set set the policy by hand.
212+
if(POLICY CMP0148)
213+
cmake_policy(SET CMP0148 NEW)
214+
endif()
215+
211216
include("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11Common.cmake")
212217
# https://github.com/jtojnar/cmake-snips/#concatenating-paths-when-building-pkg-config-files
213218
# TODO: cmake 3.20 adds the cmake_path() function, which obsoletes this snippet

0 commit comments

Comments
 (0)