[CMake] Replace list(FIND) by if(IN_LIST) where index isn't used
authorAaron Puchert <aaronpuchert@alice-dsl.net>
Mon, 23 Jan 2023 22:58:43 +0000 (23:58 +0100)
committerAaron Puchert <aaronpuchert@alice-dsl.net>
Mon, 23 Jan 2023 22:59:31 +0000 (23:59 +0100)
commitf1d3bc49634cfefe35de3aa631cef9f808b12896
treecffe03c2db1a9af33a4e164a0fab7c86fff2a233
parent31260a4ce43aab7c04f501095a9032de063ccaf9
[CMake] Replace list(FIND) by if(IN_LIST) where index isn't used

If we don't use the index otherwise, if(IN_LIST) is more readable and
doesn't clutter the local scope with index variables.

This was pointed out by @beanz in D96670.

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D142405
llvm/cmake/config-ix.cmake
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/AddSphinxTarget.cmake
llvm/cmake/modules/ChooseMSVCCRT.cmake
llvm/cmake/modules/LLVM-Config.cmake
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
llvm/cmake/modules/LLVMProcessSources.cmake
llvm/cmake/modules/TableGen.cmake