Back to developer page.

CMake tips and tricks

Compiling an individual source file

This is useful, for example, if you are working on fixing compiler errors in a given source file and want to get at the related error messages quickly, without first going through a lot of other files that a full build would produce.

cd <REPOSITORY_ROOT>
# Make sure Makefiles are up to date; can cancel build once compilation starts.
./build.py

# Can substitute a different build in the following step as desired.
cd builds/debug32/search

# Sustitute compilation target as desired.
make heuristics/lm_cut_heuristic.cc.o

The last line is perhaps a bit confusing because the generated object file end up in a completely different place than the specified path suggests. On a current Linux system, tab-completion for the make target should work. If it does not, this may be a sign that build.py needs to be run.

FastDownward: ForDevelopers/CmakeTipsAndTricks (last edited 2015-12-09 10:17:43 by MalteHelmert)