Skip to content

Commit

Permalink
Tests: Use static utility library to avoid Windows DLL issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Jan 12, 2024
1 parent 424b420 commit 029224e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ endif()
include(${Catch2_SOURCE_DIR}/extras/Catch.cmake)

add_library(test_utils
STATIC
test_utilities.cpp
test_utilities.h
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace nc_complex::testing {

/// Create a netCDF file with a variety of complex conventions

NC_COMPLEX_EXPORT int create_file(const fs::path& filename) {
int create_file(const fs::path& filename) {
fs::remove(filename);

int ncid = 0;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ inline float_complex* to_c_complex(std::array<std::complex<float>, N>& data) {
return reinterpret_cast<float_complex*>(data.data());
}

NC_COMPLEX_EXPORT int create_file(const std::filesystem::path& filename);
int create_file(const std::filesystem::path& filename);

template <class T, std::size_t N>
std::vector<T> fill_sequence() {
Expand Down

0 comments on commit 029224e

Please sign in to comment.