27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
|
From e7c6f87f54be723724a4c996d815d59b515b01a6 Mon Sep 17 00:00:00 2001
|
||
|
From: Omair Majid <omajid@redhat.com>
|
||
|
Date: Thu, 31 Jan 2019 16:09:35 -0500
|
||
|
Subject: [PATCH] Update python lookup in CMakeLists.txt to match
|
||
|
build.(sh|cmd) (#22145)
|
||
|
|
||
|
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`.
|
||
|
---
|
||
|
CMakeLists.txt | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||
|
index 82c19a9cbaa..31b814f118d 100644
|
||
|
--- a/CMakeLists.txt
|
||
|
+++ b/CMakeLists.txt
|
||
|
@@ -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()
|