Skip to content

Commit

Permalink
Add check around list REMOVE_ITEM to ensure that llvm_libs isn't empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
agraef committed Aug 22, 2020
1 parent e3cb056 commit 2b687d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
add_definitions(${LLVM_DEFINITIONS})
include_directories(${LLVM_INCLUDE_DIRS})
llvm_map_components_to_libnames(llvm_libs all)
list(REMOVE_ITEM llvm_libs LTO)
if(llvm_libs)
list(REMOVE_ITEM llvm_libs LTO)
endif()
## Work around llvm_map_components_to_libnames producing an empty result at
## least with some LLVM versions. In such a case, llvm-config can hopefully
## provide us with the correct options. Note that this requires that
Expand Down

0 comments on commit 2b687d6

Please sign in to comment.