Unverified Commit 0fbfbdd5 authored by gilbertlee-amd's avatar gilbertlee-amd Committed by GitHub
Browse files

CMake builds require explicit opt-in by setting NIC_EXEC_ENABLE=1 (#186)

parent 4e2be38c
......@@ -56,14 +56,19 @@ set( CMAKE_CXX_FLAGS "${flags_str} ${CMAKE_CXX_FLAGS}")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -L${ROCM_PATH}/lib")
include_directories(${ROCM_PATH}/include)
find_library(IBVERBS_LIBRARY ibverbs)
find_path(IBVERBS_INCLUDE_DIR infiniband/verbs.h)
if (DEFINED ENV{DISABLE_NIC_EXEC})
message(STATUS "Disabling NIC Executor support")
elseif(IBVERBS_LIBRARY AND IBVERBS_INCLUDE_DIR)
message(STATUS "Found ibverbs: ${IBVERBS_LIBRARY}. Building with NIC executor support. Can set DISABLE_NIC_EXEC=1 to disable")
add_definitions(-DNIC_EXEC_ENABLED)
link_libraries(ibverbs)
if (DEFINED ENV{ENABLE_NIC_EXEC})
add_definitions(-DNIC_EXEC_ENABLED)
link_libraries(ibverbs)
else()
message(STATUS "For CMake builds, NIC executor also requires explicit opt-in by setting NIC_EXEC_ENABLE=1")
endif()
else()
if (NOT IBVERBS_LIBRARY)
message(WARNING "IBVerbs library not found")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment