Skip to content
Snippets Groups Projects
Commit 86d9e55f authored by Soeren Peters's avatar Soeren Peters
Browse files

Check if cuda warning suppression works on windows.

parent 4ffe7926
No related branches found
No related tags found
1 merge request!27Remove GPU compiler warnings (Closes #4, #12)
......@@ -12,8 +12,10 @@ if (NOT BUILD_SHARED_LIBRARY)
set_target_properties(${library_name} PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON)
endif()
# supress warning 3123, 3126: calling a __host__ function from __host__ __device__ is not allowed
# supress warning 3152: __host__ function redeclared with __host__ __device__, hence treated as a __host__ __device__ function
# supress warning 3125, 3127: calling a constexpr __host__ function from a __host__ __device__ function
# supress warning 3311: unrecognized #pragma in device code
target_compile_options(${library_name} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe "--diag_suppress=3123 --diag_suppress=3126 --diag_suppress=3152 --diag_suppress=3125 --diag_suppress=3127 --diag_suppress=3311" >)
# suppress warning 3123, 3126: calling a __host__ function from __host__ __device__ is not allowed
# suppress warning 3152: __host__ function redeclared with __host__ __device__, hence treated as a __host__ __device__ function
# suppress warning 3125, 3127: calling a constexpr __host__ function from a __host__ __device__ function
# suppress warning 3311: unrecognized #pragma in device code
#if(MSVC)
target_compile_options(${library_name} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe "--diag_suppress=3123 --diag_suppress=3126 --diag_suppress=3152 --diag_suppress=3125 --diag_suppress=3127" >)
#endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment