CMake: cuFFT static for jfjoch_fpga_stills_test alone
The other builds link cuFFT as before (dynamic on the server build, static in the portable ones). jfjoch_fpga_stills_test is copied to the FPGA servers on its own: its JFJOCH_STATIC_CUFFT property makes the indexer and the beam-centre FFT, which choose by a generator expression on the linking target, give it libcufft_static.a, and it gets the device-link step that needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqXYdHHZ4cogS1mrGUtfN7
This commit is contained in:
1 parent
4b8ed5c0d5
commit
41f7edab76
3 files changed
+13
No files matched your search
@@ -49,6 +49,9 @@ IF (JFJOCH_CUDA_AVAILABLE)
|
||||
# note in image_analysis/indexing/CMakeLists.txt.
|
||||
IF (JFJOCH_PORTABLE_ONLY AND TARGET CUDA::cufft_static)
|
||||
TARGET_LINK_LIBRARIES(JFJochGeomRefinement CUDA::cufft_static)
|
||||
ELSEIF (TARGET CUDA::cufft_static)
|
||||
TARGET_LINK_LIBRARIES(JFJochGeomRefinement
|
||||
$<IF:$<BOOL:$<TARGET_PROPERTY:JFJOCH_STATIC_CUFFT>>,CUDA::cufft_static,CUDA::cufft>)
|
||||
ELSE()
|
||||
TARGET_LINK_LIBRARIES(JFJochGeomRefinement CUDA::cufft)
|
||||
ENDIF()
|
||||
|
||||
@@ -54,8 +54,13 @@ IF (JFJOCH_CUDA_AVAILABLE)
|
||||
# Both halves matter: the server build keeps the shared library (its .deb/.rpm take CUDA from the
|
||||
# distro, and every executable there -- broker, tests, tools -- would otherwise need the device
|
||||
# link below), and Windows has no static cuFFT to link even for the portable products.
|
||||
# One exception in the server build: an executable with the JFJOCH_STATIC_CUFFT property (set on
|
||||
# jfjoch_fpga_stills_test, which is copied to the FPGA servers on its own) gets the static library.
|
||||
IF (JFJOCH_PORTABLE_ONLY AND TARGET CUDA::cufft_static)
|
||||
TARGET_LINK_LIBRARIES(JFJochIndexing fast_indexer_static CUDA::cufft_static)
|
||||
ELSEIF (TARGET CUDA::cufft_static)
|
||||
TARGET_LINK_LIBRARIES(JFJochIndexing fast_indexer_static
|
||||
$<IF:$<BOOL:$<TARGET_PROPERTY:JFJOCH_STATIC_CUFFT>>,CUDA::cufft_static,CUDA::cufft>)
|
||||
ELSE()
|
||||
TARGET_LINK_LIBRARIES(JFJochIndexing fast_indexer_static CUDA::cufft)
|
||||
ENDIF()
|
||||
|
||||
@@ -70,6 +70,11 @@ IF(NOT JFJOCH_PORTABLE_ONLY)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_fpga_stills_test jfjoch_fpga_stills_test.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_fpga_stills_test JFJochReceiver JFJochReader)
|
||||
# Copied to the FPGA servers on its own: cuFFT linked statically (see image_analysis/indexing/CMakeLists.txt),
|
||||
# which needs the device-link step (see rugnux/CMakeLists.txt)
|
||||
IF (JFJOCH_CUDA_AVAILABLE AND TARGET CUDA::cufft_static)
|
||||
SET_TARGET_PROPERTIES(jfjoch_fpga_stills_test PROPERTIES JFJOCH_STATIC_CUFFT ON CUDA_RESOLVE_DEVICE_SYMBOLS ON)
|
||||
ENDIF()
|
||||
INSTALL(TARGETS jfjoch_fpga_stills_test RUNTIME COMPONENT jfjoch)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_simplon_test jfjoch_simplon_test.cpp)
|
||||
|
||||
Reference in new issue
Block a user