Skip to content

Commit

Permalink
CMCMakeModules/UseCompat.cmake: fix list(REMOVE_ITEM ...)
Browse files Browse the repository at this point in the history
When using a cmake version <= 3.19 the compat check fails with:

CMake Error at CMakeModules/UseCompat.cmake:48 (list):
  list sub-command REMOVE_ITEM requires two or more arguments.

To solve the issue we simply add an empty element "".

Signed-off-by: Heiko Thiery <[email protected]>
  • Loading branch information
hthiery committed Jan 5, 2025
1 parent e0fbbb7 commit 3ac273b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeModules/UseCompat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ macro(USE_COMPAT)
find_package(Threads)
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
check_function_exists(pthread_mutex_timedlock HAVE_PTHREAD_MUTEX_TIMEDLOCK)
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} "") # cmake <= 3.19 needs at least one item

test_big_endian(IS_BIG_ENDIAN)

Expand Down

0 comments on commit 3ac273b

Please sign in to comment.