diff options
author | Brad King <brad.king@kitware.com> | 2024-01-17 22:02:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-22 14:33:54 (GMT) |
commit | 88c740462c63b09a20b4eeac0aa6ef182cb0c5dd (patch) | |
tree | ad50f0a7aa4d0b0594c4ad11543f33bcf5e92f46 /Tests/RunCMake/NinjaMultiConfig | |
parent | 62ca95518e37e9bc9fd4ae4b898f78c4d4c4893b (diff) | |
download | CMake-88c740462c63b09a20b4eeac0aa6ef182cb0c5dd.zip CMake-88c740462c63b09a20b4eeac0aa6ef182cb0c5dd.tar.gz CMake-88c740462c63b09a20b4eeac0aa6ef182cb0c5dd.tar.bz2 |
CUDA/Clang: Add support for MSVC ABI on Windows using GNU-like frontend
Fixes: #20776
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig')
-rw-r--r-- | Tests/RunCMake/NinjaMultiConfig/Common.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/Common.cmake b/Tests/RunCMake/NinjaMultiConfig/Common.cmake index 6c0d82a..9343eaf 100644 --- a/Tests/RunCMake/NinjaMultiConfig/Common.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/Common.cmake @@ -37,7 +37,7 @@ function(generate_output_files) set(exe_file " [==[$<TARGET_FILE_DIR:${tgt}>/$<TARGET_FILE_PREFIX:${tgt}>$<TARGET_FILE_BASE_NAME:${tgt}>$<TARGET_FILE_SUFFIX:${tgt}>]==]") set(exe_filename " [==[$<TARGET_FILE_PREFIX:${tgt}>$<TARGET_FILE_BASE_NAME:${tgt}>$<TARGET_FILE_SUFFIX:${tgt}>]==]") - if(WIN32) + if(WIN32 AND NOT generate_output_files_NO_EXE_LIB) set(exe_lib_file " [==[$<TARGET_FILE_DIR:${tgt}>/$<TARGET_FILE_PREFIX:${tgt}>$<TARGET_FILE_BASE_NAME:${tgt}>.lib]==]") string(APPEND content "set(TARGET_EXE_LIB_FILE_${tgt}_$<CONFIG>${exe_lib_file})\n") endif() diff --git a/Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake b/Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake index 00d8a1b..b5fc5b6 100644 --- a/Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake @@ -16,6 +16,9 @@ set_target_properties(simplecudaobj simplecudashared add_executable(simplecudaexe main.cu ) target_link_libraries(simplecudaexe PRIVATE simplecudashared) +if(WIN32 AND CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") + set(generate_output_files_NO_EXE_LIB 1) +endif() include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake) generate_output_files(simplecudaexe simplecudashared simplecudaobj) |