Skip to content

Commit

Permalink
attempt to fix CUDA build
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Aug 25, 2023
1 parent ce8a765 commit 8f24f61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions GPUQREngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ set_target_properties ( GPUQREngine PROPERTIES
target_include_directories ( GPUQREngine PRIVATE
${CUDAToolkit_INCLUDE_DIRS}
${GPUQRENGINE_INCLUDES}
$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )

if ( SUITESPARSE_CUDA )
target_include_directories ( GPUQREngine PRIVATE
$<TARGET_PROPERTY:SuiteSparse::GPURuntime,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::GPURuntime,INTERFACE_INCLUDE_DIRECTORIES>" )

set_target_properties ( GPUQREngine PROPERTIES POSITION_INDEPENDENT_CODE ON )
set_target_properties ( GPUQREngine PROPERTIES CUDA_SEPARABLE_COMPILATION ON )
Expand Down Expand Up @@ -205,11 +205,11 @@ if ( NOT NSTATIC )
target_include_directories ( GPUQREngine_static PRIVATE
${CUDAToolkit_INCLUDE_DIRS}
${GPUQRENGINE_INCLUDES}
$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )

if ( SUITESPARSE_CUDA )
target_include_directories ( GPUQREngine_static PRIVATE
$<TARGET_PROPERTY:SuiteSparse::GPURuntime,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::GPURuntime,INTERFACE_INCLUDE_DIRECTORIES>" )

set_target_properties ( GPUQREngine_static PROPERTIES CUDA_SEPARABLE_COMPILATION on )
set_target_properties ( GPUQREngine_static PROPERTIES POSITION_INDEPENDENT_CODE on )
Expand Down
12 changes: 6 additions & 6 deletions SPQR/SPQRGPU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,30 +71,30 @@ include_directories ( ${SPQR_CUDA_INCLUDES} ${CUDAToolkit_INCLUDE_DIRS} )

if ( TARGET SuiteSparse::GPUQREngine )
target_include_directories ( SPQR_CUDA PRIVATE
$<TARGET_PROPERTY:SuiteSparse::GPUQREngine,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::GPUQREngine,INTERFACE_INCLUDE_DIRECTORIES>" )
target_include_directories ( SPQR_CUDA_static PRIVATE
$<TARGET_PROPERTY:SuiteSparse::GPUQREngine,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::GPUQREngine,INTERFACE_INCLUDE_DIRECTORIES>" )
endif ( )

if ( TARGET SuiteSparse::GPURuntime )
target_include_directories ( SPQR_CUDA PRIVATE
$<TARGET_PROPERTY:SuiteSparse::GPURuntime,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::GPURuntime,INTERFACE_INCLUDE_DIRECTORIES>" )
target_include_directories ( SPQR_CUDA_static PRIVATE
$<TARGET_PROPERTY:SuiteSparse::GPURuntime,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::GPURuntime,INTERFACE_INCLUDE_DIRECTORIES>" )
endif ( )

target_include_directories ( SPQR_CUDA PRIVATE
${CUDAToolkit_INCLUDE_DIRS}
${SPQR_CUDA_INCLUDES}
$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )
set_target_properties ( SPQR_CUDA PROPERTIES POSITION_INDEPENDENT_CODE ON )
set_target_properties ( SPQR_CUDA PROPERTIES CUDA_SEPARABLE_COMPILATION ON )

if ( NOT NSTATIC )
target_include_directories ( SPQR_CUDA_static PRIVATE
${CUDAToolkit_INCLUDE_DIRS}
${SPQR_CUDA_INCLUDES}
$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )
set_target_properties ( SPQR_CUDA_static PROPERTIES CUDA_SEPARABLE_COMPILATION on )
set_target_properties ( SPQR_CUDA_static PROPERTIES POSITION_INDEPENDENT_CODE on )

Expand Down
4 changes: 2 additions & 2 deletions SuiteSparse_GPURuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ target_include_directories ( GPURuntime PRIVATE
${SUITESPARSE_GPURUNTIME_INCLUDES} )

target_include_directories ( GPURuntime PUBLIC
$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )

if ( SUITESPARSE_CUDA )
set_target_properties ( GPURuntime PROPERTIES POSITION_INDEPENDENT_CODE ON )
Expand Down Expand Up @@ -139,7 +139,7 @@ if ( NOT NSTATIC )
${SUITESPARSE_GPURUNTIME_INCLUDES} )

target_include_directories ( GPURuntime_static PUBLIC
$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES> )
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )

if ( SUITESPARSE_CUDA )
set_target_properties ( GPURuntime_static PROPERTIES CUDA_SEPARABLE_COMPILATION on )
Expand Down

2 comments on commit 8f24f61

@mmuetzel
Copy link
Contributor

@mmuetzel mmuetzel commented on 8f24f61 Aug 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quoting generator expressions might "accidentally" work (because they are evaluated twice?). But imho, this commit should be reverted.

@DrTimothyAldenDavis
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK -- thanks for the feedback. I appreciate your help a lot.

I was just following the rest of the cases where this text was used. Everywhere else, it was inside a double quote, and this one was different, so I thought that might be the problem.

Please sign in to comment.