diff options
author | Brad King <brad.king@kitware.com> | 2021-01-12 21:20:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-12 21:24:25 (GMT) |
commit | dadb13f546e149025e26edf8321a12e434482ffb (patch) | |
tree | e8f12006abfdbdc2ced67137d7292867d3a495be /Modules/FindHDF5.cmake | |
parent | 06dfa5a7b6c0174bfcb4691a9aaf00809bd7271d (diff) | |
download | CMake-dadb13f546e149025e26edf8321a12e434482ffb.zip CMake-dadb13f546e149025e26edf8321a12e434482ffb.tar.gz CMake-dadb13f546e149025e26edf8321a12e434482ffb.tar.bz2 |
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.
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r-- | Modules/FindHDF5.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 05696ae..d363900 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -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) |