Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Update python lookup in CMakeLists.txt to match build.(sh|cmd) (#22145)
Browse files Browse the repository at this point in the history
Use the same logic that's used in build.sh/build.cmd to lookup python:
first search for `python3`, then fall back to `python2` and finally to
`python`.
  • Loading branch information
omajid authored and AaronRobinsonMSFT committed Jan 31, 2019
1 parent 1b50d96 commit e7c6f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ OPTION(CLR_CMAKE_ENABLE_CODE_COVERAGE "Enable code coverage" OFF)
OPTION(CLR_CMAKE_WARNINGS_ARE_ERRORS "Warnings are errors" ON)

# Ensure that python is present
find_program(PYTHON NAMES python2.7 python2 python)
find_program(PYTHON NAMES python3 python2 python)
if (PYTHON STREQUAL "PYTHON-NOTFOUND")
message(FATAL_ERROR "PYTHON not found: Please install Python 2.7.9 or later from https://www.python.org/downloads/")
endif()
Expand Down

0 comments on commit e7c6f87

Please sign in to comment.