get/print the value of variables

I am looking for a way to get the value of CMAKE variables
specifically i want to see the value of CMAKE_CXX_FLAGS_DEBUG and CAME_CXX_FLAGS_RELWITHDEBINFO

I believe you’re looking for the message command:

message("varname: ${varname}")
1 Like

Thanks and for those who are curious

CMAKE_CXX_FLAGS_DEBUG: -g
CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O2 -g -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG