Skip to content

Commit

Permalink
Improve error message for cmake failure (#71404)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
j2kun authored Nov 7, 2023
1 parent 6b573f4 commit ebc3302
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion llvm/cmake/modules/LLVMProcessSources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ebc3302

Please sign in to comment.