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

adding gencode fix for linker #336

Merged
merged 3 commits into from
May 30, 2023
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
4 changes: 3 additions & 1 deletion BladebitCUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ target_compile_options(bladebit_cuda PRIVATE
>
)

target_link_options(bladebit_cuda PRIVATE $<DEVICE_LINK: ${cuda_archs}>)

target_link_libraries(bladebit_cuda PRIVATE bladebit_core CUDA::cudart_static)# CUDA::cuda_driver)

set_target_properties(bladebit_cuda PROPERTIES
set_target_properties(bladebit_cuda PROPERTIES
MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>
CUDA_RUNTIME_LIBRARY Static
CUDA_SEPARABLE_COMPILATION ON
Expand Down
5 changes: 4 additions & 1 deletion Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ set(preinclude_pch
$<${is_msvc_c_cpp}:/FIpch.h>
)

# See: https://gitlab.kitware.com/cmake/cmake/-/issues/18265
cmake_policy(SET CMP0105 NEW)

set(cuda_archs

$<${is_cuda_release}:
Expand All @@ -137,4 +140,4 @@ set(cuda_archs
-arch=native
# -gencode=arch=compute_52,code=sm_52 # Maxwell
>
)
)
2 changes: 2 additions & 0 deletions Harvester.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ target_compile_options(bladebit_harvester PRIVATE
# $<${have_cuda}:${cuda_archs}>
)

target_link_options(bladebit_harvester PRIVATE $<DEVICE_LINK: ${cuda_archs}>)

target_link_libraries(bladebit_harvester PRIVATE
bladebit_config
Threads::Threads
Expand Down