Computer Assited Medical Intervention Tool Kit
version 4.1
doxygencmake
GetSubdirectoryFiles.h
Go to the documentation of this file.
1
get_subdirectoryfiles
(){ Path Filenames)
21
set
(Filenames)
22
file(GLOB children ${Path}
/*)
23
24
# continue process only if there is some file to process
25
if (children)
26
# create the copy of children
27
set(childrenSorted)
28
foreach(FILENAME ${children})
29
string(TOLOWER "${FILENAME}" filenameLower)
30
# build a new variable (map) to associate the key filenameLower to the real filename FILENAME
31
set("map_${filenameLower}" "${FILENAME}")
32
# add the key to a specific list
33
list(APPEND childrenSorted "${filenameLower}")
34
endforeach()
35
36
# sort the key list (all lowercase)
37
list(SORT childrenSorted)
38
39
# loop on all keys
40
foreach(filenameLower ${childrenSorted})
41
# get the filename from the lower case name
42
set(realFilename ${map_${filenameLower}})
43
if(NOT IS_DIRECTORY ${realFilename})
44
set(${Filenames} ${${Filenames}} ${realFilename})
45
endif()
46
endforeach()
47
endif()
48
end(){)
get_subdirectoryfiles
get_subdirectoryfiles()
macro get_subdirectoryfiles get the names of all the files (and not directories) contained in a defin...
Definition:
GetSubdirectoryFiles.h:20
Generated by
1.8.13