https://github.com/halide/Halide
Raw File
Tip revision: 718989c60dd348036c6e605527457be02cd4e276 authored by Andrew Adams on 12 March 2021, 21:47:41 UTC
Slightly more general
Tip revision: 718989c
MakeShellPath.cmake
##
# Convenience function for creating shell paths
##

function(make_shell_path OUTVAR)
    if (WIN32)
        set(SEP "\\$<SEMICOLON>")
    else ()
        set(SEP ":")
    endif ()

    list(TRANSFORM ARGN REPLACE "^(.+)$" "$<SHELL_PATH:\\1>")
    string(REPLACE ";" "${SEP}" ARGN "${ARGN}")
    set(${OUTVAR} "${ARGN}" PARENT_SCOPE)
endfunction()
back to top