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
c14b1933
Unverified
Commit
c14b1933
authored
Jul 28, 2021
by
Henry Schreiner
Committed by
GitHub
Jul 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: increase CMake upper limit (#3124)
parent
b72ca7d1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
14 deletions
+23
-14
.github/workflows/configure.yml
+1
-1
CMakeLists.txt
+3
-3
tests/CMakeLists.txt
+2
-2
tests/test_cmake_build/installed_embed/CMakeLists.txt
+4
-2
tests/test_cmake_build/installed_function/CMakeLists.txt
+2
-1
tests/test_cmake_build/installed_target/CMakeLists.txt
+2
-1
tests/test_cmake_build/subdirectory_embed/CMakeLists.txt
+4
-2
tests/test_cmake_build/subdirectory_function/CMakeLists.txt
+2
-1
tests/test_cmake_build/subdirectory_target/CMakeLists.txt
+2
-1
tests/test_embed/CMakeLists.txt
+1
-0
No files found.
.github/workflows/configure.yml
View file @
c14b1933
...
@@ -18,7 +18,7 @@ jobs:
...
@@ -18,7 +18,7 @@ jobs:
matrix
:
matrix
:
runs-on
:
[
ubuntu-latest
,
macos-latest
,
windows-latest
]
runs-on
:
[
ubuntu-latest
,
macos-latest
,
windows-latest
]
arch
:
[
x64
]
arch
:
[
x64
]
cmake
:
[
3.18
]
cmake
:
[
"
3.21"
]
include
:
include
:
-
runs-on
:
ubuntu-latest
-
runs-on
:
ubuntu-latest
...
...
CMakeLists.txt
View file @
c14b1933
...
@@ -7,13 +7,13 @@
...
@@ -7,13 +7,13 @@
cmake_minimum_required
(
VERSION 3.4
)
cmake_minimum_required
(
VERSION 3.4
)
# The `cmake_minimum_required(VERSION 3.4...3.
18
)` syntax does not work with
# The `cmake_minimum_required(VERSION 3.4...3.
21
)` syntax does not work with
# some versions of VS that have a patched CMake 3.11. This forces us to emulate
# some versions of VS that have a patched CMake 3.11. This forces us to emulate
# the behavior using the following workaround:
# the behavior using the following workaround:
if
(
${
CMAKE_VERSION
}
VERSION_LESS 3.
18
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS 3.
21
)
cmake_policy
(
VERSION
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
)
cmake_policy
(
VERSION
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
)
else
()
else
()
cmake_policy
(
VERSION 3.
18
)
cmake_policy
(
VERSION 3.
21
)
endif
()
endif
()
# Extract project version from source
# Extract project version from source
...
...
tests/CMakeLists.txt
View file @
c14b1933
...
@@ -10,10 +10,10 @@ cmake_minimum_required(VERSION 3.4)
...
@@ -10,10 +10,10 @@ cmake_minimum_required(VERSION 3.4)
# The `cmake_minimum_required(VERSION 3.4...3.18)` syntax does not work with
# The `cmake_minimum_required(VERSION 3.4...3.18)` syntax does not work with
# some versions of VS that have a patched CMake 3.11. This forces us to emulate
# some versions of VS that have a patched CMake 3.11. This forces us to emulate
# the behavior using the following workaround:
# the behavior using the following workaround:
if
(
${
CMAKE_VERSION
}
VERSION_LESS 3.
18
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS 3.
21
)
cmake_policy
(
VERSION
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
)
cmake_policy
(
VERSION
${
CMAKE_MAJOR_VERSION
}
.
${
CMAKE_MINOR_VERSION
}
)
else
()
else
()
cmake_policy
(
VERSION 3.
18
)
cmake_policy
(
VERSION 3.
21
)
endif
()
endif
()
# Only needed for CMake < 3.5 support
# Only needed for CMake < 3.5 support
...
...
tests/test_cmake_build/installed_embed/CMakeLists.txt
View file @
c14b1933
...
@@ -22,5 +22,7 @@ set_target_properties(test_installed_embed PROPERTIES OUTPUT_NAME test_cmake_bui
...
@@ -22,5 +22,7 @@ set_target_properties(test_installed_embed PROPERTIES OUTPUT_NAME test_cmake_bui
# This may be needed to resolve header conflicts, e.g. between Python release and debug headers.
# This may be needed to resolve header conflicts, e.g. between Python release and debug headers.
set_target_properties
(
test_installed_embed PROPERTIES NO_SYSTEM_FROM_IMPORTED ON
)
set_target_properties
(
test_installed_embed PROPERTIES NO_SYSTEM_FROM_IMPORTED ON
)
add_custom_target
(
check_installed_embed $<TARGET_FILE:test_installed_embed>
add_custom_target
(
${
PROJECT_SOURCE_DIR
}
/../test.py
)
check_installed_embed
$<TARGET_FILE:test_installed_embed>
${
PROJECT_SOURCE_DIR
}
/../test.py
DEPENDS test_installed_embed
)
tests/test_cmake_build/installed_function/CMakeLists.txt
View file @
c14b1933
...
@@ -35,4 +35,5 @@ add_custom_target(
...
@@ -35,4 +35,5 @@ add_custom_target(
PYTHONPATH=$<TARGET_FILE_DIR:test_installed_function>
PYTHONPATH=$<TARGET_FILE_DIR:test_installed_function>
${
_Python_EXECUTABLE
}
${
_Python_EXECUTABLE
}
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_NAME
}
)
${
PROJECT_NAME
}
DEPENDS test_installed_function
)
tests/test_cmake_build/installed_target/CMakeLists.txt
View file @
c14b1933
...
@@ -42,4 +42,5 @@ add_custom_target(
...
@@ -42,4 +42,5 @@ add_custom_target(
PYTHONPATH=$<TARGET_FILE_DIR:test_installed_target>
PYTHONPATH=$<TARGET_FILE_DIR:test_installed_target>
${
_Python_EXECUTABLE
}
${
_Python_EXECUTABLE
}
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_NAME
}
)
${
PROJECT_NAME
}
DEPENDS test_installed_target
)
tests/test_cmake_build/subdirectory_embed/CMakeLists.txt
View file @
c14b1933
...
@@ -23,8 +23,10 @@ add_executable(test_subdirectory_embed ../embed.cpp)
...
@@ -23,8 +23,10 @@ add_executable(test_subdirectory_embed ../embed.cpp)
target_link_libraries
(
test_subdirectory_embed PRIVATE pybind11::embed
)
target_link_libraries
(
test_subdirectory_embed PRIVATE pybind11::embed
)
set_target_properties
(
test_subdirectory_embed PROPERTIES OUTPUT_NAME test_cmake_build
)
set_target_properties
(
test_subdirectory_embed PROPERTIES OUTPUT_NAME test_cmake_build
)
add_custom_target
(
check_subdirectory_embed $<TARGET_FILE:test_subdirectory_embed>
add_custom_target
(
"
${
PROJECT_SOURCE_DIR
}
/../test.py"
)
check_subdirectory_embed
$<TARGET_FILE:test_subdirectory_embed>
"
${
PROJECT_SOURCE_DIR
}
/../test.py"
DEPENDS test_subdirectory_embed
)
# Test custom export group -- PYBIND11_EXPORT_NAME
# Test custom export group -- PYBIND11_EXPORT_NAME
add_library
(
test_embed_lib ../embed.cpp
)
add_library
(
test_embed_lib ../embed.cpp
)
...
...
tests/test_cmake_build/subdirectory_function/CMakeLists.txt
View file @
c14b1933
...
@@ -31,4 +31,5 @@ add_custom_target(
...
@@ -31,4 +31,5 @@ add_custom_target(
PYTHONPATH=$<TARGET_FILE_DIR:test_subdirectory_function>
PYTHONPATH=$<TARGET_FILE_DIR:test_subdirectory_function>
${
_Python_EXECUTABLE
}
${
_Python_EXECUTABLE
}
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_NAME
}
)
${
PROJECT_NAME
}
DEPENDS test_subdirectory_function
)
tests/test_cmake_build/subdirectory_target/CMakeLists.txt
View file @
c14b1933
...
@@ -37,4 +37,5 @@ add_custom_target(
...
@@ -37,4 +37,5 @@ add_custom_target(
PYTHONPATH=$<TARGET_FILE_DIR:test_subdirectory_target>
PYTHONPATH=$<TARGET_FILE_DIR:test_subdirectory_target>
${
_Python_EXECUTABLE
}
${
_Python_EXECUTABLE
}
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_NAME
}
)
${
PROJECT_NAME
}
DEPENDS test_subdirectory_target
)
tests/test_embed/CMakeLists.txt
View file @
c14b1933
...
@@ -31,6 +31,7 @@ endif()
...
@@ -31,6 +31,7 @@ endif()
add_custom_target
(
add_custom_target
(
cpptest
cpptest
COMMAND
"$<TARGET_FILE:test_embed>"
COMMAND
"$<TARGET_FILE:test_embed>"
DEPENDS test_embed
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
pybind11_add_module
(
external_module THIN_LTO external_module.cpp
)
pybind11_add_module
(
external_module THIN_LTO external_module.cpp
)
...
...
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