mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-05 23:30:25 +00:00
Merge topic 'FindHDF5-restore-default-C'
ff3ccc1f FindHDF5: Restore pre-3.6 behavior of finding only C by default
This commit is contained in:
@@ -100,18 +100,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)
|
||||
|
||||
Reference in New Issue
Block a user