diff --git a/projects/rccl/CMakeLists.txt b/projects/rccl/CMakeLists.txt index d7a26b301d..b46b27ec83 100644 --- a/projects/rccl/CMakeLists.txt +++ b/projects/rccl/CMakeLists.txt @@ -48,7 +48,7 @@ option(ENABLE_AMDSMI "Enable AMD/ROCm SMI support" if(NOT ENABLE_AMDSMI) message(STATUS "SMI Support: DISABLED via ENABLE_AMDSMI=OFF") - add_definitions("-DSMI_DISABLED") + add_compile_definitions(SMI_DISABLED) unset(USE_AMDSMI CACHE) else() message(STATUS "SMI Support: ENABLED") @@ -1201,9 +1201,6 @@ if (BUILD_BFD) target_compile_definitions(rccl PRIVATE HAVE_TWO_ARG_BFD_SECTION_SIZE) endif() endif() -if (NOT ENABLE_AMDSMI) - target_compile_definitions(rccl PRIVATE SMI_DISABLED) -endif() if (IFC_ENABLED) target_compile_definitions(rccl PRIVATE USE_INDIRECT_FUNCTION_CALL) endif()