[PATCH] D141521: [llvm/cmake] Replace CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 02:37:30 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG71c837f6d7d7: [llvm/cmake] Replace CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR (authored by sebastian-ne).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141521/new/
https://reviews.llvm.org/D141521
Files:
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
Index: llvm/unittests/Target/X86/CMakeLists.txt
===================================================================
--- llvm/unittests/Target/X86/CMakeLists.txt
+++ llvm/unittests/Target/X86/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(
- ${CMAKE_SOURCE_DIR}/lib/Target/X86
- ${CMAKE_BINARY_DIR}/lib/Target/X86
+ ${PROJECT_SOURCE_DIR}/lib/Target/X86
+ ${PROJECT_BINARY_DIR}/lib/Target/X86
)
set(LLVM_LINK_COMPONENTS
Index: llvm/unittests/Target/WebAssembly/CMakeLists.txt
===================================================================
--- llvm/unittests/Target/WebAssembly/CMakeLists.txt
+++ llvm/unittests/Target/WebAssembly/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(
- ${CMAKE_SOURCE_DIR}/lib/Target/WebAssembly
- ${CMAKE_BINARY_DIR}/lib/Target/WebAssembly
+ ${PROJECT_SOURCE_DIR}/lib/Target/WebAssembly
+ ${PROJECT_BINARY_DIR}/lib/Target/WebAssembly
)
set(LLVM_LINK_COMPONENTS
Index: llvm/unittests/Target/PowerPC/CMakeLists.txt
===================================================================
--- llvm/unittests/Target/PowerPC/CMakeLists.txt
+++ llvm/unittests/Target/PowerPC/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(
- ${CMAKE_SOURCE_DIR}/lib/Target/PowerPC
- ${CMAKE_BINARY_DIR}/lib/Target/PowerPC
+ ${PROJECT_SOURCE_DIR}/lib/Target/PowerPC
+ ${PROJECT_BINARY_DIR}/lib/Target/PowerPC
)
set(LLVM_LINK_COMPONENTS
Index: llvm/include/llvm/TargetParser/CMakeLists.txt
===================================================================
--- llvm/include/llvm/TargetParser/CMakeLists.txt
+++ llvm/include/llvm/TargetParser/CMakeLists.txt
@@ -1,4 +1,3 @@
-set(LLVM_TARGET_DEFINITIONS ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/RISCV.td)
-tablegen(LLVM RISCVTargetParserDef.inc -gen-riscv-target-def -I ${CMAKE_SOURCE_DIR}/lib/Target/RISCV/)
+set(LLVM_TARGET_DEFINITIONS ${PROJECT_SOURCE_DIR}/lib/Target/RISCV/RISCV.td)
+tablegen(LLVM RISCVTargetParserDef.inc -gen-riscv-target-def -I ${PROJECT_SOURCE_DIR}/lib/Target/RISCV/)
add_public_tablegen_target(RISCVTargetParserTableGen)
-
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -938,7 +938,7 @@
append("-fsanitize=fuzzer-no-link" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
if (LLVM_USE_SANITIZER MATCHES ".*Undefined.*")
- set(IGNORELIST_FILE "${CMAKE_SOURCE_DIR}/utils/sanitizers/ubsan_ignorelist.txt")
+ set(IGNORELIST_FILE "${PROJECT_SOURCE_DIR}/utils/sanitizers/ubsan_ignorelist.txt")
if (EXISTS "${IGNORELIST_FILE}")
# Use this option name version since -fsanitize-ignorelist is only
# accepted with clang 13.0 or newer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141521.488561.patch
Type: text/x-patch
Size: 2736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230112/914d4e65/attachment.bin>
More information about the llvm-commits
mailing list