Skip to content

Commit

Permalink
[mono] Change CMakelists.txt "python" -> Python3_EXECUTABLE
Browse files Browse the repository at this point in the history
Debian doesn't install a "python" binary for python3.
  • Loading branch information
lambdageek committed Nov 6, 2020
1 parent 669d451 commit f531372
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/mono/mono/mini/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
project(mini)

include(FindPython3)

function(addprefix var prefix list)
set(f)
foreach(i ${list})
Expand Down Expand Up @@ -314,6 +316,8 @@ if(NOT DISABLE_SHARED_LIBS)
install(TARGETS monosgen LIBRARY)
endif()

find_package(Python3 COMPONENTS Interpreter)

# FIXME: Always rebuilds, creates non-deterministic builds
# FIXME: Use the previous format
#string(TIMESTAMP BUILD_DATE)
Expand All @@ -337,31 +341,31 @@ add_custom_command(

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpu-amd64.h
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_AMD64 ${CMAKE_CURRENT_SOURCE_DIR} cpu-amd64.h amd64_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-amd64.md
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_AMD64 ${CMAKE_CURRENT_SOURCE_DIR} cpu-amd64.h amd64_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-amd64.md
VERBATIM
)

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpu-x86.h
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_X86 ${CMAKE_CURRENT_SOURCE_DIR} cpu-x86.h x86_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-x86.md
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_X86 ${CMAKE_CURRENT_SOURCE_DIR} cpu-x86.h x86_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-x86.md
VERBATIM
)

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpu-arm64.h
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_ARM64 ${CMAKE_CURRENT_SOURCE_DIR} cpu-arm64.h arm64_cpu_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-arm64.md
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_ARM64 ${CMAKE_CURRENT_SOURCE_DIR} cpu-arm64.h arm64_cpu_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-arm64.md
VERBATIM
)

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpu-arm.h
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_ARM ${CMAKE_CURRENT_SOURCE_DIR} cpu-arm.h arm_cpu_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-arm.md
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_ARM ${CMAKE_CURRENT_SOURCE_DIR} cpu-arm.h arm_cpu_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-arm.md
VERBATIM
)

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpu-wasm.h
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_WASM ${CMAKE_CURRENT_SOURCE_DIR} cpu-wasm.h wasm_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-wasm.md
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genmdesc.py TARGET_WASM ${CMAKE_CURRENT_SOURCE_DIR} cpu-wasm.h wasm_desc ${CMAKE_CURRENT_SOURCE_DIR}/cpu-wasm.md
VERBATIM
)

Expand Down

0 comments on commit f531372

Please sign in to comment.