The option is used to link in Threads libs but the option is not used correctly.
The proper solution is the add the Threads lib to a global CMake variable when threads is available. Then use this variable to link. The current usage of the HDF5_ENABLE_THREADS option will cause a link issue if Threads library is not found.