Skip to content

Commit 95a078b

Browse files
authored
Merge pull request #5 from antoinebou12/windows-cuda
Remove -fpic from Windows CUDA issue with the build for ipc-toolkit with vcpkg on Windows
2 parents 318352e + decd456 commit 95a078b

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

.github/workflows/continuous.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,4 @@ jobs:
164164

165165
# GitHub Actions does not support CUDA, so we cannot run the tests.
166166
# - name: Tests
167-
# run: cd build; ctest --verbose -j2
167+
# run: cd build; ctest --verbose -j2

CMakeLists.txt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ if(SCALABLE_CCD_WITH_CUDA)
169169
# library to be built with -dc as the member functions could be called by
170170
# other libraries and executables.
171171
set_target_properties(scalable_ccd PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
172-
172+
173173
if(DEFINED SCALABLE_CCD_CUDA_ARCHITECTURES)
174174
message(STATUS "CUDA_ARCHITECTURES was specified, skipping auto-detection")
175175
set(CMAKE_CUDA_ARCHITECTURES ${SCALABLE_CCD_CUDA_ARCHITECTURES})
@@ -195,15 +195,13 @@ if(SCALABLE_CCD_WITH_CUDA)
195195
BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
196196
endif()
197197

198-
target_compile_options(scalable_ccd PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:
199-
--generate-line-info
200-
--use_fast_math
201-
--relocatable-device-code=true
202-
203-
# --ptxas-options=-v
204-
# --maxrregcount=7
205-
-fPIC # https://stackoverflow.com/questions/5311515/gcc-fpic-option
206-
>)
198+
target_compile_options(scalable_ccd PRIVATE
199+
$<$<COMPILE_LANGUAGE:CUDA>:
200+
--generate-line-info
201+
--use_fast_math
202+
--relocatable-device-code=true
203+
>
204+
)
207205

208206
find_package(CUDAToolkit)
209207
target_link_libraries(scalable_ccd PUBLIC CUDA::cudart)
@@ -218,4 +216,4 @@ if(SCALABLE_CCD_TOPLEVEL_PROJECT AND SCALABLE_CCD_BUILD_TESTS)
218216
include(CTest)
219217
enable_testing()
220218
add_subdirectory(tests)
221-
endif()
219+
endif()

0 commit comments

Comments
 (0)