diff options
author | Brad King <brad.king@kitware.com> | 2021-07-29 12:45:27 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-07-29 12:45:40 (GMT) |
commit | 0a959bb271207f6f74024b4d8a06192db209f8ab (patch) | |
tree | 2eace9449b9396ac1ed62deb520099fa688d52b9 /Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | |
parent | 5f1afff9f79784d59618abc16d8e56a3c5f3f1e3 (diff) | |
parent | 3975678fcc3928f2a7dcd79fe9b9e9ebf3abe2b2 (diff) | |
download | CMake-0a959bb271207f6f74024b4d8a06192db209f8ab.zip CMake-0a959bb271207f6f74024b4d8a06192db209f8ab.tar.gz CMake-0a959bb271207f6f74024b4d8a06192db209f8ab.tar.bz2 |
Merge topic 'cuda_separable_clang_make' into release-3.21
3975678fcc CUDA/Clang: Simplify --register-link-binaries logic
0b1cea66cd CUDA/Clang: Fix separable compilation in non-root directories with Makefiles
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6400
Diffstat (limited to 'Tests/CudaOnly/SeparateCompilation/CMakeLists.txt')
-rw-r--r-- | Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt index 864ecbf..17069e3 100644 --- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt +++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt @@ -34,26 +34,9 @@ add_library(CUDASeparateLibB STATIC file4.cu file5.cu) target_compile_features(CUDASeparateLibB PRIVATE cuda_std_11) target_link_libraries(CUDASeparateLibB PRIVATE CUDASeparateLibA) -add_executable(CudaOnlySeparateCompilation main.cu) -target_link_libraries(CudaOnlySeparateCompilation - PRIVATE CUDASeparateLibB) -set_target_properties(CudaOnlySeparateCompilation PROPERTIES CUDA_STANDARD 11) -set_target_properties(CudaOnlySeparateCompilation PROPERTIES CUDA_STANDARD_REQUIRED TRUE) - set_target_properties(CUDASeparateLibA CUDASeparateLibB PROPERTIES CUDA_SEPARABLE_COMPILATION ON POSITION_INDEPENDENT_CODE ON) -if (CMAKE_GENERATOR MATCHES "^Visual Studio") - #Visual Studio CUDA integration will not perform device linking - #on a target that itself does not have GenerateRelocatableDeviceCode - #enabled. - set_target_properties(CudaOnlySeparateCompilation - PROPERTIES CUDA_SEPARABLE_COMPILATION ON) -endif() - -if(APPLE) - # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. - set_property(TARGET CudaOnlySeparateCompilation PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) -endif() +add_subdirectory(main) |