File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,19 @@ set( CMAKE_CXX_FLAGS "${flags_str} ${CMAKE_CXX_FLAGS}")
5656
5757set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -L${ROCM_PATH} /lib" )
5858include_directories (${ROCM_PATH} /include )
59+
5960find_library (IBVERBS_LIBRARY ibverbs)
6061find_path (IBVERBS_INCLUDE_DIR infiniband/verbs.h)
6162if (DEFINED ENV{DISABLE_NIC_EXEC})
6263 message (STATUS "Disabling NIC Executor support" )
6364elseif (IBVERBS_LIBRARY AND IBVERBS_INCLUDE_DIR)
6465 message (STATUS "Found ibverbs: ${IBVERBS_LIBRARY} . Building with NIC executor support. Can set DISABLE_NIC_EXEC=1 to disable" )
65- add_definitions (-DNIC_EXEC_ENABLED)
66- link_libraries (ibverbs)
66+ if (DEFINED ENV{ENABLE_NIC_EXEC})
67+ add_definitions (-DNIC_EXEC_ENABLED)
68+ link_libraries (ibverbs)
69+ else ()
70+ message (STATUS "For CMake builds, NIC executor also requires explicit opt-in by setting NIC_EXEC_ENABLE=1" )
71+ endif ()
6772else ()
6873 if (NOT IBVERBS_LIBRARY)
6974 message (WARNING "IBVerbs library not found" )
You can’t perform that action at this time.
0 commit comments