[llvm/cmake] Replace CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR
authorSebastian Neubauer <Sebastian.Neubauer@amd.com>
Wed, 11 Jan 2023 17:42:00 +0000 (18:42 +0100)
committerSebastian Neubauer <Sebastian.Neubauer@amd.com>
Thu, 12 Jan 2023 10:37:09 +0000 (11:37 +0100)
commit71c837f6d7d74e44f156ac60a47b1198727ba90f
tree1bde5b77619c1e47110395814e485f3dc891b171
parent0bd83f949bb871a40eddc5eae12e561c33762fca
[llvm/cmake] Replace CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR

When adding llvm to a build with add_subdirectory, CMAKE_SOURCE_DIR
refers to the source directory of the parent project. We want to use
PROJECT_SOURCE_DIR instead.

Differential Revision: https://reviews.llvm.org/D141521
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/include/llvm/TargetParser/CMakeLists.txt
llvm/unittests/Target/PowerPC/CMakeLists.txt
llvm/unittests/Target/WebAssembly/CMakeLists.txt
llvm/unittests/Target/X86/CMakeLists.txt