find_program(RUSTC rustc)

add_custom_command(
    OUTPUT rsnex
    COMMAND ${RUSTC} -o rsnex rsnex.rs
    DEPENDS rsnex.rs
)

add_custom_target(rsnex_target ALL
    DEPENDS rsnex
)

find_program(RUSTC rustc)

add_custom_command(
    OUTPUT rsnex${CMAKE_EXECUTABLE_SUFFIX}
    COMMAND ${RUSTC} -o rsnex${CMAKE_EXECUTABLE_SUFFIX} rsnex.rs
    DEPENDS rsnex.rs
)

add_custom_target(rsnex_target ALL
    DEPENDS rsnex${CMAKE_EXECUTABLE_SUFFIX}
)

Create rsnex with correct executable suffix
Create rsnex with correct executable suffix
