Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake cuda fixes #83

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
lib/*

build/
install/
Doc/latex/
Doc/html/

Expand Down
6 changes: 4 additions & 2 deletions cmake/Modules/CUDASamples.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ if(NOT CUDASAMPLES_FOUND)
endif()

cmessage(STATUS "Using the following CUDA samples paths: ${CMAKE_CUDA_SAMPLES_PATH}")
target_include_directories(MaCh3CompilerOptions INTERFACE ${CMAKE_CUDA_SAMPLES_PATH})

target_include_directories(MaCh3CompilerOptions INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CUDA_SAMPLES_PATH}>"
"$<INSTALL_INTERFACE:include>"
)

# KS: Perform fancy CUDA Benchmarking
DefineEnabledRequiredSwitch(MaCh3_GPU_BENCHMARK FALSE)
Expand Down
6 changes: 5 additions & 1 deletion cmake/Modules/CUDASetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ else()
target_compile_definitions(MaCh3CompilerOptions INTERFACE "$<$<COMPILE_LANGUAGE:CUDA>:CUDA_ERROR_CHECK>")
endif()
target_include_directories(MaCh3CompilerOptions INTERFACE ${CUDAToolkit_INCLUDE_DIRS})
include(${CMAKE_CURRENT_LIST_DIR}/CUDASamples.cmake)

if(MaCh3_DEBUG_ENABLED)
include(${CMAKE_CURRENT_LIST_DIR}/CUDASamples.cmake)
endif()


#KS: Keep this for backward compatibility

Expand Down
Loading