Skip to content

Commit 210e926

Browse files
committed
raise the minimum required CMake version to 3.10
1 parent eba37d3 commit 210e926

File tree

2 files changed

+4
-74
lines changed

2 files changed

+4
-74
lines changed

CMake/Mathematica/FindMathematica.cmake

Lines changed: 3 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# See the FindMathematica manual for usage hints.
44
#
55
#=============================================================================
6-
# Copyright 2010-2024 Sascha Kratky
6+
# Copyright 2010-2025 Sascha Kratky
77
#
88
# Permission is hereby granted, free of charge, to any person)
99
# obtaining a copy of this software and associated documentation)
@@ -28,80 +28,10 @@
2828
#=============================================================================
2929

3030
# we need the CMakeParseArguments module
31-
# call cmake_minimum_required, but prevent modification of the CMake policy stack
32-
cmake_policy(PUSH)
33-
cmake_minimum_required(VERSION 3.5.0)
34-
cmake_policy(POP)
31+
cmake_minimum_required(VERSION 3.10..3.31)
3532

3633
set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
37-
set (Mathematica_CMAKE_MODULE_VERSION "4.0.0")
38-
39-
# activate select policies
40-
if (POLICY CMP0025)
41-
# Compiler id for Apple Clang is now AppleClang
42-
cmake_policy(SET CMP0025 NEW)
43-
endif()
44-
45-
if (POLICY CMP0026)
46-
# disallow use of the LOCATION target property
47-
if (CYGWIN OR MSYS)
48-
# Cygwin and MSYS do not produce workable Mathematica paths using
49-
# the $<TARGET_FILE:...> notation
50-
cmake_policy(SET CMP0026 OLD)
51-
else()
52-
cmake_policy(SET CMP0026 NEW)
53-
endif()
54-
endif()
55-
56-
if (POLICY CMP0038)
57-
# targets may not link directly to themselves
58-
cmake_policy(SET CMP0038 NEW)
59-
endif()
60-
61-
if (POLICY CMP0039)
62-
# utility targets may not have link dependencies
63-
cmake_policy(SET CMP0039 NEW)
64-
endif()
65-
66-
if (POLICY CMP0040)
67-
# target in the TARGET signature of add_custom_command() must exist
68-
cmake_policy(SET CMP0040 NEW)
69-
endif()
70-
71-
if (POLICY CMP0045)
72-
# error on non-existent target in get_target_property
73-
cmake_policy(SET CMP0045 NEW)
74-
endif()
75-
76-
if (POLICY CMP0046)
77-
# error on non-existent dependency in add_dependencies
78-
cmake_policy(SET CMP0046 NEW)
79-
endif()
80-
81-
if (POLICY CMP0049)
82-
# do not expand variables in target source entries
83-
cmake_policy(SET CMP0049 NEW)
84-
endif()
85-
86-
if (POLICY CMP0050)
87-
# disallow add_custom_command SOURCE signatures
88-
cmake_policy(SET CMP0050 NEW)
89-
endif()
90-
91-
if (POLICY CMP0051)
92-
# include TARGET_OBJECTS expressions in a target's SOURCES property
93-
cmake_policy(SET CMP0051 NEW)
94-
endif()
95-
96-
if (POLICY CMP0053)
97-
# simplify variable reference and escape sequence evaluation
98-
cmake_policy(SET CMP0053 NEW)
99-
endif()
100-
101-
if (POLICY CMP0054)
102-
# only interpret if() arguments as variables or keywords when unquoted
103-
cmake_policy(SET CMP0054 NEW)
104-
endif()
34+
set (Mathematica_CMAKE_MODULE_VERSION "4.1.0")
10535

10636
include(TestBigEndian)
10737
include(CMakeParseArguments)

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FindMathematica example project
22

3-
cmake_minimum_required(VERSION 3.5.0)
3+
cmake_minimum_required(VERSION 3.10..3.31)
44

55
project (Mathematica-project)
66

0 commit comments

Comments
 (0)