mirror of
				https://github.com/NVIDIA/cuda-samples.git
				synced 2025-11-04 15:47:50 +08:00 
			
		
		
		
	Copy all the needed .ll and .dll for 7_libNVVM
This commit is contained in:
		
							parent
							
								
									7a9bd38ecc
								
							
						
					
					
						commit
						4fcfa82d7d
					
				@ -28,11 +28,11 @@ add_custom_target(clobber)
 | 
			
		||||
add_custom_target(testrun)
 | 
			
		||||
 | 
			
		||||
add_test(NAME test-cuda-shared-memory-shared_memory
 | 
			
		||||
	COMMAND "${CMAKE_CURRENT_BINARY_DIR}/ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/shared_memory.ll"
 | 
			
		||||
	COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/shared_memory.ll"
 | 
			
		||||
	WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
 | 
			
		||||
 | 
			
		||||
add_test(NAME test-cuda-shared-memory-extern_shared_memory
 | 
			
		||||
	COMMAND "${CMAKE_CURRENT_BINARY_DIR}/ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/extern_shared_memory.ll"
 | 
			
		||||
	COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/extern_shared_memory.ll"
 | 
			
		||||
	WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
 | 
			
		||||
 | 
			
		||||
set_tests_properties(test-cuda-shared-memory-shared_memory
 | 
			
		||||
 | 
			
		||||
@ -46,4 +46,17 @@ install(FILES dsl-gpu64.ll DESTINATION bin)
 | 
			
		||||
 | 
			
		||||
# 'dsl' will load dsl-gpu64.ll from the current working directory. That
 | 
			
		||||
# .ll file should be present where tests are executed (the build directory).
 | 
			
		||||
file(COPY dsl-gpu64.ll DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
 | 
			
		||||
add_custom_command(
 | 
			
		||||
    TARGET dsl
 | 
			
		||||
    POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
            "${CMAKE_CURRENT_SOURCE_DIR}/dsl-gpu64.ll" "$<TARGET_FILE_DIR:dsl>"
 | 
			
		||||
)
 | 
			
		||||
if (WIN32)
 | 
			
		||||
add_custom_command(
 | 
			
		||||
    TARGET dsl
 | 
			
		||||
    POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
            "${CMAKE_BINARY_DIR}/nvvm64_40_0.dll" "$<TARGET_FILE_DIR:dsl>"
 | 
			
		||||
)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
@ -43,4 +43,18 @@ else (WIN32)
 | 
			
		||||
endif (WIN32)
 | 
			
		||||
 | 
			
		||||
install(TARGETS ptxgen DESTINATION bin)
 | 
			
		||||
file(COPY test.ll DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
 | 
			
		||||
 | 
			
		||||
add_custom_command(
 | 
			
		||||
    TARGET ptxgen
 | 
			
		||||
    POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
            "${CMAKE_CURRENT_SOURCE_DIR}/test.ll" "$<TARGET_FILE_DIR:ptxgen>"
 | 
			
		||||
)
 | 
			
		||||
if (WIN32)
 | 
			
		||||
add_custom_command(
 | 
			
		||||
    TARGET ptxgen
 | 
			
		||||
    POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
            "${CMAKE_BINARY_DIR}/nvvm64_40_0.dll" "$<TARGET_FILE_DIR:ptxgen>"
 | 
			
		||||
)
 | 
			
		||||
endif ()
 | 
			
		||||
@ -45,4 +45,17 @@ install(FILES simple-gpu64.ll DESTINATION bin)
 | 
			
		||||
 | 
			
		||||
# 'simple' will load simple-gpu64.ll from the current working directory. That
 | 
			
		||||
# .ll file should be present where tests are executed (the build directory).
 | 
			
		||||
file(COPY simple-gpu64.ll DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
 | 
			
		||||
add_custom_command(
 | 
			
		||||
    TARGET simple
 | 
			
		||||
    POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
            "${CMAKE_CURRENT_SOURCE_DIR}/simple-gpu64.ll" "$<TARGET_FILE_DIR:simple>"
 | 
			
		||||
)
 | 
			
		||||
if (WIN32)
 | 
			
		||||
add_custom_command(
 | 
			
		||||
    TARGET simple
 | 
			
		||||
    POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
            "${CMAKE_BINARY_DIR}/nvvm64_40_0.dll" "$<TARGET_FILE_DIR:simple>"
 | 
			
		||||
)
 | 
			
		||||
endif ()
 | 
			
		||||
@ -26,11 +26,11 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
add_test(NAME test-syscalls-malloc-free
 | 
			
		||||
	COMMAND "${CMAKE_CURRENT_BINARY_DIR}/ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/malloc-free.ll"
 | 
			
		||||
	COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/malloc-free.ll"
 | 
			
		||||
  WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
 | 
			
		||||
 | 
			
		||||
add_test(NAME test-syscalls-vprintf
 | 
			
		||||
	COMMAND "${CMAKE_CURRENT_BINARY_DIR}/ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/vprintf.ll"
 | 
			
		||||
	COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/vprintf.ll"
 | 
			
		||||
  WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
 | 
			
		||||
 | 
			
		||||
set_tests_properties(test-syscalls-vprintf test-syscalls-malloc-free
 | 
			
		||||
 | 
			
		||||
@ -49,4 +49,17 @@ install(FILES uvmlite64.ll DESTINATION bin)
 | 
			
		||||
 | 
			
		||||
# 'uvmlite' will load uvmlite64.ll from the current working directory. That
 | 
			
		||||
# .ll file should be present where tests are executed (the build directory).
 | 
			
		||||
file(COPY uvmlite64.ll DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
 | 
			
		||||
add_custom_command(
 | 
			
		||||
    TARGET uvmlite
 | 
			
		||||
    POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
            "${CMAKE_CURRENT_SOURCE_DIR}/uvmlite64.ll" "$<TARGET_FILE_DIR:uvmlite>"
 | 
			
		||||
)
 | 
			
		||||
if (WIN32)
 | 
			
		||||
add_custom_command(
 | 
			
		||||
    TARGET uvmlite
 | 
			
		||||
    POST_BUILD
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -E copy_if_different
 | 
			
		||||
            "${CMAKE_BINARY_DIR}/nvvm64_40_0.dll" "$<TARGET_FILE_DIR:uvmlite>"
 | 
			
		||||
)
 | 
			
		||||
endif ()
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user