diff --git a/drivers/Spectrum-MI40xxSeries/CMakeLists.txt b/drivers/Spectrum-MI40xxSeries/CMakeLists.txt index 2527815..64b7bb8 100644 --- a/drivers/Spectrum-MI40xxSeries/CMakeLists.txt +++ b/drivers/Spectrum-MI40xxSeries/CMakeLists.txt @@ -25,7 +25,11 @@ message("\nIf you have signed the NDA from Spectrum and got a kernel driver tarb file(GLOB MILIST "drvsrc_all_V*.tgz" ) # sort and select last (alphabetic order) tarball driver list(SORT MILIST) -list(GET MILIST -1 MITGZ ) +if(MILIST) + list(GET MILIST -1 MITGZ ) +else() + set(MITGZ "non-existing-file") +endif() #message(STATUS ${MITGZ}) if(EXISTS ${MITGZ}) @@ -33,9 +37,9 @@ if(EXISTS ${MITGZ}) add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv COMMAND tar xfvz ${MITGZ} COMMAND cp -v ${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv/makefile.kernel26 ${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv/Makefile - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Unpacking Spectrum driver tarball" - VERBATIM) + VERBATIM) set(SPC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv") add_custom_target(spc_smp ALL DEPENDS linux/src_all/micx_drv) elseif(DEFINED ENV{SPC_SOURCE})