Review Request 128272: support -iframework and -F header search path options

Milian Wolff mail at milianw.de
Tue Jul 5 14:03:44 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128272/#review97123
-----------------------------------------------------------




languages/clang/duchain/clangparsingenvironment.cpp (line 52)
<https://git.reviewboard.kde.org/r/128272/#comment65604>

    please return the PathType instead of taking it by reference. Simplifies the code below as well.
    
        return appendPaths<IncludePaths>(m_includes, m_projectPaths);
    
    etc



languages/clang/duchain/parsesession.cpp (line 138)
<https://git.reviewboard.kde.org/r/128272/#comment65605>

    move this just below the creation of info, i.e.:
    
        if (!info.isDir()) {
            qWarning() << ...;
            continue;
        }
        QByteArray path = ...;
        ...



languages/qmljs/duchain/declarationbuilder.h (line 77)
<https://git.reviewboard.kde.org/r/128272/#comment65606>

    ? what is i/d?



languages/qmljs/duchain/declarationbuilder.h (line 81)
<https://git.reviewboard.kde.org/r/128272/#comment65607>

    this chunk and most of everything below is completely wrong. the declarationbuilder does not need this code I'm sure



projectmanagers/cmake/cmakemanager.cpp (line 127)
<https://git.reviewboard.kde.org/r/128272/#comment65608>

    remove todo



projectmanagers/custommake/makefileresolver/makefileresolver.cpp (line 254)
<https://git.reviewboard.kde.org/r/128272/#comment65610>

    space after foreach



projectmanagers/custommake/makefileresolver/makefileresolver.cpp (line 255)
<https://git.reviewboard.kde.org/r/128272/#comment65609>

    space after if



projectmanagers/custommake/makefileresolver/makefileresolver.cpp (line 702)
<https://git.reviewboard.kde.org/r/128272/#comment65611>

    keep the old style, i.e. `QString path = ...`



projectmanagers/qmake/qmakemanager.h (line 59)
<https://git.reviewboard.kde.org/r/128272/#comment65612>

    simply make it a bool again like you did above to switch between include/framework paths



projectmanagers/qmake/qmakeprojectfile.cpp (line 261)
<https://git.reviewboard.kde.org/r/128272/#comment65613>

    QStringLiteral, also below



projectmanagers/qmake/qmakeprojectfile.cpp (line 264)
<https://git.reviewboard.kde.org/r/128272/#comment65615>

    space before {



projectmanagers/qmake/qmakeprojectfile.cpp (line 271)
<https://git.reviewboard.kde.org/r/128272/#comment65614>

    QLatin1String, also below


- Milian Wolff


On June 30, 2016, 8:48 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128272/
> -----------------------------------------------------------
> 
> (Updated June 30, 2016, 8:48 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> This is a draft implementation for parser support of the `-iframework dir` and `-F dir` compiler arguments. On OS X these are the framework equivalents of `-isystem` and `-I` respectively, telling the compiler and/or linker where to find framework bundles.
> 
> I started out making the new code available on OS X only but that introduces a lot of #ifdefs for probably little benefit. On the contrary, clang supports the arguments on Linux too, presumably because clang is a functional cross-compiler that can generate Darwin Mach-O object files on Linux too.
> 
> For the 1st approach I propose to parse the framework directories, adding the effective header directories of the individual frameworks as if they were added explicitly. The framework directories are also added to a new list in the result structure. I presume that this is a prerequisite for adding them to the (lib)clang arguments of the clang parser.
> 
> 
> Diffs
> -----
> 
>   languages/clang/clangparsejob.cpp 8375eb5 
>   languages/clang/duchain/clangparsingenvironment.h c689132 
>   languages/clang/duchain/clangparsingenvironment.cpp b515037 
>   languages/clang/duchain/parsesession.cpp aae0661 
>   languages/plugins/custom-definesandincludes/compilerprovider/compilerprovider.h 7a5184f 
>   languages/plugins/custom-definesandincludes/compilerprovider/compilerprovider.cpp 24e532a 
>   languages/plugins/custom-definesandincludes/definesandincludesmanager.h 6d0d210 
>   languages/plugins/custom-definesandincludes/definesandincludesmanager.cpp ebceb4d 
>   languages/qmljs/duchain/declarationbuilder.h 5da71f2 
>   projectmanagers/cmake/cmakeimportjsonjob.cpp f064647 
>   projectmanagers/cmake/cmakemanager.h 3096b7d 
>   projectmanagers/cmake/cmakemanager.cpp 5c15e2f 
>   projectmanagers/cmake/cmakeprojectdata.h 60e8773 
>   projectmanagers/custom-buildsystem/custombuildsystemplugin.h 372b283 
>   projectmanagers/custom-buildsystem/custombuildsystemplugin.cpp b04647e 
>   projectmanagers/custommake/custommakemanager.h 33c2997 
>   projectmanagers/custommake/custommakemanager.cpp e2ce943 
>   projectmanagers/custommake/makefileresolver/makefileresolver.h debe977 
>   projectmanagers/custommake/makefileresolver/makefileresolver.cpp 97973d4 
>   projectmanagers/custommake/makefileresolver/tests/test_custommake.h 3ad0f36 
>   projectmanagers/custommake/makefileresolver/tests/test_custommake.cpp 368e83e 
>   projectmanagers/qmake/qmakemanager.h e5e3266 
>   projectmanagers/qmake/qmakemanager.cpp 123b474 
>   projectmanagers/qmake/qmakeprojectfile.h 027800c 
>   projectmanagers/qmake/qmakeprojectfile.cpp 221eee9 
> 
> Diff: https://git.reviewboard.kde.org/r/128272/diff/
> 
> 
> Testing
> -------
> 
> the unittest works as expected on OS X.
> 
> 20160625: the patch works as expected on OS X. The `-iframework /opt/local/libexec/qt5/Library/Frameworks` argument added by cmake to each compiler invocation is detected and put to use; Qt header files are found in the frameworks without a wrapper Qt5 header directory (`/opt/local/include/qt5`) added to the header search path. Header files from the system SDKs are found too
> 
> 
> File Attachments
> ----------------
> 
> the real companion patch for kdevplatform
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/06/22/67189f62-ec2c-4797-a315-cafc44fbbb6d__patch-support-kdevp-frameworks.diff
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160705/4a68c1f5/attachment-0001.html>


More information about the KDevelop-devel mailing list