1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

update CMakeBuilder to raise an exception if we cannot find CMake

Summary:
If `path_search()` returns that CMake is not available, raise an Exception and
fail the build.  This makes the failure somewhat easier to to identify.
Without this the code would continue and would try to invoke `subprocess` with
a value of `None` in the command argument list.  This error is slightly harder
to debug, since it isn't clear which command argument or environment variable
is not a string.

Reviewed By: chadaustin

Differential Revision: D16354623

fbshipit-source-id: be972b02cb13bc70db0f867da70e5bf4c6cec46d
This commit is contained in:
Adam Simpkins
2019-07-19 15:23:50 -07:00
committed by Facebook Github Bot
parent b5a9bd74ca
commit 59a46b2202

View File

@@ -257,6 +257,8 @@ class CMakeBuilder(BuilderBase):
# Resolve the cmake that we installed
cmake = path_search(env, "cmake")
if cmake is None:
raise Exception("Failed to find CMake")
if reconfigure:
self._invalidate_cache()