mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
FindHDF5: Simplify preprocessor setting de-duplication
Use `list(REMOVE_DUPLICATES)` directly. For definitions the order doesn't matter. For include directories it is better to remove late duplicates than early duplicates.
This commit is contained in:
@@ -724,8 +724,8 @@ if(NOT HDF5_FOUND)
|
||||
endif()
|
||||
|
||||
set(HDF5_${_lang}_FOUND TRUE)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_${_lang}_DEFINITIONS)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_${_lang}_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES HDF5_${_lang}_DEFINITIONS)
|
||||
list(REMOVE_DUPLICATES HDF5_${_lang}_INCLUDE_DIRS)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_${_lang}_LIBRARIES)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_${_lang}_HL_LIBRARIES)
|
||||
else()
|
||||
@@ -780,8 +780,8 @@ elseif(NOT HDF5_FOUND AND NOT _HDF5_NEED_TO_SEARCH)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_DEFINITIONS)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES HDF5_DEFINITIONS)
|
||||
list(REMOVE_DUPLICATES HDF5_INCLUDE_DIRS)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_LIBRARIES)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_HL_LIBRARIES)
|
||||
set(HDF5_FOUND TRUE)
|
||||
@@ -923,8 +923,8 @@ if( NOT HDF5_FOUND )
|
||||
set(HDF5_HL_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_DEFINITIONS)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES HDF5_DEFINITIONS)
|
||||
list(REMOVE_DUPLICATES HDF5_INCLUDE_DIRS)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_LIBRARIES)
|
||||
_HDF5_remove_duplicates_from_beginning(HDF5_HL_LIBRARIES)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user