diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2024-10-18 14:00:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-10-18 15:05:10 (GMT) |
commit | 0c1d2900908f966a6066b2ef2040841220b2909f (patch) | |
tree | d25c2bad888f8db8082b0f7dce4a3e683e97b322 /Tests | |
parent | afc2d5b4627baf110f60366c24cb7d9c61fab371 (diff) | |
download | CMake-0c1d2900908f966a6066b2ef2040841220b2909f.zip CMake-0c1d2900908f966a6066b2ef2040841220b2909f.tar.gz CMake-0c1d2900908f966a6066b2ef2040841220b2909f.tar.bz2 |
Tests: Ensure CUDA bin2c output is null terminated
The default behavior of bin2c is to create binary arrays that have no
null termination. So to use it as a C array we need to explicitly tell
it to create valid null terminated strings.
This will safely allow us to run PTX tests across all CUDA drivers.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CudaOnly/utils/bin2c_wrapper.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/CudaOnly/utils/bin2c_wrapper.cmake b/Tests/CudaOnly/utils/bin2c_wrapper.cmake index 0baf934..d598eda 100644 --- a/Tests/CudaOnly/utils/bin2c_wrapper.cmake +++ b/Tests/CudaOnly/utils/bin2c_wrapper.cmake @@ -6,7 +6,7 @@ foreach(obj ${OBJECTS}) get_filename_component(obj_dir ${obj} DIRECTORY) if(obj_ext MATCHES ".ptx") - set(args --name ${obj_name} ${obj}) + set(args -p 0x0 --name ${obj_name} ${obj}) execute_process(COMMAND "${BIN_TO_C_COMMAND}" ${args} WORKING_DIRECTORY ${obj_dir} RESULT_VARIABLE result |