summaryrefslogtreecommitdiffstats
path: root/Modules/FindPython
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2020-04-20 14:30:09 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2020-04-20 14:30:09 (GMT)
commitc6ba1963148191a05b2aa31bfad5e357aae1d5a3 (patch)
tree0afc13c3dc9c0c2264661f0d4d059e7bd2bf2081 /Modules/FindPython
parent5d32699975d8623c19f74c75f22ee128a81508c8 (diff)
downloadCMake-c6ba1963148191a05b2aa31bfad5e357aae1d5a3.zip
CMake-c6ba1963148191a05b2aa31bfad5e357aae1d5a3.tar.gz
CMake-c6ba1963148191a05b2aa31bfad5e357aae1d5a3.tar.bz2
FindPython: remove unnecessary if check
`list(REMOVE_DUPLICATES)` is safe on empty lists since 3.14.
Diffstat (limited to 'Modules/FindPython')
-rw-r--r--Modules/FindPython/Support.cmake4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 7562879..84487a3 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -777,9 +777,7 @@ function (_PYTHON_SET_LIBRARY_DIRS _PYTHON_SLD_RESULT)
list (APPEND _PYTHON_DIRS "${_PYTHON_DIR}")
endif()
endforeach()
- if (_PYTHON_DIRS)
- list (REMOVE_DUPLICATES _PYTHON_DIRS)
- endif()
+ list (REMOVE_DUPLICATES _PYTHON_DIRS)
set (${_PYTHON_SLD_RESULT} ${_PYTHON_DIRS} PARENT_SCOPE)
endfunction()