File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ Adds the following functions::
18
18
19
19
#]======================================================]
20
20
21
- include_guard (GLOBAL )
22
-
23
21
# If we are in subdirectory mode, all IMPORTED targets must be GLOBAL. If we
24
22
# are in CONFIG mode, they should be "normal" targets instead.
25
23
# In CMake 3.11+ you can promote a target to global after you create it,
@@ -28,8 +26,13 @@ get_property(
28
26
is_config
29
27
TARGET pybind11::headers
30
28
PROPERTY IMPORTED )
29
+
31
30
if (NOT is_config )
31
+ include_guard (GLOBAL )
32
32
set (optional_global GLOBAL )
33
+ else ()
34
+ include_guard (DIRECTORY )
35
+ set (optional_global "" )
33
36
endif ()
34
37
35
38
# If not run in Python mode, we still would like this to at least
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 )
8
+ include_guard (DIRECTORY )
9
9
10
10
if (pybind11_FIND_QUIETLY )
11
11
set (_pybind11_quiet QUIET )
You can’t perform that action at this time.
0 commit comments