mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Properly disable nvcc warning messages in user code.
This commit is contained in:
parent
af8436b196
commit
5d82e47ef6
@ -44,6 +44,10 @@
|
|||||||
|
|
||||||
#elif defined __NVCC__
|
#elif defined __NVCC__
|
||||||
#pragma diag_suppress code_is_unreachable
|
#pragma diag_suppress code_is_unreachable
|
||||||
|
#pragma diag_suppress initialization_not_reachable
|
||||||
|
#pragma diag_suppress 2651
|
||||||
|
#pragma diag_suppress 2653
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // not EIGEN_WARNINGS_DISABLED
|
#endif // not EIGEN_WARNINGS_DISABLED
|
||||||
|
@ -9,8 +9,13 @@
|
|||||||
#elif defined __clang__
|
#elif defined __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#elif defined __NVCC__
|
#elif defined __NVCC__
|
||||||
#pragma diag_default code_is_unreachable
|
// Don't reenable the diagnostic messages, as it turns out these messages need
|
||||||
#pragma diag_default initialization_not_reachable
|
// to be disabled at the point of the template instantiation (i.e the user code)
|
||||||
|
// otherwise they'll be triggeredby nvcc.
|
||||||
|
// #pragma diag_default code_is_unreachable
|
||||||
|
// #pragma diag_default initialization_not_reachable
|
||||||
|
// #pragma diag_default 2651
|
||||||
|
// #pragma diag_default 2653
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ if(CUDA_FOUND)
|
|||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set(CUDA_NVCC_FLAGS "-ccbin /usr/bin/clang" CACHE STRING "nvcc flags" FORCE)
|
set(CUDA_NVCC_FLAGS "-ccbin /usr/bin/clang" CACHE STRING "nvcc flags" FORCE)
|
||||||
endif()
|
endif()
|
||||||
set(CUDA_NVCC_FLAGS "-std=c++11 --relaxed-constexpr -arch compute_30 -Xcudafe \"--diag_suppress 2651 --diag_suppress 2653\"")
|
set(CUDA_NVCC_FLAGS "-std=c++11 --relaxed-constexpr -arch compute_30 -Xcudafe \"--display_error_number\"")
|
||||||
cuda_include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/include")
|
cuda_include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/include")
|
||||||
set(EIGEN_ADD_TEST_FILENAME_EXTENSION "cu")
|
set(EIGEN_ADD_TEST_FILENAME_EXTENSION "cu")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user