mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-01-08 10:27:49 +08:00
Merge branch 'shawnz_bug_fix' into 'master'
Fix bug 5150289, 5454390 and 5456523 See merge request cuda-samples/cuda-samples!130
This commit is contained in:
commit
12b046a80e
@ -29,8 +29,17 @@ include(CheckIncludeFile)
|
||||
# Check for the GLFW/glfw3.h header
|
||||
check_include_file("GLFW/glfw3.h" HAVE_GLFW3_H)
|
||||
|
||||
# Find GLFW header and lib for Windows
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING)
|
||||
# Check for SUSE Linux
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
file(READ "/etc/os-release" OS_RELEASE_CONTENTS)
|
||||
if(OS_RELEASE_CONTENTS MATCHES "ID=[^ ]*suse[^ ]*")
|
||||
message(STATUS "SUSE Linux detected")
|
||||
set(SUSE_LINUX TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Find GLFW header and lib for Windows and SUSE Linux
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING OR SUSE_LINUX)
|
||||
set(GLFW_INCLUDE_DIRS "${GLFW_INCLUDE_DIR}" "${CMAKE_INCLUDE_PATH}")
|
||||
find_file(GLFW3_H "GLFW/glfw3.h" PATHS ${GLFW_INCLUDE_DIRS})
|
||||
find_library(GLFW3_LIB
|
||||
@ -64,7 +73,7 @@ if(${Vulkan_FOUND})
|
||||
${Vulkan_LIBRARIES}
|
||||
OpenGL::GL
|
||||
)
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING)
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING OR SUSE_LINUX)
|
||||
target_include_directories(simpleVulkan PUBLIC
|
||||
${GLFW_INCLUDE_DIRS}
|
||||
)
|
||||
@ -76,6 +85,12 @@ if(${Vulkan_FOUND})
|
||||
glfw
|
||||
)
|
||||
endif()
|
||||
# Need to add X11 for SUSE Linux explicitly
|
||||
if(SUSE_LINUX)
|
||||
target_link_libraries(simpleVulkan
|
||||
X11
|
||||
)
|
||||
endif()
|
||||
add_custom_command(TARGET simpleVulkan POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sinewave.frag
|
||||
|
||||
@ -28,8 +28,17 @@ include(CheckIncludeFile)
|
||||
# Check for the GLFW/glfw3.h header
|
||||
check_include_file("GLFW/glfw3.h" HAVE_GLFW3_H)
|
||||
|
||||
# Find GLFW header and lib for Windows
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING)
|
||||
# Check for SUSE Linux
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
file(READ "/etc/os-release" OS_RELEASE_CONTENTS)
|
||||
if(OS_RELEASE_CONTENTS MATCHES "ID=[^ ]*suse[^ ]*")
|
||||
message(STATUS "SUSE Linux detected")
|
||||
set(SUSE_LINUX TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Find GLFW header and lib for Windows and SUSE Linux
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING OR SUSE_LINUX)
|
||||
set(GLFW_INCLUDE_DIRS "${GLFW_INCLUDE_DIR}" "${CMAKE_INCLUDE_PATH}")
|
||||
find_file(GLFW3_H "GLFW/glfw3.h" PATHS ${GLFW_INCLUDE_DIRS})
|
||||
find_library(GLFW3_LIB
|
||||
@ -64,7 +73,7 @@ if(${Vulkan_FOUND})
|
||||
OpenGL::GL
|
||||
CUDA::cuda_driver
|
||||
)
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING)
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING OR SUSE_LINUX)
|
||||
target_include_directories(simpleVulkanMMAP PUBLIC
|
||||
${GLFW_INCLUDE_DIRS}
|
||||
)
|
||||
@ -76,6 +85,12 @@ if(${Vulkan_FOUND})
|
||||
glfw
|
||||
)
|
||||
endif()
|
||||
# Need to add X11 for SUSE Linux explicitly
|
||||
if(SUSE_LINUX)
|
||||
target_link_libraries(simpleVulkanMMAP
|
||||
X11
|
||||
)
|
||||
endif()
|
||||
add_custom_command(TARGET simpleVulkanMMAP POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/montecarlo.frag
|
||||
|
||||
@ -28,8 +28,17 @@ include(CheckIncludeFile)
|
||||
# Check for the GLFW/glfw3.h header
|
||||
check_include_file("GLFW/glfw3.h" HAVE_GLFW3_H)
|
||||
|
||||
# Find GLFW header and lib for Windows
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING)
|
||||
# Check for SUSE Linux
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
file(READ "/etc/os-release" OS_RELEASE_CONTENTS)
|
||||
if(OS_RELEASE_CONTENTS MATCHES "ID=[^ ]*suse[^ ]*")
|
||||
message(STATUS "SUSE Linux detected")
|
||||
set(SUSE_LINUX TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Find GLFW header and lib for Windows and SUSE Linux
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING OR SUSE_LINUX)
|
||||
set(GLFW_INCLUDE_DIRS "${GLFW_INCLUDE_DIR}" "${CMAKE_INCLUDE_PATH}")
|
||||
find_file(GLFW3_H "GLFW/glfw3.h" PATHS ${GLFW_INCLUDE_DIRS})
|
||||
find_library(GLFW3_LIB
|
||||
@ -63,7 +72,7 @@ if(${Vulkan_FOUND})
|
||||
${Vulkan_LIBRARIES}
|
||||
OpenGL::GL
|
||||
)
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING)
|
||||
if(WIN32 OR CMAKE_CROSSCOMPILING OR SUSE_LINUX)
|
||||
target_include_directories(vulkanImageCUDA PUBLIC
|
||||
${GLFW_INCLUDE_DIRS}
|
||||
)
|
||||
@ -75,6 +84,12 @@ if(${Vulkan_FOUND})
|
||||
glfw
|
||||
)
|
||||
endif()
|
||||
# Need to add X11 for SUSE Linux explicitly
|
||||
if(SUSE_LINUX)
|
||||
target_link_libraries(vulkanImageCUDA
|
||||
X11
|
||||
)
|
||||
endif()
|
||||
add_custom_command(TARGET vulkanImageCUDA POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shader.frag
|
||||
|
||||
@ -8,9 +8,37 @@
|
||||
]
|
||||
},
|
||||
"ptxgen": {
|
||||
"args": [
|
||||
"test.ll",
|
||||
"-arch=compute_75"
|
||||
"runs": [
|
||||
{
|
||||
"args": [
|
||||
"test.ll"
|
||||
],
|
||||
"description": "ptxgen test"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"../cuda-shared-memory/shared_memory.ll"
|
||||
],
|
||||
"description": "cuda-shared-memory shared_memory test"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"../cuda-shared-memory/extern_shared_memory.ll"
|
||||
],
|
||||
"description": "cuda-shared-memory extern_shared_memory test"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"../syscalls/malloc-free.ll"
|
||||
],
|
||||
"description": "syscalls malloc-free test"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"../syscalls/vprintf.ll"
|
||||
],
|
||||
"description": "syscalls vprintf test"
|
||||
}
|
||||
]
|
||||
},
|
||||
"volumeRender": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user