From e4ad766315879e1ff05bb111229f073f8f0ed68e Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Mon, 10 Oct 2022 21:30:02 +0200 Subject: PassFish: Initial Commit Well, that's a lie. But nobody needs to see all the iterations I decided to sweep under the rug. That said, I think the repo is, while not clean, clean enough now, to not be embarrassed by uploading it to github. --- cmake/FindRust.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cmake/FindRust.cmake (limited to 'cmake/FindRust.cmake') diff --git a/cmake/FindRust.cmake b/cmake/FindRust.cmake new file mode 100644 index 0000000..f87ca02 --- /dev/null +++ b/cmake/FindRust.cmake @@ -0,0 +1,13 @@ +include(FindPackageHandleStandardArgs) +find_program(Rust_EXECUTABLE rustc) +execute_process(COMMAND "${Rust_EXECUTABLE}" --version + OUTPUT_VARIABLE Rust_VERSION_OUTPUT) +STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" + Rust_VERSION "${Rust_VERSION_OUTPUT}") +message(STATUS "Rust Exe=${Rust_EXECUTABLE}") +message(STATUS "Rust Version=${Rust_VERSION}") +message(STATUS "Full Rust Version= ${Rust_VERSION_OUTPUT}") +find_package_handle_standard_args(Rust + REQUIRED_VARS Rust_EXECUTABLE + VERSION_VAR Rust_VERSION) +mark_as_advanced(Rust_EXECUTABLE) -- cgit v1.2.3