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
ed6de125
Commit
ed6de125
authored
Aug 01, 2020
by
Henry Schreiner
Committed by
Henry Schreiner
Aug 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format: include .in files
parent
da803eb0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
15 deletions
+37
-15
.pre-commit-config.yaml
+3
-1
tools/FindPythonLibsNew.cmake
+2
-1
tools/cmake_uninstall.cmake.in
+3
-3
tools/pybind11Config.cmake.in
+29
-10
No files found.
.pre-commit-config.yaml
View file @
ed6de125
...
@@ -27,10 +27,12 @@ repos:
...
@@ -27,10 +27,12 @@ repos:
exclude
:
^(docs/.*|tools/.*)$
exclude
:
^(docs/.*|tools/.*)$
-
repo
:
https://github.com/cheshirekow/cmake-format-precommit
-
repo
:
https://github.com/cheshirekow/cmake-format-precommit
rev
:
v0.6.1
0
rev
:
v0.6.1
1
hooks
:
hooks
:
-
id
:
cmake-format
-
id
:
cmake-format
additional_dependencies
:
[
pyyaml
]
additional_dependencies
:
[
pyyaml
]
types
:
[
file
]
files
:
(\.cmake|CMakeLists.txt)(.in)?$
-
repo
:
local
-
repo
:
local
hooks
:
hooks
:
...
...
tools/FindPythonLibsNew.cmake
View file @
ed6de125
...
@@ -191,7 +191,8 @@ else()
...
@@ -191,7 +191,8 @@ else()
find_library
(
find_library
(
PYTHON_LIBRARY
PYTHON_LIBRARY
NAMES
"python
${
PYTHON_LIBRARY_SUFFIX
}
"
NAMES
"python
${
PYTHON_LIBRARY_SUFFIX
}
"
PATHS
${
_PYTHON_LIBS_SEARCH
}
NO_DEFAULT_PATH
)
PATHS
${
_PYTHON_LIBS_SEARCH
}
NO_DEFAULT_PATH
)
# If all else fails, just set the name/version and let the linker figure out the path.
# If all else fails, just set the name/version and let the linker figure out the path.
if
(
NOT PYTHON_LIBRARY
)
if
(
NOT PYTHON_LIBRARY
)
...
...
tools/cmake_uninstall.cmake.in
View file @
ed6de125
...
@@ -10,10 +10,10 @@ foreach(file ${files})
...
@@ -10,10 +10,10 @@ foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
"@CMAKE_COMMAND@" ARGS
"-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
RETURN_VALUE rm_retval)
)
if(NOT "${rm_retval}" STREQUAL 0)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
endif()
...
...
tools/pybind11Config.cmake.in
View file @
ed6de125
...
@@ -72,7 +72,6 @@ set(pybind11_VERSION_TYPE "@pybind11_VERSION_TYPE@")
...
@@ -72,7 +72,6 @@ set(pybind11_VERSION_TYPE "@pybind11_VERSION_TYPE@")
check_required_components(pybind11)
check_required_components(pybind11)
include("${CMAKE_CURRENT_LIST_DIR}/pybind11Tools.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/pybind11Tools.cmake")
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
...
@@ -86,15 +85,35 @@ if(NOT TARGET pybind11::pybind11)
...
@@ -86,15 +85,35 @@ if(NOT TARGET pybind11::pybind11)
find_package(PythonLibsNew ${PYBIND11_PYTHON_VERSION} MODULE REQUIRED)
find_package(PythonLibsNew ${PYBIND11_PYTHON_VERSION} MODULE REQUIRED)
list(REMOVE_AT CMAKE_MODULE_PATH -1)
list(REMOVE_AT CMAKE_MODULE_PATH -1)
set_property(TARGET pybind11::pybind11 APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
set_property(
set_property(TARGET pybind11::pybind11 APPEND PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
TARGET pybind11::pybind11
APPEND
set_property(TARGET pybind11::embed APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIBRARIES})
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
set_property(TARGET pybind11::module APPEND PROPERTY INTERFACE_LINK_LIBRARIES
set_property(
"$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:Cygwin>>:$<BUILD_INTERFACE:${PYTHON_LIBRARIES}>>")
TARGET pybind11::pybind11
APPEND
get_property(_iid TARGET pybind11::pybind11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
get_property(_ill TARGET pybind11::module PROPERTY INTERFACE_LINK_LIBRARIES)
set_property(
TARGET pybind11::embed
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIBRARIES})
set_property(
TARGET pybind11::module
APPEND
PROPERTY
INTERFACE_LINK_LIBRARIES
"$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:Cygwin>>:$<BUILD_INTERFACE:${PYTHON_LIBRARIES}>>"
)
get_property(
_iid
TARGET pybind11::pybind11
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(
_ill
TARGET pybind11::module
PROPERTY INTERFACE_LINK_LIBRARIES)
set(pybind11_INCLUDE_DIRS ${_iid})
set(pybind11_INCLUDE_DIRS ${_iid})
set(pybind11_LIBRARIES ${_ico} ${_ill})
set(pybind11_LIBRARIES ${_ico} ${_ill})
...
...
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