Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tests/test_cmake_build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ function(pybind11_add_build_test name)
add_dependencies(test_cmake_build test_build_${name})
endfunction()

if(PYBIND11_TEST_SMART_HOLDER)
add_compile_definitions(
-DPYBIND11_RUN_TESTING_WITH_SMART_HOLDER_AS_DEFAULT_BUT_NEVER_USE_IN_PRODUCTION_PLEASE)
endif()

possibly_uninitialized(PYTHON_MODULE_EXTENSION Python_INTERPRETER_ID)

pybind11_add_build_test(subdirectory_function)
Expand Down
13 changes: 8 additions & 5 deletions tests/test_with_catch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ endif()

find_package(Threads REQUIRED)

if(PYBIND11_TEST_SMART_HOLDER)
add_compile_definitions(
-DPYBIND11_RUN_TESTING_WITH_SMART_HOLDER_AS_DEFAULT_BUT_NEVER_USE_IN_PRODUCTION_PLEASE)
endif()

add_executable(test_with_catch catch.cpp test_args_convert_vector.cpp test_argument_vector.cpp
test_interpreter.cpp test_subinterpreter.cpp)
pybind11_enable_warnings(test_with_catch)
Expand Down Expand Up @@ -61,4 +56,12 @@ foreach(config ${CMAKE_CONFIGURATION_TYPES})
endforeach()
add_dependencies(cpptest external_module)

if(PYBIND11_TEST_SMART_HOLDER)
foreach(target test_with_catch external_module)
target_compile_definitions(
${target}
PRIVATE PYBIND11_RUN_TESTING_WITH_SMART_HOLDER_AS_DEFAULT_BUT_NEVER_USE_IN_PRODUCTION_PLEASE)
endforeach()
endif()

add_dependencies(check cpptest)
Loading