Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Address @smeenai feedback https://reviews.llvm.org/D117061#inline-1122106: >CMake has if(IN_LIST) now, which you can use instead of the string(FIND) IN_LIST is available since CMake 3.3 released in 2015. Reviewed By: smeenai FBD33590959
- Loading branch information
Showing
3 changed files
with
6 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
string(FIND "${LLVM_TARGETS_TO_BUILD}" "X86" POSITION) | ||
if (NOT ${POSITION} EQUAL -1) | ||
if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD) | ||
message(STATUS "Targeting X86 in llvm-bolt") | ||
add_subdirectory(X86) | ||
endif() | ||
|
||
string(FIND "${LLVM_TARGETS_TO_BUILD}" "AArch64" POSITION) | ||
if (NOT ${POSITION} EQUAL -1) | ||
if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD) | ||
message(STATUS "Targeting AArch64 in llvm-bolt") | ||
add_subdirectory(AArch64) | ||
endif() |