Skip to content

Commit ebc3302

Browse files
authored
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.
1 parent 6b573f4 commit ebc3302

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/cmake/modules/LLVMProcessSources.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ function(llvm_check_source_file_list)
113113
else()
114114
set(fn_relative "${fn}")
115115
endif()
116-
message(SEND_ERROR "Found unknown source file ${fn_relative}
116+
message(SEND_ERROR "Found erroneous configuration for source file ${fn_relative}
117+
LLVM's build system enforces that all source files are added to a build target, \
118+
that exactly one build target exists in each directory, \
119+
and that this target lists all files in that directory. \
120+
If you want multiple targets in the same directory, add \
121+
PARTIAL_SOURCES_INTENDED to the target specification, though it is discouraged.
117122
Please update ${CMAKE_CURRENT_LIST_FILE}\n")
118123
endif()
119124
endif()

0 commit comments

Comments
 (0)