Commit ca788235 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

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
parent 1d6854a4
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment