File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,25 @@ if(NOT _VCPKG_LINUX_TOOLCHAIN)
65
65
endif ()
66
66
message (STATUS "Cross compiling arm64 on host ${CMAKE_HOST_SYSTEM_PROCESSOR} , use cross compiler: ${CMAKE_CXX_COMPILER} /${CMAKE_C_COMPILER} " )
67
67
endif ()
68
+ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "riscv64" )
69
+ set (CMAKE_SYSTEM_PROCESSOR riscv64 CACHE STRING "" )
70
+ if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "riscv64" )
71
+
72
+ if (NOT DEFINED CMAKE_CXX_COMPILER )
73
+ set (CMAKE_CXX_COMPILER "riscv64-linux-gnu-g++" )
74
+ endif ()
75
+ if (NOT DEFINED CMAKE_C_COMPILER )
76
+ set (CMAKE_C_COMPILER "riscv64-linux-gnu-gcc" )
77
+ endif ()
78
+ if (NOT DEFINED CMAKE_ASM_COMPILER )
79
+ set (CMAKE_ASM_COMPILER "riscv64-linux-gnu-gcc" )
80
+ endif ()
81
+ if (NOT DEFINED CMAKE_ASM-ATT_COMPILER )
82
+ set (CMAKE_ASM-ATT_COMPILER "riscv64-linux-gnu-as" )
83
+ endif ()
84
+ message (STATUS "Cross compiling riscv64 on host ${CMAKE_HOST_SYSTEM_PROCESSOR} , use cross compiler: ${CMAKE_CXX_COMPILER} /${CMAKE_C_COMPILER} " )
85
+ endif ()
86
+
68
87
endif ()
69
88
70
89
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR )
You can’t perform that action at this time.
0 commit comments