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)
|
ENDMACRO(GET_CUDA_INC_DIRS)
|
||||||
|
|
||||||
|
|
||||||
# Get file dependencies.
|
# Get file dependencies.
|
||||||
MACRO (GET_CUFILE_DEPENDENCIES dependencies file)
|
MACRO (GET_CUFILE_DEPENDENCIES dependencies file)
|
||||||
GET_FILENAME_COMPONENT(filepath ${file} PATH)
|
GET_FILENAME_COMPONENT(filepath ${file} PATH)
|
||||||
|
|
||||||
# parse file for dependencies
|
# 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})
|
SET(${dependencies})
|
||||||
|
|
||||||
FOREACH(DEP ${DEPS})
|
FOREACH(DEP ${DEPS})
|
||||||
STRING(REGEX REPLACE "#[ \t]*include[ \t]+\"" "" DEP "${DEP}")
|
STRING(REGEX REPLACE "#[ \t]*include[ \t]+\"" "" DEP "${DEP}")
|
||||||
|
|
||||||
FIND_PATH(PATH_OF_${DEP} ${DEP}
|
FIND_PATH(PATH_OF_${DEP} ${DEP}
|
||||||
${filepath})
|
${filepath})
|
||||||
|
|
||||||
IF(NOT ${PATH_OF_${DEP}} STREQUAL PATH_OF_${DEP}-NOTFOUND)
|
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})
|
SET(${dependencies} ${${dependencies}} ${PATH_OF_${DEP}}/${DEP})
|
||||||
ENDIF(NOT ${PATH_OF_${DEP}} STREQUAL PATH_OF_${DEP}-NOTFOUND)
|
ENDIF(NOT ${PATH_OF_${DEP}} STREQUAL PATH_OF_${DEP}-NOTFOUND)
|
||||||
|
|
||||||
# reset path.
|
|
||||||
#SET(PATH_OF_${DEP})
|
|
||||||
ENDFOREACH(DEP)
|
ENDFOREACH(DEP)
|
||||||
|
|
||||||
ENDMACRO (GET_CUFILE_DEPENDENCIES)
|
ENDMACRO (GET_CUFILE_DEPENDENCIES)
|
||||||
|
Loading…
Reference in New Issue
Block a user