Skip to content

Commit 801c5d5

Browse files
committed
try to fix xtensor warnings
1 parent 540c907 commit 801c5d5

1 file changed

Lines changed: 6 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ target_include_directories(samurai INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_
107107
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
108108

109109
# Find dependencies:
110-
set(DEPENDENCIES_CONFIGURED HighFive pugixml fmt CLI11)
110+
set(DEPENDENCIES_CONFIGURED xtensor HighFive pugixml fmt CLI11)
111111

112112
if(${ENABLE_VCPKG})
113113
list(APPEND DEPENDENCIES_CONFIGURED hdf5)
@@ -120,32 +120,21 @@ foreach(DEPENDENCY ${DEPENDENCIES_CONFIGURED})
120120
find_package(${DEPENDENCY} CONFIG REQUIRED)
121121
endforeach()
122122

123+
if (xtensor_VERSION VERSION_LESS_EQUAL "0.25.0")
124+
message(FATAL_ERROR "xtensor version ${xtensor_VERSION} is too old. Minimum allowed version is 0.26.")
125+
endif()
126+
123127
# Link dependencies:
124128
target_link_system_libraries(
125129
samurai
126130
INTERFACE
131+
xtensor
127132
HighFive
128133
pugixml::pugixml
129134
fmt::fmt
130135
CLI11::CLI11
131136
)
132137

133-
if(SAMURAI_FIELD_CONTAINER MATCHES xtensor)
134-
message(STATUS "Using xtensor as field container")
135-
list(APPEND DEPENDENCIES_CONFIGURED xtensor)
136-
find_package(xtensor CONFIG REQUIRED)
137-
138-
if (xtensor_VERSION VERSION_LESS_EQUAL "0.25.0")
139-
message(FATAL_ERROR "xtensor version ${xtensor_VERSION} is too old. Minimum allowed version is 0.26.")
140-
endif()
141-
142-
target_link_system_libraries(
143-
samurai
144-
INTERFACE
145-
xtensor
146-
)
147-
148-
endif()
149138
if(SAMURAI_FIELD_CONTAINER MATCHES eigen3)
150139
message(STATUS "Using Eigen3 as field container")
151140
endif()

0 commit comments

Comments
 (0)