I'm using the __FILE__ macro in my main.cpp file. When compiling with make + Makefile the final executable main contains the string main.cpp (you can check it via strings main | grep "*.cpp"). But when using cmake + CMakeLists.txt cmake uses absolute paths and the final executable contains /home/cpp/main.cpp, so it causes the following warning (makepkg):
==> Checking for packaging issues...
==> WARNING: Package contains reference to $srcdir
What should I do in this case? Somehow tell cmake to not use absolute paths? Don't use the __FILE__ macro (then, what?)? Ignore the warning?