forked from OSchip/llvm-project
				
			[CMake] Make sure add_compiler_rt_resource_file doesn't do unnecessary work
llvm-svn: 202356
This commit is contained in:
		
							parent
							
								
									8c4c09786a
								
							
						
					
					
						commit
						4cced3e19b
					
				| 
						 | 
				
			
			@ -138,9 +138,11 @@ endmacro()
 | 
			
		|||
macro(add_compiler_rt_resource_file target_name file_name)
 | 
			
		||||
  set(src_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_name}")
 | 
			
		||||
  set(dst_file "${COMPILER_RT_OUTPUT_DIR}/${file_name}")
 | 
			
		||||
  add_custom_target(${target_name}
 | 
			
		||||
  add_custom_command(OUTPUT ${dst_file}
 | 
			
		||||
    DEPENDS ${src_file}
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src_file} ${dst_file}
 | 
			
		||||
    DEPENDS ${file_name})
 | 
			
		||||
    COMMENT "Copying ${file_name}...")
 | 
			
		||||
  add_custom_target(${target_name} DEPENDS ${dst_file})
 | 
			
		||||
  # Install in Clang resource directory.
 | 
			
		||||
  install(FILES ${file_name} DESTINATION ${COMPILER_RT_INSTALL_PATH})
 | 
			
		||||
endmacro()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue