Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit f1140d0

Browse files
committed
Inform user of missing dependencies
Instead of failing with a cryptic error message like ``` CMake Error at /tmp/Arduino-CMake-NG/cmake/Platform/System/LinuxDistDetector.cmake:12 (string): string no output variable specified Call Stack (most recent call first): /tmp/Arduino-CMake-NG/cmake/Platform/System/BuildSystemInitializer.cmake:25 (detect_host_linux_distribution) /tmp/Arduino-CMake-NG/cmake/Platform/Arduino.cmake:34 (initialize_build_system) /usr/share/cmake-3.10/Modules/CMakeSystemSpecificInformation.cmake:26 (include) CMakeLists.txt:2 (project) ``` let's fail with a clean message about missing dependencies :-)
1 parent 7dd18ac commit f1140d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/Platform/System/LinuxDistDetector.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ function(detect_host_linux_distribution)
66
message(AUTHOR_WARNING "Linux distribution detection called on Apple platform")
77
else () # Linux host
88
find_program(lsb_release_exec lsb_release)
9+
10+
if ("lsb_release_exec-NOTFOUND" STREQUAL "${lsb_release_exec}")
11+
message(WARNING "Linux distribution couldn't be detected - Please install 'lsb_release'.")
12+
endif()
13+
914
execute_process(COMMAND ${lsb_release_exec} -is
1015
OUTPUT_VARIABLE lsb_release_id_short
1116
OUTPUT_STRIP_TRAILING_WHITESPACE)

0 commit comments

Comments
 (0)