PragmaTwice commented on code in PR #3053:
URL: https://github.com/apache/kvrocks/pull/3053#discussion_r2258723604
##########
CMakeLists.txt:
##########
@@ -16,6 +16,12 @@
# under the License.
cmake_minimum_required(VERSION 3.16)
+if(DEFINED ENV{RISCV_CROSSCOMPILE})
+ set(CMAKE_SYSTEM_NAME Linux CACHE STRING "")
+ set(CMAKE_SYSTEM_PROCESSOR riscv64 CACHE STRING "")
+ set(CMAKE_CROSSCOMPILING TRUE CACHE BOOL "")
+endif()
Review Comment:
https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html
After reading the CMake cross-compiling docs, I wonder if we can maintain
some "toolchain files" instead of such intrusive modifications? Also current we
rely on an env var "RISCV_CROSSCOMPILE", and it seems not a classic way of
tuning cmake files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]