mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
cmake: Fix issues when IDF_PATH is not set in environment
Support cases where IDF_PATH may be passed in on the cmake command line, or inferred from a (hardcoded absolute or relative) path to project.cmake
This commit is contained in:

committed by
Angus Gratton

parent
be829afe6e
commit
bf10447b82
@@ -41,7 +41,7 @@ class FatalError(RuntimeError):
|
||||
PYTHON=sys.executable
|
||||
|
||||
# note: os.environ changes don't automatically propagate to child processes,
|
||||
# you have to pass this in explicitly
|
||||
# you have to pass env=os.environ explicitly anywhere that we create a process
|
||||
os.environ["PYTHON"]=sys.executable
|
||||
|
||||
# Make flavors, across the various kinds of Windows environments & POSIX...
|
||||
@@ -95,6 +95,7 @@ def check_environment():
|
||||
print("WARNING: IDF_PATH environment variable is set to %s but idf.py path indicates IDF directory %s. Using the environment variable directory, but results may be unexpected..."
|
||||
% (set_idf_path, detected_idf_path))
|
||||
else:
|
||||
print("Setting IDF_PATH environment variable: %s" % detected_idf_path)
|
||||
os.environ["IDF_PATH"] = detected_idf_path
|
||||
|
||||
def executable_exists(args):
|
||||
|
Reference in New Issue
Block a user