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
40d49a5b
Commit
40d49a5b
authored
Jan 26, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding tests/pure_cpp/CMakeLists.txt.
parent
0b266681
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
tests/CMakeLists.txt
+3
-0
tests/pure_cpp/CMakeLists.txt
+20
-0
No files found.
tests/CMakeLists.txt
View file @
40d49a5b
...
@@ -460,6 +460,9 @@ add_custom_command(
...
@@ -460,6 +460,9 @@ add_custom_command(
${
CMAKE_CURRENT_BINARY_DIR
}
/sosize-$<TARGET_FILE_NAME:pybind11_tests>.txt
)
${
CMAKE_CURRENT_BINARY_DIR
}
/sosize-$<TARGET_FILE_NAME:pybind11_tests>.txt
)
if
(
NOT PYBIND11_CUDA_TESTS
)
if
(
NOT PYBIND11_CUDA_TESTS
)
# Test pure C++ code (not depending on Python). Provides the `test_pure_cpp` target.
add_subdirectory
(
pure_cpp
)
# Test embedding the interpreter. Provides the `cpptest` target.
# Test embedding the interpreter. Provides the `cpptest` target.
add_subdirectory
(
test_embed
)
add_subdirectory
(
test_embed
)
...
...
tests/pure_cpp/CMakeLists.txt
0 → 100644
View file @
40d49a5b
find_package
(
Catch 2.13.2
)
if
(
CATCH_FOUND
)
message
(
STATUS
"Building pure C++ tests (not depending on Python) using Catch v
${
CATCH_VERSION
}
"
)
else
()
message
(
STATUS
"Catch not detected. Interpreter tests will be skipped. Install Catch headers"
" manually or use `cmake -DDOWNLOAD_CATCH=ON` to fetch them automatically."
)
return
()
endif
()
add_executable
(
smart_holder_poc_test smart_holder_poc_test.cpp
)
pybind11_enable_warnings
(
smart_holder_poc_test
)
target_link_libraries
(
smart_holder_poc_test PRIVATE pybind11::headers Catch2::Catch2
)
add_custom_target
(
test_pure_cpp
COMMAND
"$<TARGET_FILE:smart_holder_poc_test>"
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
add_dependencies
(
check test_pure_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