For catkin_make, I run catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=1. According to http://wiki.yangleo.me/2013/10/27/YouCompleteMe-installation-and-configurations.html, to configure YouCompleteMe, you need to modify a line to the .ycm_extra_conf.py compilation_database_folder = 'path/to/...