The following issue has been SUBMITTED. ====================================================================== https://cmake.org/Bug/view.php?id=16047 ====================================================================== Reported By: Maurizio Paolini Assigned To: ====================================================================== Project: CMake Issue ID: 16047 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2016-04-01 13:36 EDT Last Modified: 2016-04-01 13:36 EDT ====================================================================== Summary: automoc generates wrong #includes for projects in a symlinked path Description: project "kig" uses cmake and automoc. My local copy of the git sources are located in a folder that I reach following a symlink (it resides in a local partition whereas my home is on an NFS-mounted filesystem). after a cmake and then a "make", the generated "moc*" files contain an "#include" like this:
#include "../../../../../misc/euclide/paolini/Git/kdeedu/kig/modes/popup/popup.h" There is a wrong number of ".." and the path does not work. using "make VERBOSE=1 kigpart_automoc" it turns out that the following command is issued: /usr/lib/qt5/bin/moc -I/home/matem/paolini/Git/kdeedu/kig/modes [...] -o /home/matem/paolini/Git/kdeedu/kig/moc_popup.cpp /home/misc/euclide/paolini/Git/kdeedu/kig/modes/popup/popup.h where the [...] part contains many more -I and various options. Notice that "/home/matem/paolini/Git/" and "/home/misc/euclide/paolini/Git/" point to the same place, the first through the symlink "Git", the second is the physical path. I guess that then "moc" tries hard to walk (with a relative path) from one path to the other, but there is no way to successfully climb up a path with a symlink in it using the ".." directory. This problem was previously reported in the QT bug tracker https://bugreports.qt.io/browse/QTBUG-51964 Steps to Reproduce: $ mkdir -p a/b $ ln -s a/b a.lnk $ cd a.lnk $ <create a cmake project here that uses automoc> $ cd <project> $ cmake . [...] $ make ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2016-04-01 13:36 Maurizio PaoliniNew Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers