On Wed, Sep 21, 2016 at 04:53:23PM +0300, Yishai Hadas wrote: > On 9/21/2016 1:10 AM, Jason Gunthorpe wrote: > >The unified cmake version provides the same functionality now. > > Can you explain how cmake preservers some compilation options which were > enabled per vendor ? for example with previous build system someone could > run configure of libmlx5 with --with-mlx5_debug, how can it be done now ? On option is to do the usual 'CPPFLAGS="-DMLX5_DEBUG" cmake ..' However we may as well document these options and provide a command line switch as follows: >From f964f6be593b7ef362af3168bd3c6bc8640b976d Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 21 Sep 2016 09:42:16 -0600 Subject: [PATCH] mlx5: Add cmake options to replace --with-mlx5_debug/mw_debug 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> --- providers/mlx5/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/providers/mlx5/CMakeLists.txt b/providers/mlx5/CMakeLists.txt index a34a8063eeb2..44df83b47d96 100644 --- a/providers/mlx5/CMakeLists.txt +++ b/providers/mlx5/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