Gprof与CMake

时间:2017-03-08 14:40:38

标签: cmake clion gprof

我尝试使用gcc和gprof编译项目。因此,我在CLion中添加了CMakeLists.txt以下几行:

SET(GCC_COVERAGE_COMPILE_FLAGS "-pg")
add_definitions(${GCC_COVERAGE_COMPILE_FLAGS})

然而,当我运行已编译的二进制文件时,我没有生成gmon.out文件。

这些是构建的消息:

/home/matteo/Desktop/Xilinx/App/clion-2016.3.3/bin/cmake/bin/cmake --build "/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug" --target OpenCV_Stitching_Detailed -- -j 4
/home/matteo/Desktop/Xilinx/App/clion-2016.3.3/bin/cmake/bin/cmake -H"/home/matteo/CLionProjects/OpenCV Stitching Detailed" -B"/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug" --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/make -f CMakeFiles/Makefile2 OpenCV_Stitching_Detailed
make[1]: Entering directory '/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug'
/home/matteo/Desktop/Xilinx/App/clion-2016.3.3/bin/cmake/bin/cmake -H"/home/matteo/CLionProjects/OpenCV Stitching Detailed" -B"/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug" --check-build-system CMakeFiles/Makefile.cmake 0
/home/matteo/Desktop/Xilinx/App/clion-2016.3.3/bin/cmake/bin/cmake -E cmake_progress_start "/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug/CMakeFiles" 2
/usr/bin/make -f CMakeFiles/Makefile2 CMakeFiles/OpenCV_Stitching_Detailed.dir/all
make[2]: Entering directory '/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug'
/usr/bin/make -f CMakeFiles/OpenCV_Stitching_Detailed.dir/build.make CMakeFiles/OpenCV_Stitching_Detailed.dir/depend
make[3]: Entering directory '/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug'
cd "/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug" && /home/matteo/Desktop/Xilinx/App/clion-2016.3.3/bin/cmake/bin/cmake -E cmake_depends "Unix Makefiles" "/home/matteo/CLionProjects/OpenCV Stitching Detailed" "/home/matteo/CLionProjects/OpenCV Stitching Detailed" "/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug" "/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug" "/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug/CMakeFiles/OpenCV_Stitching_Detailed.dir/DependInfo.cmake" --color=
make[3]: Leaving directory '/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug'
/usr/bin/make -f CMakeFiles/OpenCV_Stitching_Detailed.dir/build.make CMakeFiles/OpenCV_Stitching_Detailed.dir/build
make[3]: Entering directory '/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug'
[ 50%] Building CXX object CMakeFiles/OpenCV_Stitching_Detailed.dir/main.cpp.o
/usr/bin/c++    -isystem /usr/local/include -isystem /usr/local/include/opencv  -g   -pg -std=gnu++11 -o CMakeFiles/OpenCV_Stitching_Detailed.dir/main.cpp.o -c "/home/matteo/CLionProjects/OpenCV Stitching Detailed/main.cpp"
[100%] Linking CXX executable OpenCV_Stitching_Detailed
/home/matteo/Desktop/Xilinx/App/clion-2016.3.3/bin/cmake/bin/cmake -E cmake_link_script CMakeFiles/OpenCV_Stitching_Detailed.dir/link.txt --verbose=1
/usr/bin/c++   -g   CMakeFiles/OpenCV_Stitching_Detailed.dir/main.cpp.o  -o OpenCV_Stitching_Detailed /usr/local/lib/libopencv_stitching.so.3.2.0 /usr/local/lib/libopencv_superres.so.3.2.0 /usr/local/lib/libopencv_videostab.so.3.2.0 /usr/local/lib/libopencv_aruco.so.3.2.0 /usr/local/lib/libopencv_bgsegm.so.3.2.0 /usr/local/lib/libopencv_bioinspired.so.3.2.0 /usr/local/lib/libopencv_ccalib.so.3.2.0 /usr/local/lib/libopencv_dpm.so.3.2.0 /usr/local/lib/libopencv_face.so.3.2.0 /usr/local/lib/libopencv_freetype.so.3.2.0 /usr/local/lib/libopencv_fuzzy.so.3.2.0 /usr/local/lib/libopencv_line_descriptor.so.3.2.0 /usr/local/lib/libopencv_optflow.so.3.2.0 /usr/local/lib/libopencv_reg.so.3.2.0 /usr/local/lib/libopencv_saliency.so.3.2.0 /usr/local/lib/libopencv_stereo.so.3.2.0 /usr/local/lib/libopencv_structured_light.so.3.2.0 /usr/local/lib/libopencv_surface_matching.so.3.2.0 /usr/local/lib/libopencv_tracking.so.3.2.0 /usr/local/lib/libopencv_xfeatures2d.so.3.2.0 /usr/local/lib/libopencv_ximgproc.so.3.2.0 /usr/local/lib/libopencv_xobjdetect.so.3.2.0 /usr/local/lib/libopencv_xphoto.so.3.2.0 /usr/local/lib/libopencv_shape.so.3.2.0 /usr/local/lib/libopencv_phase_unwrapping.so.3.2.0 /usr/local/lib/libopencv_rgbd.so.3.2.0 /usr/local/lib/libopencv_calib3d.so.3.2.0 /usr/local/lib/libopencv_video.so.3.2.0 /usr/local/lib/libopencv_datasets.so.3.2.0 /usr/local/lib/libopencv_dnn.so.3.2.0 /usr/local/lib/libopencv_plot.so.3.2.0 /usr/local/lib/libopencv_text.so.3.2.0 /usr/local/lib/libopencv_features2d.so.3.2.0 /usr/local/lib/libopencv_flann.so.3.2.0 /usr/local/lib/libopencv_objdetect.so.3.2.0 /usr/local/lib/libopencv_ml.so.3.2.0 /usr/local/lib/libopencv_highgui.so.3.2.0 /usr/local/lib/libopencv_photo.so.3.2.0 /usr/local/lib/libopencv_videoio.so.3.2.0 /usr/local/lib/libopencv_imgcodecs.so.3.2.0 /usr/local/lib/libopencv_imgproc.so.3.2.0 /usr/local/lib/libopencv_core.so.3.2.0 -Wl,-rpath,/usr/local/lib 
make[3]: Leaving directory '/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug'
[100%] Built target OpenCV_Stitching_Detailed
make[2]: Leaving directory '/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug'
/home/matteo/Desktop/Xilinx/App/clion-2016.3.3/bin/cmake/bin/cmake -E cmake_progress_start "/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug/CMakeFiles" 0
make[1]: Leaving directory '/home/matteo/CLionProjects/OpenCV Stitching Detailed/cmake-build-debug'

0 个答案:

没有答案