Skip to content

Commit baca405

Browse files
ktbarretthenryiii
authored andcommitted
pybind11 example: remove ctest support
This is supposed to be a Python extension module, why are we using ctest?
1 parent 2b2edab commit baca405

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

projects/hello-pybind11/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.14...3.17)
22

33
project(hello-pybind11 VERSION "0.1")
44

5-
include(CTest)
6-
option(BUILD_TESTING "Build the tests too" OFF) # defined above, but on by default
75
option(HELLO_USE_SYSTEM_PYBIND11 "Use pybind11 installed in the system" OFF)
86

97
# Define CMAKE_INSTALL_xxx: LIBDIR, INCLUDEDIR

projects/hello-pybind11/src/hello/CMakeLists.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,3 @@ pybind11_add_module(${python_module_name} MODULE
99

1010
install(TARGETS ${python_module_name} DESTINATION src/hello)
1111

12-
# tests
13-
if(BUILD_TESTING)
14-
set(test_folder "${CMAKE_CURRENT_SOURCE_DIR}/test_python")
15-
set(python_tests_
16-
test_hello_pybind11.py
17-
)
18-
19-
# test files should start with "test_"
20-
# unittest functions (in .py) should start with "test_" for discover to work
21-
foreach(python_test ${python_tests_})
22-
add_test(NAME python||${python_module_name}||${python_test}
23-
COMMAND ${PYTHON_EXECUTABLE}
24-
-m unittest discover
25-
-s ${test_folder}
26-
-p ${python_test}
27-
)
28-
endforeach()
29-
endif()
30-

0 commit comments

Comments
 (0)