on-internet
← Community

How to correctly rebuild a C++ project as a Debug using CMake for further profiling with Valgrind?

Stack Overflow ·

I have a C++ project that I previously built using CMake. Now I need to rebuild it as Debug so that I can profile it with Valgrind to find code bottlenecks. However, I have a problem with the rebuild. I go to the root directory with the project: cd MyProj Later I start the process of building and installing the project: mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/home/user/Desktop .. make -j4 install After that I rebuild the project as a Вebug in the following way: cd .. mkdir Debug cd Debug cmake -DCMAKE_BUILD_TYPE=Debug .. make After rebuilding, I run the project for profiling with Va

Comments

Sign in or sign up to comment and upvote.

No comments yet.