File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -397,4 +397,27 @@ function(swift_add_test target)
397397    add_dependencies (build -post-build -tests ${target} )
398398    add_dependencies (post-build -${target}  build -post-build -tests)
399399  endif ()
400+ 
401+   foreach (src ${x_SRCS} )
402+     get_filename_component (absolute_src ${src}  ABSOLUTE )
403+     if (${absolute_src}  MATCHES  "${CMAKE_BINARY_DIR} .*" )
404+       continue ()
405+     endif ()
406+     string (REPLACE ${PROJECT_SOURCE_DIR} / ""  relative_src ${absolute_src} )
407+ 
408+     set_property (GLOBAL 
409+       APPEND_STRING
410+       PROPERTY TEST_SRCS "\\ n${relative_src} " )
411+   endforeach ()
412+ 
400413endfunction ()
414+ 
415+ macro (swift_add_test_srcs_target)
416+   get_property (test_srcs GLOBAL  PROPERTY TEST_SRCS)
417+ 
418+   string  (REPLACE ";"  "\\ n"  test_srcs_str "${test_srcs} " )
419+ 
420+   add_custom_target (test_srcs
421+     COMMAND  echo "'${test_srcs_str} '"  | tail -n +2 | sort  > cmake_test_srcs.txt
422+   )
423+ endmacro ()
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments