Skip to content

Commit 80b3369

Browse files
committed
Do not compile tests of AWS and GSC if they are not enabled
1 parent f1138e8 commit 80b3369

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,17 @@ include_directories(${GTEST_INCLUDE_DIRS} SYSTEM)
7979
set(XTENSOR_ZARR_TESTS
8080
main.cpp
8181
test_zarr.cpp
82-
test_gcs.cpp
83-
test_aws.cpp
8482
test_gdal.cpp
8583
)
8684

85+
if(${storage_client_FOUND})
86+
list(APPEND XTENSOR_ZARR_TESTS test_gcs.cpp)
87+
endif()
88+
89+
if(${AWSSDK_FOUND})
90+
list(APPEND XTENSOR_ZARR_TESTS test_aws.cpp)
91+
endif()
92+
8793
add_executable(test_xtensor_zarr ${XTENSOR_ZARR_TESTS} ${XTENSOR_ZARR_HEADERS})
8894
if(DOWNLOAD_GTEST OR GTEST_SRC_DIR)
8995
add_dependencies(test_xtensor_zarr gtest_main)

0 commit comments

Comments
 (0)