I have looked at dozens of tutorials for profiling with gprof. I'm trying to work with code for the SMT solver dReal. To build the program, I first installed g++-4.8, Bison, Flex, and Cmake. Then to build dReal, the instructions said to execute the following:
git clone [email protected]:soonhokong/dReal.git dreal
cd dreal
mkdir -p build/release
cd build/release
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_C_COMPILER=gcc-4.8 ../../src
make
Where in here am I supposed to add the -pg
? I'm new to programming, so reasoning as opposed to an answer would be much appreciated. I know you're supposed to add the -pg
to the compilation stage but all the tutorials say to put it after g++ or gcc. I can't find how to modify the code for cmake. I did try changing the build type to PROFILE but that didn't help.