diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-08-13 11:15:27 +0200 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-09-19 12:11:36 +0000 |
commit | c99fb5d0bc24755f9a8d57c7e2a6d14ba6078523 (patch) | |
tree | c289fe697a4f5e2d30477b2854835ad58b846eee /src/plugins/cpptools/cppprojectinfogenerator.cpp | |
parent | 8195c60917b3643d3903aa2520818ac86c005de1 (diff) | |
download | qt-creator-c99fb5d0bc24755f9a8d57c7e2a6d14ba6078523.tar.gz |
Plugins: Add compilation database plugin
Introduce compilation database project support.
Pass the arguments list for each file directly to
ClangCodeModel via extraCodeModelFlags therefore
introduce a dependency from the ClangCodeModel plugin.
Change-Id: Iea5760d379de1ea246382dce56de0adf7ab5673d
Task-number: QTCREATORBUG-21115
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppprojectinfogenerator.cpp')
-rw-r--r-- | src/plugins/cpptools/cppprojectinfogenerator.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppprojectinfogenerator.cpp b/src/plugins/cpptools/cppprojectinfogenerator.cpp index 133a5237d2..fd1c928090 100644 --- a/src/plugins/cpptools/cppprojectinfogenerator.cpp +++ b/src/plugins/cpptools/cppprojectinfogenerator.cpp @@ -28,6 +28,7 @@ #include "cppprojectfilecategorizer.h" #include <projectexplorer/headerpath.h> +#include <projectexplorer/projectexplorerconstants.h> namespace CppTools { namespace Internal { @@ -56,6 +57,10 @@ public: m_projectPart.warningFlags = m_flags.warningFlags; + // For compilation database pass the command line flags directly. + if (m_projectPart.toolchainType == ProjectExplorer::Constants::COMPILATION_DATABASE_TOOLCHAIN_TYPEID) + m_projectPart.extraCodeModelFlags = m_flags.commandLineFlags; + mapLanguageVersion(); mapLanguageExtensions(); |