mirror of
https://gitee.com/openharmony/third_party_spirv-tools
synced 2024-11-23 07:20:28 +00:00
SPIRV-Tools requires python3 (#2510)
Updates: - CMake configuration - Kokoro build scripts on Linux and macos (Windows already uses Python 3.6)
This commit is contained in:
parent
98b3f26c2f
commit
07ac7dee5c
@ -178,7 +178,8 @@ if(NOT COMMAND find_host_program)
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
find_host_package(PythonInterp)
|
||||
# Tests require Python3
|
||||
find_host_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
# Check for symbol exports on Linux.
|
||||
# At the moment, this check will fail on the OSX build machines for the Android NDK.
|
||||
|
10
README.md
10
README.md
@ -276,14 +276,8 @@ installed regardless of your OS:
|
||||
|
||||
- [CMake](http://www.cmake.org/): for generating compilation targets. Version
|
||||
2.8.12 or later.
|
||||
- [Python](http://www.python.org/): for utility scripts and running the test
|
||||
suite. Version 2 or 3.
|
||||
|
||||
We will be moving to Python3 only in the future. If you are using Python2, you
|
||||
will need to install Python-future:
|
||||
```
|
||||
pip install future
|
||||
```
|
||||
- [Python 3](http://www.python.org/): for utility scripts and running the test
|
||||
suite.
|
||||
|
||||
SPIRV-Tools is regularly tested with the the following compilers:
|
||||
|
||||
|
@ -77,7 +77,7 @@ mkdir build && cd $SRC/build
|
||||
# Invoke the build.
|
||||
BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT}
|
||||
echo $(date): Starting build...
|
||||
cmake -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2.7 -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=install -DRE2_BUILD_TESTING=OFF $ADDITIONAL_CMAKE_FLAGS $CMAKE_C_CXX_COMPILER ..
|
||||
cmake -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=install -DRE2_BUILD_TESTING=OFF $ADDITIONAL_CMAKE_FLAGS $CMAKE_C_CXX_COMPILER ..
|
||||
|
||||
echo $(date): Build everything...
|
||||
ninja
|
||||
|
@ -41,7 +41,14 @@ mkdir build && cd $SRC/build
|
||||
# Invoke the build.
|
||||
BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT}
|
||||
echo $(date): Starting build...
|
||||
cmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
|
||||
# We need Python 3. At the moment python3.7 is the newest Python on Kokoro.
|
||||
cmake \
|
||||
-GNinja \
|
||||
-DPYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python3.7 \
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
..
|
||||
|
||||
echo $(date): Build everything...
|
||||
ninja
|
||||
|
Loading…
Reference in New Issue
Block a user