diff --git a/image_analysis/geom_refinement/CMakeLists.txt b/image_analysis/geom_refinement/CMakeLists.txt index a82fee507..e17df4797 100644 --- a/image_analysis/geom_refinement/CMakeLists.txt +++ b/image_analysis/geom_refinement/CMakeLists.txt @@ -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 + $>,CUDA::cufft_static,CUDA::cufft>) ELSE() TARGET_LINK_LIBRARIES(JFJochGeomRefinement CUDA::cufft) ENDIF() diff --git a/image_analysis/indexing/CMakeLists.txt b/image_analysis/indexing/CMakeLists.txt index e7d787197..e2e33ebaa 100644 --- a/image_analysis/indexing/CMakeLists.txt +++ b/image_analysis/indexing/CMakeLists.txt @@ -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 + $>,CUDA::cufft_static,CUDA::cufft>) ELSE() TARGET_LINK_LIBRARIES(JFJochIndexing fast_indexer_static CUDA::cufft) ENDIF() diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 9fdf2e2a9..18379427a 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -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)