Simply enable -D flags when building. Use as: $ cmake -DMLX5_DEBUG=TRUE -DMLX5_MW_DEBUG=TRUE Reported-by: Yishai Hadas <yishaih@xxxxxxxxxxxxxxxxxx> Signed-off-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> --- libmlx5/src/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libmlx5/src/CMakeLists.txt b/libmlx5/src/CMakeLists.txt index a34a8063eeb2..44df83b47d96 100644 --- a/libmlx5/src/CMakeLists.txt +++ b/libmlx5/src/CMakeLists.txt @@ -1,3 +1,15 @@ +set(MLX5_DEBUG "FALSE" CACHE BOOL + "Enable expensive runtime logging options for the mlx5 verbs provider") +if (MLX5_DEBUG) + add_definitions("-DMLX5_DEBUG") +endif() + +set(MLX5_MW_DEBUG "FALSE" CACHE BOOL + "Enable extra validation of memory windows for the mlx5 verbs provider") +if (MLX5_MW_DEBUG) + add_definitions("-DMW_DEBUG") +endif() + rdma_provider(mlx5 buf.c cq.c -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html