Fix FindCuda cmake file.
This commit is contained in:
parent
b3ed4f8e04
commit
7f2d5d6c1a
@ -84,29 +84,29 @@ MACRO(GET_CUDA_INC_DIRS _cuda_INC_DIRS)
|
||||
|
||||
ENDMACRO(GET_CUDA_INC_DIRS)
|
||||
|
||||
|
||||
|
||||
# Get file dependencies.
|
||||
MACRO (GET_CUFILE_DEPENDENCIES dependencies file)
|
||||
GET_FILENAME_COMPONENT(filepath ${file} PATH)
|
||||
|
||||
# parse file for dependencies
|
||||
FILE(READ "${file}" CONTENTS)
|
||||
FILE(READ "${file}" CONTENTS)
|
||||
#STRING(REGEX MATCHALL "#[ \t]*include[ \t]+[<\"][^>\"]*" DEPS "${CONTENTS}")
|
||||
STRING(REGEX MATCHALL "#[ \t]*include[ \t]+\"[^\"]*" DEPS "${CONTENTS}")
|
||||
|
||||
SET(${dependencies})
|
||||
|
||||
FOREACH(DEP ${DEPS})
|
||||
STRING(REGEX REPLACE "#[ \t]*include[ \t]+\"" "" DEP "${DEP}")
|
||||
|
||||
|
||||
FIND_PATH(PATH_OF_${DEP} ${DEP}
|
||||
${filepath})
|
||||
|
||||
|
||||
IF(NOT ${PATH_OF_${DEP}} STREQUAL PATH_OF_${DEP}-NOTFOUND)
|
||||
MESSAGE("${filepath} ${PATH_OF_${DEP}}/${DEP}")
|
||||
#MESSAGE("${file} : ${PATH_OF_${DEP}}/${DEP}")
|
||||
SET(${dependencies} ${${dependencies}} ${PATH_OF_${DEP}}/${DEP})
|
||||
ENDIF(NOT ${PATH_OF_${DEP}} STREQUAL PATH_OF_${DEP}-NOTFOUND)
|
||||
|
||||
# reset path.
|
||||
#SET(PATH_OF_${DEP})
|
||||
ENDFOREACH(DEP)
|
||||
|
||||
ENDMACRO (GET_CUFILE_DEPENDENCIES)
|
||||
|
Loading…
Reference in New Issue
Block a user