You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.0 KiB
24 lines
1.0 KiB
3 years ago
|
function(c6x_find_compiler compiler_path compiler_exe)
|
||
|
# Search user provided path first.
|
||
|
find_program(
|
||
|
${compiler_path} ${compiler_exe}
|
||
|
PATHS "d:/ti/ccsv5/tools/compiler/c6000_7.4.4" "d:/ti/ccsv5/tools/compiler/c6000_7.4.1" "c:/ti/ccsv5/tools/compiler/c6000_7.4.4" "c:/ti/ccsv5/tools/compiler/c6000_7.4.1"
|
||
|
PATH_SUFFIXES bin
|
||
|
NO_DEFAULT_PATH
|
||
|
)
|
||
|
|
||
|
# If not then search system paths.
|
||
|
if ("${${compiler_path}}" STREQUAL "${compiler_path}-NOTFOUND")
|
||
|
if (DEFINED ENV{C6X_TOOLCHAIN_PATH})
|
||
|
message(WARNING "C6X_TOOLCHAIN_PATH specified ($ENV{C6X_TOOLCHAIN_PATH}), but ${compiler_exe} not found there")
|
||
|
endif()
|
||
|
find_program(${compiler_path} ${compiler_exe})
|
||
|
endif ()
|
||
|
if ("${${compiler_path}}" STREQUAL "${compiler_path}-NOTFOUND")
|
||
|
set(C6X_TOOLCHAIN_PATH "" CACHE PATH "Path to search for compiler.")
|
||
|
message(FATAL_ERROR "Compiler '${compiler_exe}' not found, you can specify search path with\
|
||
|
\"C6X_TOOLCHAIN_PATH\".")
|
||
|
endif ()
|
||
|
endfunction()
|
||
|
|