File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change 1+ # Create a shared nanobind library for testing
2+ set (NANOBIND_TESTING_TARGET nanobind-testing)
3+ nanobind_build_library(${NANOBIND_TESTING_TARGET} SHARED)
4+
5+ # On Win32, shared DLL libs are sent to RUNTIME_OUTPUT_DIRECTORY, *but*
6+ # we really need to send it to the lib dir so
7+ if (WIN32 )
8+ set_target_properties (
9+ ${NANOBIND_TESTING_TARGET}
10+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} /lib
11+ )
12+ endif ()
13+
114# Add a C++ extension module for tests
215function (add_tests_cpp_extension name )
316 set (filename ${name} .cpp)
4- nanobind_add_module(${name} NB_SHARED NB_SUPPRESS_WARNINGS ${filename} )
5- target_link_libraries (${name} PRIVATE nanoeigenpy_headers)
17+ add_library (${name} MODULE ${filename} )
18+ target_link_libraries (
19+ ${name}
20+ PRIVATE ${NANOBIND_TESTING_TARGET} nanoeigenpy_headers
21+ )
22+ # Use nanobind low-level interface to set properties
23+ nanobind_set_visibility(${name} )
24+ nanobind_strip(${name} )
25+ nanobind_extension(${name} )
26+ nanobind_compile_options(${name} )
27+ nanobind_link_options(${name} )
28+
629 add_dependencies (build_tests ${name} )
730
831 add_test (
You can’t perform that action at this time.
0 commit comments