Skip to content

Commit

Permalink
adding gencode fix for linker (#336)
Browse files Browse the repository at this point in the history
* adding gencode fix for linker

* I AM LINTER

* argg keyboard
  • Loading branch information
wallentx authored May 30, 2023
1 parent a1c1642 commit ba7d0df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
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

0 comments on commit ba7d0df

Please sign in to comment.