<p dir="ltr">Ninja dosen't generate that quoted include line, for the short term, how about stop supporting GNU Make, tell distro maintainers to generate ninja target when running Cmake?</p>
<div class="gmail_quote">On May 23, 2015 5:06 AM, "Aleix Pol" <<a href="mailto:aleixpol@kde.org">aleixpol@kde.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, May 23, 2015 at 11:51 AM, Boudewijn Rempt <<a href="mailto:boud@valdyas.org">boud@valdyas.org</a>> wrote:<br>
> Sorry for the extensive cross-posting in advance, please when replying, do a<br>
> reply-all.<br>
><br>
> Just so everyone is on the same page: Vc is a template library that makes it<br>
> easy to build vectorized code using a single source file. Krita uses Vc to<br>
> optimize blending colors, creating masks and much more. Krita uses the most<br>
> recent Vc release, 0.7.4: <a href="http://code.compeng.uni-frankfurt.de/news/27" target="_blank">http://code.compeng.uni-frankfurt.de/news/27</a><br>
><br>
> We're currently porting Krita to Qt5 and KF5 and the way KF5 and Vc handle<br>
> include directories is a big roadblock for us:<br>
> <a href="https://git.reviewboard.kde.org/r/123179/" target="_blank">https://git.reviewboard.kde.org/r/123179/</a> .<br>
><br>
> In a nutshell: Vc builds many different object files from single cpp file.<br>
> It does this by creating a custom command for each target vectorization<br>
> extension. To do that, it needs to access the contents of<br>
> INCLUDE_DIRECTORIES, like this (in VcMacros.cmake:<br>
> <a href="http://code.compeng.uni-frankfurt.de/projects/vc/repository/entry/cmake/VcMacros.cmake?rev=0.7" target="_blank">http://code.compeng.uni-frankfurt.de/projects/vc/repository/entry/cmake/VcMacros.cmake?rev=0.7</a>)<br>
><br>
>    get_directory_property(_inc INCLUDE_DIRECTORIES)<br>
>    foreach(_i ${_inc})<br>
>       list(APPEND _flags "-I${_i}")<br>
>    endforeach()<br>
><br>
> In the end the command is generated like this:<br>
><br>
>          add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_out}<br>
>             COMMAND ${CMAKE_CXX_COMPILER} ${_flags} ${_extra_flags}<br>
>             -DVC_IMPL=${_impl}<br>
>             ${_outfile_flag}${_out}<br>
> ${CMAKE_CURRENT_SOURCE_DIR}/${_vc_compile_src}<br>
>             MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${_vc_compile_src}<br>
>             IMPLICIT_DEPENDS CXX<br>
> ${CMAKE_CURRENT_SOURCE_DIR}/${_vc_compile_src}<br>
>             COMMENT "Building CXX object ${_out}"<br>
>             WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"<br>
>             VERBATIM<br>
>             )<br>
> KF5 uses cmake generator expressions to derive the include directories from<br>
> the target_link_libraries lines. This means that when we try to build our<br>
> per-extensions object files we get this:<br>
><br>
><br>
><br>
>     [  0%] Building CXX object<br>
> KoOptimizedCompositeOpFactoryPerArch_AVX.cpp.o<br>
>     cd /home/boud/kde/build/calligra/libs/pigment && /usr/bin/c++ -std=c++0x<br>
> -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts<br>
> -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor<br>
> -Woverloaded-virtual -Werror=return-type -D__GNUC_UBUNTU_VERSION__=0xf040a<br>
> -Wabi -fabi-version=0 -ffp-contract=fast -mtune=core2 -fPIC<br>
> -I/home/boud/kde/src/calligra/interfaces -I/home/boud/kde/build/calligra<br>
> -I/home/boud/kde/src/calligra -I/home/boud/kde/src/calligra/libs/version<br>
> -I/home/boud/kde/build/calligra/libs/version<br>
> -I/home/boud/kde/src/calligra/libs/koplugin<br>
> -I/home/boud/kde/src/calligra/libs/version<br>
> -I/home/boud/kde/build/calligra/libs/version<br>
> -I/home/boud/kde/src/calligra/libs/pigment<br>
> -I/home/boud/kde/src/calligra/libs/pigment/compositeops<br>
> -I/home/boud/kde/src/calligra/libs/pigment/resources -I/usr/include<br>
> -I/usr/include -I/usr/include/OpenEXR -I/usr/include -mavx -DVC_IMPL=AVX -c<br>
> -oKoOptimizedCompositeOpFactoryPerArch_AVX.cpp.o<br>
> /home/boud/kde/src/calligra/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp<br>
><br>
> /home/boud/kde/src/calligra/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp:22:19:<br>
> fatal error: QString: No such file or directory<br>
>      #include <QString><br>
>                        ^<br>
>     compilation terminated.<br>
>     libs/pigment/CMakeFiles/pigmentcms.dir/build.make:72: recipe for target<br>
> 'libs/pigment/KoOptimizedCompositeOpFactoryPerArch_AVX.cpp.o' failed<br>
><br>
> On other words, INCLUDE_DIRECTORIES is empty, there's no Qt5, no Kf5 to be<br>
> found.<br>
><br>
> If we manually set include directories like this:<br>
><br>
> if (HAVE_VC)<br>
>     message(".>>>>>>>>>>>>" ${KDE4_INCLUDES})<br>
>     include_directories(${KDE4_INCLUDES} ${Qt5Core_INCLUDE_DIRS}<br>
> ${Qt5Gui_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${PIGMENT_INCLUDES}<br>
> ${Boost_INCLUDE_DIR})<br>
> endif()<br>
><br>
> We end up with the entire include line for the contents of KDE4_INCLUDES<br>
> ($<TARGET_PROPERTY:KF5::KDELibs4Support,INTERFACE_INCLUDE_DIRECTORIES>)<br>
> expanded to a string with quotes around it:<br>
><br>
>    [  0%] Building CXX object KoOptimizedCompositeOpFactoryPerArch_AVX.cpp.o<br>
>     cd /home/boud/kde/build/calligra/libs/pigment && /usr/bin/c++ -std=c++0x<br>
> -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts<br>
> -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor<br>
> -Woverloaded-virtual -Werror=return-type -D__GNUC_UBUNTU_VERSION__=0xf040a<br>
> -Wabi -fabi-version=0 -ffp-contract=fast -mtune=core2 -fPIC<br>
> -I/home/boud/kde/src/calligra/interfaces -I/home/boud/kde/build/calligra<br>
> -I/home/boud/kde/src/calligra -I/home/boud/kde/src/calligra/libs/version<br>
> -I/home/boud/kde/build/calligra/libs/version<br>
> "-I/usr/include/KF5/KDELibs4Support;/usr/include/KF5/KDELibs4Support/KDE;/usr/include/KF5;/usr/include/x86_64-linux-gnu/qt5/;/usr/include/x86_64-linux-gnu/qt5/QtWidgets;/usr/include/x86_64-linux-gnu/qt5/;/usr/include/x86_64-linux-gnu/qt5/QtGui;/usr/include/x86_64-linux-gnu/qt5/;/usr/include/x86_64-linux-gnu/qt5/QtCore;/usr/lib/x86_64-linux-gnu/qt5//mkspecs/linux-g++-64;/usr/include/x86_64-linux-gnu/qt5/;/usr/include/x86_64-linux-gnu/qt5/QtDBus;/usr/include/x86_64-linux-gnu/qt5/;/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport;/usr/include/KF5/KCoreAddons;/usr/include/KF5;/usr/include/KF5/KCrash;/usr/include/KF5;/usr/include/KF5/KWidgetsAddons;/usr/include/KF5;/usr/include/KF5/KConfigCore;/usr/include/KF5;/usr/include/KF5/KConfigWidgets;/usr/include/KF5;/usr/include/KF5/KCodecs;/usr/include/KF5;/usr/include/KF5/KConfigGui;/usr/include/KF5;/usr/include/x86_64-linux-gnu/qt5/;/usr/include/x86_64-linux-gnu/qt5/QtXml;/usr/include/KF5/KAuth;/usr/include/KF5;/usr/include/KF5/KIOCore;<br>
> /usr/include/KF5;/usr/include/KF5/KService;/usr/include/KF5;/usr/include/KF5/KIOFileWidgets;/usr/include/KF5;/usr/include/KF5/KIOWidgets;/usr/include/KF5;/usr/include/KF5/KJobWidgets;/usr/include/KF5;/usr/include/x86_64-linux-gnu/qt5/;/usr/include/x86_64-linux-gnu/qt5/QtNetwork;/usr/include/KF5/KCompletion;/usr/include/KF5;/usr/include/KF5/KBookmarks;/usr/include/KF5;/usr/include/KF5/KItemViews;/usr/include/KF5;/usr/include/KF5/KXmlGui;/usr/include/KF5;/usr/include/KF5/Solid;/usr/include/KF5;/usr/include/KF5/KI18n;/usr/include/KF5;/usr/include/KF5/KNotifications;/usr/include/KF5;/usr/include/KF5/KIconThemes;/usr/include/KF5;/usr/include/KF5/KWindowSystem;/usr/include;/usr/include;/usr/include/KF5;/usr/include/KF5;/usr/include/KF5/KGuiAddons;/usr/include/KF5;/usr/include/KF5/KUnitConversion;/usr/include/KF5;/usr/include/KF5/KTextWidgets;/usr/include/KF5;/usr/include/KF5/SonnetUi;/usr/include/KF5;/usr/include/KF5/KParts;/usr/include/KF5"<br>
> -I/usr/include/x86_64-linux-gnu/qt5<br>
> -I/usr/include/x86_64-linux-gnu/qt5/QtCore<br>
> -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64<br>
> -I/usr/include/x86_64-linux-gnu/qt5<br>
> -I/usr/include/x86_64-linux-gnu/qt5/QtGui<br>
> -I/usr/include/x86_64-linux-gnu/qt5/QtCore<br>
> -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64<br>
> -I/usr/include/x86_64-linux-gnu/qt5<br>
> -I/usr/include/x86_64-linux-gnu/qt5/QtXml<br>
> -I/usr/include/x86_64-linux-gnu/qt5/QtCore<br>
> -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64<br>
> -I/home/boud/kde/src/calligra/libs/koplugin<br>
> -I/home/boud/kde/src/calligra/libs/version<br>
> -I/home/boud/kde/build/calligra/libs/version<br>
> -I/home/boud/kde/src/calligra/libs/pigment<br>
> -I/home/boud/kde/src/calligra/libs/pigment/compositeops<br>
> -I/home/boud/kde/src/calligra/libs/pigment/resources -I/usr/include<br>
> -I/usr/include -I/usr/include/OpenEXR -I/usr/include -mavx -DVC_IMPL=AVX -c<br>
> -oKoOptimizedCompositeOpFactoryPerArch_AVX.cpp.o<br>
> /home/boud/kde/src/calligra/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp<br>
>     In file included from<br>
> /home/boud/kde/src/calligra/libs/pigment/DebugPigment.h:23:0,<br>
>                      from<br>
> /home/boud/kde/src/calligra/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.cpp:23:<br>
>     /home/boud/kde/src/calligra/libs/pigment/pigment_export.h:24:23: fatal<br>
> error: kdemacros.h: No such file or directory<br>
>      #include <kdemacros.h><br>
>                            ^<br>
>     compilation terminated.<br>
>     libs/pigment/CMakeFiles/pigmentcms.dir/build.make:72: recipe for target<br>
> 'libs/pigment/KoOptimizedCompositeOpFactoryPerArch_AVX.cpp.o' failed<br>
><br>
><br>
> And that's where I'm totally stuck. It seems the cmake 3.0/kf5/e-c-m (I<br>
> don't know where this system came from) is incompatible with a key libary<br>
> that I have to use. We can't drop using Vc, we cannot move to a newer<br>
> release of Vc and I can't see a way to replicate the functionality of<br>
> vc_compile_for_all_implementations in our own cmake code either, so please<br>
> help!<br>
><br>
> Boudewijn<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Kde-buildsystem mailing list<br>
> <a href="mailto:Kde-buildsystem@kde.org">Kde-buildsystem@kde.org</a><br>
> <a href="https://mail.kde.org/mailman/listinfo/kde-buildsystem" target="_blank">https://mail.kde.org/mailman/listinfo/kde-buildsystem</a><br>
><br>
<br>
Including kde-windows, they are more likely to know what's going on...<br>
<br>
Aleix<br>
_______________________________________________<br>
calligra-devel mailing list<br>
<a href="mailto:calligra-devel@kde.org">calligra-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/calligra-devel" target="_blank">https://mail.kde.org/mailman/listinfo/calligra-devel</a><br>
</blockquote></div>