File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Adds the following functions::
20
20
#]======================================================]
21
21
22
22
# CMake 3.10 has an include_guard command, but we can't use that yet
23
+ # include_guard(global) (pre-CMake 3.10)
23
24
if (TARGET pybind11::lto )
24
25
return ()
25
26
endif ()
Original file line number Diff line number Diff line change 5
5
# All rights reserved. Use of this source code is governed by a
6
6
# BSD-style license that can be found in the LICENSE file.
7
7
8
+ if (CMAKE_VERSION VERSION_LESS 3.12 )
9
+ message (FATAL_ERROR "You cannot use the new FindPython module with CMake < 3.12" )
10
+ endif ()
11
+
12
+ include_guard (GLOBAL )
13
+
8
14
get_property (
9
15
is_config
10
16
TARGET pybind11::headers
@@ -16,10 +22,6 @@ else()
16
22
set (_pybind11_quiet "" )
17
23
endif ()
18
24
19
- if (CMAKE_VERSION VERSION_LESS 3.12 )
20
- message (FATAL_ERROR "You cannot use the new FindPython module with CMake < 3.12" )
21
- endif ()
22
-
23
25
if (NOT Python_FOUND
24
26
AND NOT Python3_FOUND
25
27
AND NOT Python2_FOUND )
Original file line number Diff line number Diff line change 5
5
# All rights reserved. Use of this source code is governed by a
6
6
# BSD-style license that can be found in the LICENSE file.
7
7
8
+ # include_guard(global) (pre-CMake 3.10)
9
+ if (TARGET pybind11::python_headers )
10
+ return ()
11
+ endif ()
12
+
8
13
# Built-in in CMake 3.5+
9
14
include (CMakeParseArguments )
10
15
You can’t perform that action at this time.
0 commit comments