fixed cmake build for spc kernel driver
This commit is contained in:
parent
72b0d17a33
commit
2dcee09192
@ -22,10 +22,10 @@ add_custom_command(OUTPUT ${SPC_HEADERS}
|
|||||||
# If the "linux" folder exists the driver will be build
|
# If the "linux" folder exists the driver will be build
|
||||||
|
|
||||||
if(DEFINED ENV{SPC_SOURCE})
|
if(DEFINED ENV{SPC_SOURCE})
|
||||||
message("SPC_SOURCE environment variable set")
|
message(STATUS "SPC_SOURCE environment variable set" $ENV{SPC_SOURCE})
|
||||||
set(SPC_SRC $ENV{SPC_SOURCE})
|
set(SPC_SRC $ENV{SPC_SOURCE})
|
||||||
else()
|
else()
|
||||||
message("Spectrum driver source path not defined in envirnoment variable SPC_SOURCE")
|
message(WARNING "Spectrum driver source path not defined in envirnoment variable SPC_SOURCE")
|
||||||
set(SPC_SRC ${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv)
|
set(SPC_SRC ${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv)
|
||||||
endif()
|
endif()
|
||||||
set(DRIVER_FILE ${SPC_SRC}/spc_smp.ko )
|
set(DRIVER_FILE ${SPC_SRC}/spc_smp.ko )
|
||||||
@ -34,9 +34,6 @@ set(KBUILD_CMD ${CMAKE_MAKE_PROGRAM}
|
|||||||
-C ${KERNEL_DIR}
|
-C ${KERNEL_DIR}
|
||||||
M=${SPC_SRC} modules)
|
M=${SPC_SRC} modules)
|
||||||
|
|
||||||
#unset(spc_src CACHE)
|
|
||||||
#find_file(spc_src )
|
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${DRIVER_FILE}
|
add_custom_command(OUTPUT ${DRIVER_FILE}
|
||||||
COMMAND ${KBUILD_CMD}
|
COMMAND ${KBUILD_CMD}
|
||||||
COMMENT "Building spc_smp.ko"
|
COMMENT "Building spc_smp.ko"
|
||||||
@ -47,7 +44,7 @@ if(EXISTS ${SPC_SRC})
|
|||||||
install(FILES ${DRIVER_FILE} DESTINATION /lib/modules/${CMAKE_SYSTEM_VERSION}/kernel/damaris)
|
install(FILES ${DRIVER_FILE} DESTINATION /lib/modules/${CMAKE_SYSTEM_VERSION}/kernel/damaris)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(Spectrum MI40xx dirver not found, unpack and configure it)
|
message("Spectrum MI40xx kernel driver not found " ${SPC_SRC} " unpack and configure it")
|
||||||
endif()
|
endif()
|
||||||
add_library(Spectrum_MI40xxSeries STATIC Spectrum-MI40xxSeries.cpp GatedData.cpp ${SPC_HEADERS})
|
add_library(Spectrum_MI40xxSeries STATIC Spectrum-MI40xxSeries.cpp GatedData.cpp ${SPC_HEADERS})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user