diff --git a/CMakeLists.txt b/CMakeLists.txt index 351fa048b..9d6d49f2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2992,7 +2992,9 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) add_compile_options(-Wno-missing-field-initializers) endif() if(CMAKE_CROSSCOMPILING OR NOT ENABLE_PACKAGING) - add_compile_options(-Wno-psabi) + if(NOT ENABLE_CUDA) + add_compile_options(-Wno-psabi) + endif() endif() if(IS_ARM) if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.1.0") AND (CMAKE_VERSION VERSION_GREATER "3.1"))