summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake12
1 files changed, 2 insertions, 10 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index ab046e3..7e1b352 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -111,18 +111,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
set(HDF5_VALID_LANGUAGE_BINDINGS C CXX Fortran)
# Validate the list of find components.
-set(HDF5_LANGUAGE_BINDINGS)
if(NOT HDF5_FIND_COMPONENTS)
- get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES)
- foreach(__lang IN LISTS __langs)
- if(__lang MATCHES "^(C|CXX|Fortran)$")
- list(APPEND HDF5_LANGUAGE_BINDINGS ${__lang})
- set(HDF5_FIND_REQUIRED_${__lang} True)
- endif()
- endforeach()
- set(FIND_HL ON)
- set(HDF5_FIND_REQUIRED_HL True)
+ set(HDF5_LANGUAGE_BINDINGS "C")
else()
+ set(HDF5_LANGUAGE_BINDINGS)
# add the extra specified components, ensuring that they are valid.
set(FIND_HL OFF)
foreach(component IN LISTS HDF5_FIND_COMPONENTS)