When using CMake 3.19.0-rc2 I get the same error that #155 tries to solve:
CMake Error at cmake/thirdParties.cmake:34 (add_library):
add_library cannot create imported target "HDF5::HDF5" because another target with the same name already exists.
I propose a different solution. Use the MATIO namespace for imported libraries. Also check and use the HDF5::HDF5 and ZLIB::ZLIB targets if they exist.
Coverage remained the same at 82.304% when pulling 79113c56b9bb51dfae1061239e189002c57dde24 on MaartenBent:cmake-target-exists into 260a830c4f60e70df0b3ba22cdfbaad9431c0faf on tbeu:master.
When using CMake 3.19.0-rc2 I get the same error that #155 tries to solve:
I propose a different solution. Use the
MATIO
namespace for imported libraries. Also check and use theHDF5::HDF5
andZLIB::ZLIB
targets if they exist.