File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,18 +63,7 @@ if (NOT RUSTC_LLVM_VERSION STREQUAL LLVM_PACKAGE_VERSION)
6363 message (WARNING "The LLVM versions used by rustc and clang are different!" )
6464endif ()
6565
66- set (RUST_STABLE_VERSION "1.95.0" )
67-
68- function (write_rust_toolchain DIR )
69- set (_content "[toolchain]\n channel = \" ${RUST_STABLE_VERSION} \"\n " )
70- set (_file ${DIR} /rust-toolchain.toml)
71- if (EXISTS ${_file} )
72- file (READ ${_file} _existing )
73- endif ()
74- if (NOT "${_existing} " STREQUAL "${_content} " )
75- file (WRITE ${_file} ${_content} )
76- endif ()
77- endfunction ()
66+ include (${CMAKE_CURRENT_SOURCE_DIR} /cmake/rust-toolchain.cmake )
7867
7968# rule-preprocessor uses nightly
8069foreach (_dir libcc2rs rules)
Original file line number Diff line number Diff line change 1+ set (RUST_STABLE_VERSION "1.95.0" )
2+
3+ function (write_rust_toolchain DIR )
4+ set (_content "[toolchain]\n channel = \" ${RUST_STABLE_VERSION} \"\n " )
5+ set (_file ${DIR} /rust-toolchain.toml)
6+ if (EXISTS ${_file} )
7+ file (READ ${_file} _existing )
8+ endif ()
9+ if (NOT "${_existing} " STREQUAL "${_content} " )
10+ file (WRITE ${_file} ${_content} )
11+ endif ()
12+ endfunction ()
You can’t perform that action at this time.
0 commit comments