keep_alive call policy (analogous to Boost.Python's with_custodian_and_ward, fixes #62)

This commit is contained in:
Wenzel Jakob
2016-01-17 22:36:39 +01:00
parent 87187afe91
commit 5f218b3f2c
8 changed files with 208 additions and 4 deletions

View File

@@ -109,6 +109,7 @@ add_library(example SHARED
example/example10.cpp
example/example11.cpp
example/example12.cpp
example/example13.cpp
)
# Don't add a 'lib' prefix to the shared library
@@ -179,7 +180,7 @@ endif()
enable_testing()
set(RUN_TEST ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example/run_test.py)
foreach(i RANGE 1 12)
foreach(i RANGE 1 13)
add_test(NAME example${i} COMMAND ${RUN_TEST} example${i})
endforeach()