1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
Index: xtensor/CMakeLists.txt
===================================================================
--- xtensor.orig/CMakeLists.txt 2026-02-09 00:24:54.556769546 +0100
+++ xtensor/CMakeLists.txt 2026-02-09 00:24:54.554271308 +0100
@@ -214,6 +214,7 @@
OPTION(XTENSOR_CHECK_DIMENSION "xtensor dimension check" OFF)
OPTION(XTENSOR_FORCE_TEMPORARY_MEMORY_IN_ASSIGNMENTS "xtensor force the use of temporary memory when assigning instead of an automatic overlap check" ON)
OPTION(BUILD_TESTS "xtensor test suite" OFF)
+OPTION(BUILD_TEST_XNPY "include test_xnpy with tests" ON)
OPTION(BUILD_BENCHMARK "xtensor benchmark" OFF)
OPTION(DOWNLOAD_GBENCHMARK "download google benchmark and build from source" ON)
OPTION(DEFAULT_COLUMN_MAJOR "set default layout to column major" OFF)
Index: xtensor/test/CMakeLists.txt
===================================================================
--- xtensor.orig/test/CMakeLists.txt 2026-02-09 00:24:54.556769546 +0100
+++ xtensor/test/CMakeLists.txt 2026-02-09 00:24:54.554485000 +0100
@@ -187,7 +187,6 @@
test_xnan_functions.cpp
test_xnoalias.cpp
test_xnorm.cpp
- test_xnpy.cpp
test_xoptional.cpp
test_xoptional_assembly_adaptor.cpp
test_xoptional_assembly_storage.cpp
@@ -211,8 +210,11 @@
list(APPEND XTENSOR_TESTS test_xexpression_holder.cpp)
endif()
-# Add files for npy tests
-set(XNPY_FILES
+if(BUILD_TEST_XNPY)
+ list(APPEND XTENSOR_TESTS test_xnpy.cpp)
+
+ # Add files for npy tests
+ set(XNPY_FILES
bool
bool_fortran
double
@@ -220,14 +222,15 @@
int
unsignedlong
unsignedlong_fortran
-)
+ )
-foreach(filename IN LISTS XNPY_FILES)
- foreach(suffix .be.npy .le.npy)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/files/xnpy_files/${filename}${suffix}
- ${CMAKE_CURRENT_BINARY_DIR}/files/xnpy_files/${filename}${suffix} COPYONLY)
- endforeach()
-endforeach()
+ foreach(filename IN LISTS XNPY_FILES)
+ foreach(suffix .be.npy .le.npy)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/files/xnpy_files/${filename}${suffix}
+ ${CMAKE_CURRENT_BINARY_DIR}/files/xnpy_files/${filename}${suffix} COPYONLY)
+ endforeach()
+ endforeach()
+endif()
file(GLOB XTENSOR_PREPROCESS_FILES files/cppy_source/*.cppy)
|