eclipse c/c++ CDT build just one file
It was much easier than expected.
- Deselect Project -> Build Automatically
- Right click on the file you want to build
- Click on Build Selected File(s).
Source: http://www.cesareriva.com/single-file-compile-in-eclipse-cdt/