This is an old revision of the document!
To compile only one ROS package in a catkin workspace use
catkin_make --pkg MY_PACKAGE_NAME
Please note, that this will still call CMake (and use CMakeLists.txt) to generate Makefile's for ALL the packages of your workspace, but compiling, i.e. calling the GNU compiler with Makefile's will be only performed on MY_PACKAGE_NAME
The equivalent of calling catkin_make
in the workspace root directory is
cd ~/workspace/catkin/build cmake ../src (which is similar to ./configure i guess) make MY_PACKAGE_NAME
The equivalent of $ROS_PACKAGE_PATH for catkin is the CMake environment variable $CMAKE_PREFIX_PATH, which will usually point to your ros distro (i.e. /opt/ros/super-turtle-distro-name) and the devel
directory of your catkin workspace (workspaces). So it seems that CMake doesn't need to know where your source files are, but it needs to know where the makefiles of your packages are and other similar stuff, and they are in the build directory, and the environment setup script in devel
tells cmake where your build directory is. And then the makefiles in their turn point to your packages in the source directory (and CMakeCache.txt is the important file here). So that's why I guess if you delete your devel directory and source ~/.bashrc, ros will not be able to find any catkin packages anymore. So, to summarize, catkin (and ros in general) doesn't care about where your package sources are stored, what is crucial are the corresponding files from devel
generated for each of your catkin packages, and the generated files from build
to which devel points to i guess.
Testing <test_depend> are dependencies that are required for running tests. Catkin packages use macros that define make targets prefixed with run-tests. They can be run by invoking catkin_make run_tests[_…] or just using make run_tests[_…]. <test_depend> should declare dependencies that are only used during this testing process.
Variables that can be used in CMakeLists.txt:
${PROJECT_NAME} ${<PACKAGE_NAME>_FOUND} <PACKAGE_NAME>_INCLUDES <PACKAGE_NAME>_LIBS catkin_INCLUDE_DIRS catkin_LIBRARIES
Hotkeys :
C-c C-d d describe slime variable C-h b list all bindings. Then C-s slime.