File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ endif()
8282set (PYTHON_EXPORT_DEPENDENCY ON )
8383findpython(REQUIRED)
8484
85+ if (NUMPY_VERSION VERSION_LESS "1.16.0" )
86+ set (NUMPY_WITH_BROKEN_UFUNC_SUPPORT)
87+ endif ()
88+
8589if (WIN32 )
8690 link_directories (${PYTHON_LIBRARY_DIRS} )
8791 # # Set default Windows build paths SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ add_lib_unit_test(include)
3232if (NOT ${EIGEN3_VERSION} VERSION_LESS "3.2.0" )
3333 add_lib_unit_test(eigen_ref)
3434endif ()
35- add_lib_unit_test(user_type)
35+
36+ if (NOT NUMPY_WITH_BROKEN_UFUNC_SUPPORT)
37+ add_lib_unit_test(user_type)
38+ endif ()
3639add_lib_unit_test(std_vector)
3740
3841add_python_unit_test("py-matrix" "unittest/python/test_matrix.py" "unittest" )
@@ -43,8 +46,11 @@ add_python_unit_test("py-return-by-ref" "unittest/python/test_return_by_ref.py"
4346 "unittest" )
4447add_python_unit_test("py-eigen-ref" "unittest/python/test_eigen_ref.py"
4548 "unittest" )
46- add_python_unit_test("py-user-type" "unittest/python/test_user_type.py"
47- "unittest" )
49+
50+ if (NOT NUMPY_WITH_BROKEN_UFUNC_SUPPORT)
51+ add_python_unit_test("py-user-type" "unittest/python/test_user_type.py"
52+ "unittest" )
53+ endif ()
4854
4955add_python_unit_test("py-switch" "unittest/python/test_switch.py"
5056 "python;unittest" )
You can’t perform that action at this time.
0 commit comments