[llvm] ebc3302 - Improve error message for cmake failure (#71404)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 00:54:08 PST 2023
Author: Jeremy Kun
Date: 2023-11-07T09:54:04+01:00
New Revision: ebc3302725350c44aaf5f97ce7ba484e30b3efa8
URL: https://github.com/llvm/llvm-project/commit/ebc3302725350c44aaf5f97ce7ba484e30b3efa8
DIFF: https://github.com/llvm/llvm-project/commit/ebc3302725350c44aaf5f97ce7ba484e30b3efa8.diff
LOG: Improve error message for cmake failure (#71404)
I ran into this error as a newbie, was educated
[here](https://discord.com/channels/636084430946959380/642426447167881246/1171016269387018310).
Updating the error message to be more descriptive about the problem and
my options.
Added:
Modified:
llvm/cmake/modules/LLVMProcessSources.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/LLVMProcessSources.cmake b/llvm/cmake/modules/LLVMProcessSources.cmake
index 340aa7b43eaed96..205089bd2704cb5 100644
--- a/llvm/cmake/modules/LLVMProcessSources.cmake
+++ b/llvm/cmake/modules/LLVMProcessSources.cmake
@@ -113,7 +113,12 @@ function(llvm_check_source_file_list)
else()
set(fn_relative "${fn}")
endif()
- message(SEND_ERROR "Found unknown source file ${fn_relative}
+ message(SEND_ERROR "Found erroneous configuration for source file ${fn_relative}
+LLVM's build system enforces that all source files are added to a build target, \
+that exactly one build target exists in each directory, \
+and that this target lists all files in that directory. \
+If you want multiple targets in the same directory, add \
+PARTIAL_SOURCES_INTENDED to the target specification, though it is discouraged.
Please update ${CMAKE_CURRENT_LIST_FILE}\n")
endif()
endif()
More information about the llvm-commits
mailing list