# Build profile for building with the clang compiler
build-profile clang

    # Prefix to use for building this profile
    build-dir    /opt/kf5/build-clang

    # [optional] Where to install the binaries from this profile
    # install-dir /opt/kf5/usr-clang/

    # C++ compiler executable
    # cxx-compiler /usr/local/bin/clang++
    cxx-compiler /usr/bin/clang++

    # C compiler executable
    # c-compiler   /usr/local/bin/clang
    c-compiler   /usr/bin/clang

    # Which options to remove from the kdesrc-build setup
    # when building this profile.
    # Parameters covered by the above setting values are
    # automatically removed.
    cmake-options-remove -DUSE_COMPILER_HIDDEN_VISIBILITY \
                         -DKDE4_BUILD_TESTS \
                         -DBUILD_TESTING

    # What should we add to the parameter list?
    cmake-options-add    -DUSE_COMPILER_HIDDEN_VISIBILITY=0 \
                         -DCMAKE_CXX_VISIBILITY_PRESET=default \
                         -DCMAKE_VISIBILITY_INLINES_HIDDEN=0

    # Which projects do you want to build using this profile
    projects kactivities plasma-framework

end build-profile

# Build profile for running the clang static analyzer
# WARNING: This is a *slow* build. Be patient while it finishes.
# You can see the progress by tailing the log file.
build-profile clang-analyzer
    build-dir    /opt/kf5/build-clang-analyzer/

    # Using clang analyzer wrappers instead of the real compiler
    # cxx-compiler /usr/share/clang/scan-build-3.6/c++-analyzer
    # c-compiler   /usr/share/clang/scan-build-3.6/ccc-analyzer
    cxx-compiler /usr/local/clang-trunk/libexec/c++-analyzer
    c-compiler   /usr/local/clang-trunk/libexec/ccc-analyzer

    cmake-options-add  -DKACTIVITIES_OVERRIDE_VISIBILITY=default

    # Calling the scan-build command which performs the build
    # and analyzes the code.
    # make-command /usr/share/clang/scan-build-3.6/scan-build --use-analyzer=/usr/bin/clang++ make
    make-command /usr/local/clang-trunk/bin/scan-build -v -o /opt/kf5/log/clang-analyzer/$CURRENT_PROJECT --use-cc=/usr/local/clang-trunk/bin/clang --use-c++=/usr/local/clang-trunk/bin/clang++ --use-analyzer=/usr/local/clang-trunk/bin/clang++ make

    projects kactivities kactivities-stats kactivitymanagerd plasma-framework plasma-desktop plasma-workspace
end build-profile


# Build profile for running the clang static analyzer
# WARNING: This is a *slow* build. Be patient while it finishes.
# You can see the progress by tailing the log file.
build-profile clazy
    build-dir    /opt/kf5/build-clazy/

    # Using clang analyzer wrappers instead of the real compiler
    # cxx-compiler /usr/share/clang/scan-build-3.6/c++-analyzer
    # c-compiler   /usr/share/clang/scan-build-3.6/ccc-analyzer
    cxx-compiler /opt/kf5/usr/bin/clazy
    c-compiler   /opt/kf5/usr/bin/clazy

    cmake-options-add    -DUSE_COMPILER_HIDDEN_VISIBILITY=0

    # Calling the scan-build command which performs the build
    # and analyzes the code.
    make-command /usr/share/clang/scan-build-3.6/scan-build --use-analyzer=/usr/bin/clang++ make

    projects kactivities plasma-framework plasma-desktop plasma-workspace
end build-profile