File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 99set (FILE_PATH "${CMAKE_ARGV3} " )
1010
1111if (NOT ( EXISTS "${FILE_PATH} " ))
12- message (FATAL_ERROR "Test failed: File `${FILE_PATH} ` does not exist." )
12+ set (error_details "File `${FILE_PATH} ` does not exist!\n " )
13+ set (PARENT_TREE "${FILE_PATH} " )
14+ cmake_path(HAS_PARENT_PATH PARENT_TREE has_parent)
15+ while (has_parent)
16+ cmake_path(GET PARENT_TREE PARENT_PATH PARENT_TREE)
17+ cmake_path(HAS_PARENT_PATH PARENT_TREE has_parent)
18+ if (EXISTS "${PARENT_TREE} " )
19+ file (GLOB dir_contents LIST_DIRECTORIES true "${PARENT_TREE} /*" )
20+ list (APPEND error_details "Found Parent directory `${PARENT_TREE} ` exists and contains:\n " ${dir_contents} )
21+ break ()
22+ else ()
23+ list (APPEND error_details "Parent directory `${PARENT_TREE} ` also does not exist!" )
24+ endif ()
25+ endwhile ()
26+ message (FATAL_ERROR "Test failed: ${error_details} " )
1327endif ()
You can’t perform that action at this time.
0 commit comments