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
c91551b3
Commit
c91551b3
authored
Feb 07, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved python detection in CMakeLists.txt (fixes #98)
parent
1f7a8096
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
CMakeLists.txt
+2
-0
docs/cmake.rst
+3
-0
No files found.
CMakeLists.txt
View file @
c91551b3
...
...
@@ -34,6 +34,8 @@ if (NOT ${PYBIND11_PYTHON_VERSION} STREQUAL "")
else
()
find_package
(
PythonLibs REQUIRED
)
endif
()
# The above sometimes returns version numbers like "3.4.3+"; the "+" must be removed for the next line to work
string
(
REPLACE
"+"
""
PYTHONLIBS_VERSION_STRING
"+
${
PYTHONLIBS_VERSION_STRING
}
"
)
find_package
(
PythonInterp
${
PYTHONLIBS_VERSION_STRING
}
EXACT REQUIRED
)
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
OR CMAKE_CXX_COMPILER_ID MATCHES
"GNU"
)
...
...
docs/cmake.rst
View file @
c91551b3
...
...
@@ -38,6 +38,9 @@ and that the pybind11 repository is located in a subdirectory named :file:`pybin
find_package(PythonLibs REQUIRED)
endif()
# The above sometimes returns version numbers like "3.4.3+"; the "+" must be removed for the next lines to work
string(REPLACE "+" "" PYTHONLIBS_VERSION_STRING "+${PYTHONLIBS_VERSION_STRING}")
# Uncomment the following line if you will also require a matching Python interpreter
# find_package(PythonInterp ${PYTHONLIBS_VERSION_STRING} EXACT REQUIRED)
...
...
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