Explorar o código

Force cmake to use python3 (#2187)

Force cmake to use python3
Jaebaek Seo %!s(int64=6) %!d(string=hai) anos
pai
achega
dd183fec9f
Modificáronse 3 ficheiros con 4 adicións e 16 borrados
  1. 2 15
      CMakeLists.txt
  2. 1 0
      appveyor.yml
  3. 1 1
      docs/DxcOnUnix.rst

+ 2 - 15
CMakeLists.txt

@@ -396,21 +396,8 @@ set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
 
 include(HandleLLVMOptions)
 
-# Verify that we can find a Python 2 interpreter.  Python 3 is unsupported.
-# FIXME: We should support systems with only Python 3, but that requires work
-# on LLDB.
-set(Python_ADDITIONAL_VERSIONS 2.7)
-include(FindPythonInterp)
-if( NOT PYTHONINTERP_FOUND )
-  message(FATAL_ERROR
-"Unable to find Python interpreter, required for builds and testing.
-
-Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
-endif()
-
-if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
-  message(FATAL_ERROR "Python 2.7 or newer is required")
-endif()
+# Verify that we can find a Python 3 interpreter and force cmake to use it.
+find_package(PythonInterp 3 REQUIRED)
 
 ######
 # LLVMBuild Integration

+ 1 - 0
appveyor.yml

@@ -13,6 +13,7 @@ environment:
 
 install:
 - cmd: git submodule update --init
+- cmd: set PATH=C:\ninja;C:\Python36;%PATH%
 
 before_build:
 - cmd: call utils\hct\hctstart %HLSL_SRC_DIR% %HLSL_BLD_DIR%

+ 1 - 1
docs/DxcOnUnix.rst

@@ -72,7 +72,7 @@ Build Requirements
 Please make sure you have the following resources before building:
 
 - `Git <https://git-scm.com/downloads>`_
-- `Python <https://www.python.org/downloads/>`_. Version 2.7.x is required, 3.x might work but it's not officially supported.
+- `Python <https://www.python.org/downloads/>`_. Version 3.x is required.
 - `Ninja <https://github.com/ninja-build/ninja/releases>`_ (*Optional* CMake generator)
 - Either of gcc/g++ or clang/clang++ compilers. Minimum supported version: