Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
e01f4924
Unverified
Commit
e01f4924
authored
Sep 21, 2020
by
Henry Schreiner
Committed by
GitHub
Sep 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Add a nice CMake error when Interpreter component is missing. (#2519)
Closes #2515, found by @rhjdjong
parent
5e6ec496
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
tools/pybind11NewTools.cmake
+10
-0
No files found.
tools/pybind11NewTools.cmake
View file @
e01f4924
...
@@ -70,6 +70,16 @@ if(PYBIND11_MASTER_PROJECT)
...
@@ -70,6 +70,16 @@ if(PYBIND11_MASTER_PROJECT)
endif
()
endif
()
endif
()
endif
()
# If a user finds Python, they may forget to include the Interpreter component
# and the following two steps require it. It is highly recommended by CMake
# when finding development libraries anyway, so we will require it.
if
(
NOT DEFINED
${
_Python
}
_EXECUTABLE
)
message
(
FATAL_ERROR
"
${
_Python
}
was found without the Interpreter component. Pybind11 requires this component."
)
endif
()
# Debug check - see https://stackoverflow.com/questions/646518/python-how-to-detect-debug-Interpreter
# Debug check - see https://stackoverflow.com/questions/646518/python-how-to-detect-debug-Interpreter
execute_process
(
execute_process
(
COMMAND
"
${${
_Python
}
_EXECUTABLE
}
"
"-c"
"import sys; sys.exit(hasattr(sys, 'gettotalrefcount'))"
COMMAND
"
${${
_Python
}
_EXECUTABLE
}
"
"-c"
"import sys; sys.exit(hasattr(sys, 'gettotalrefcount'))"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment