aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-05-12 22:20:56 +0200
committerCristian Adam <cristian.adam@gmail.com>2019-05-17 13:33:28 +0000
commitd855b84c5df923394ace3bb91dab379f7e0daa34 (patch)
treee184ccdf5724151465a1653f9fc308af43293de8 /src/plugins/cppeditor
parentf872a95fddd2690bb6953a17e48935c1b12d83d9 (diff)
Qt Creator CMake port
Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cppeditor')
-rw-r--r--src/plugins/cppeditor/CMakeLists.txt44
-rw-r--r--src/plugins/cppeditor/cppeditorplugin.cpp1
-rw-r--r--src/plugins/cppeditor/cppoutline.cpp1
-rw-r--r--src/plugins/cppeditor/cppoutline.h1
4 files changed, 46 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/CMakeLists.txt b/src/plugins/cppeditor/CMakeLists.txt
new file mode 100644
index 0000000000..a921291f04
--- /dev/null
+++ b/src/plugins/cppeditor/CMakeLists.txt
@@ -0,0 +1,44 @@
+add_qtc_plugin(CppEditor
+ DEFINES CPPEDITOR_LIBRARY
+ PLUGIN_DEPENDS Core CppTools ProjectExplorer TextEditor
+ SOURCES
+ cppautocompleter.cpp cppautocompleter.h
+ cppcodemodelinspectordialog.cpp cppcodemodelinspectordialog.h cppcodemodelinspectordialog.ui
+ cppdocumentationcommenthelper.cpp cppdocumentationcommenthelper.h
+ cppeditor.cpp cppeditor.h
+ cppeditor.qrc
+ cppeditor_global.h
+ cppeditorconstants.h
+ cppeditordocument.cpp cppeditordocument.h
+ cppeditorenums.h
+ cppeditorplugin.cpp cppeditorplugin.h
+ cppeditorwidget.cpp cppeditorwidget.h
+ cppfunctiondecldeflink.cpp cppfunctiondecldeflink.h
+ cpphighlighter.cpp cpphighlighter.h
+ cppincludehierarchy.cpp cppincludehierarchy.h
+ cppinsertvirtualmethods.cpp cppinsertvirtualmethods.h
+ cpplocalrenaming.cpp cpplocalrenaming.h
+ cppminimizableinfobars.cpp cppminimizableinfobars.h
+ cppoutline.cpp cppoutline.h
+ cppparsecontext.cpp cppparsecontext.h
+ cpppreprocessordialog.cpp cpppreprocessordialog.h cpppreprocessordialog.ui
+ cppquickfix.cpp cppquickfix.h
+ cppquickfixassistant.cpp cppquickfixassistant.h
+ cppquickfixes.cpp cppquickfixes.h
+ cpptypehierarchy.cpp cpptypehierarchy.h
+ cppuseselectionsupdater.cpp cppuseselectionsupdater.h
+ resourcepreviewhoverhandler.cpp resourcepreviewhoverhandler.h
+ EXPLICIT_MOC cppeditor.h
+)
+
+if (WITH_TESTS)
+ target_sources(CppEditor PRIVATE
+ cppdoxygen_test.cpp cppdoxygen_test.h
+ cppeditortestcase.cpp cppeditortestcase.h
+ cppincludehierarchy_test.cpp
+ cppquickfix_test.cpp cppquickfix_test.h
+ cppuseselections_test.cpp
+ fileandtokenactions_test.cpp
+ followsymbol_switchmethoddecldef_test.cpp
+ )
+endif()
diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp
index f46c3db17d..92c4a1ff21 100644
--- a/src/plugins/cppeditor/cppeditorplugin.cpp
+++ b/src/plugins/cppeditor/cppeditorplugin.cpp
@@ -27,6 +27,7 @@
#include "cppautocompleter.h"
#include "cppcodemodelinspectordialog.h"
+#include "cppeditor.h"
#include "cppeditorconstants.h"
#include "cppeditorwidget.h"
#include "cppeditordocument.h"
diff --git a/src/plugins/cppeditor/cppoutline.cpp b/src/plugins/cppeditor/cppoutline.cpp
index 4f34433ba4..55a2e93f19 100644
--- a/src/plugins/cppeditor/cppoutline.cpp
+++ b/src/plugins/cppeditor/cppoutline.cpp
@@ -25,6 +25,7 @@
#include "cppoutline.h"
+#include "cppeditor.h"
#include <cpptools/cppeditoroutline.h>
#include <cpptools/cppoverviewmodel.h>
diff --git a/src/plugins/cppeditor/cppoutline.h b/src/plugins/cppeditor/cppoutline.h
index f8db92c46d..9cabc48aa5 100644
--- a/src/plugins/cppeditor/cppoutline.h
+++ b/src/plugins/cppeditor/cppoutline.h
@@ -25,7 +25,6 @@
#pragma once
-#include "cppeditor.h"
#include "cppeditorwidget.h"
#include <texteditor/ioutlinewidget.h>