Commit 739cc9f0 authored by Nikolai Kosjar's avatar Nikolai Kosjar

C++: Clean up dev tools

* Move cplusplus-frontend to src/tools
* Make them depend on libs/cplusplus instead of building that lib again
* Put the binaries into bin of the qtcreator build directory
* Unify *.pro files
* Build them all if BUILD_CPLUSPLUS_TOOLS is set

Change-Id: I8f9cd731625cbf9f41d5f6464c6cd946ffd6e141
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent c001e98d
......@@ -118,6 +118,10 @@ tmp/
*.exe
/bin/buildoutputparser
/bin/cpaster
/bin/cplusplus-ast2png
/bin/cplusplus-frontend
/bin/cplusplus-mkvisitor
/bin/cplusplus-update-frontend
/bin/qbs*
/bin/qmlpuppet
/bin/qml2puppet
......@@ -129,20 +133,16 @@ tmp/
/bin/sdktool
/share/doc/qtcreator/*.qch
/share/qtcreator/qbs/
/src/tools/cplusplus-mkvisitor/cplusplus-mkvisitor
/src/tools/cplusplus-update-frontend/cplusplus-update-frontend
/src/tools/qml/qmldump/qmldump
/src/tools/examplesscanner/examplesscanner
/src/tools/valgrindfake/valgrind-fake
# Tests
#------
/tests/manual/cplusplus-frontend/cplusplus-frontend
/tests/manual/qml-ast2dot/qml-ast2dot
/tests/manual/debugger/simple/libsimple_test_plugin.*dylib
/tests/manual/debugger/simple/simple_test_app
/tests/manual/preprocessor/pp
/tests/tools/cplusplus-ast2png/cplusplus-ast2png
/tests/auto/aggregation/tst_aggregation
/tests/auto/changeset/tst_changeset
/tests/auto/cplusplus/checksymbols/tst_checksymbols
......
......@@ -43,7 +43,7 @@
#include <cplusplus/Symbols.h>
#include <cplusplus/TranslationUnit.h>
#include "cplusplus-tools-utils.h"
#include "utils.h"
#include <QDir>
#include <QFile>
......
include(../cplusplus-shared/tool.pri)
include(../cplusplus-shared/utils.pri)
SOURCES += cplusplus-ast2png.cpp
......@@ -41,7 +41,7 @@
#include <cplusplus/Symbols.h>
#include <cplusplus/TranslationUnit.h>
#include "cplusplus-tools-utils.h"
#include "utils.h"
#include <QFile>
#include <QList>
......
include(../cplusplus-shared/tool.pri)
include(../cplusplus-shared/utils.pri)
SOURCES += cplusplus-frontend.cpp
......@@ -45,7 +45,7 @@
#include <cplusplus/Overview.h>
#include <cplusplus/LookupContext.h>
#include "cplusplus-tools-utils.h"
#include "utils.h"
#include <QFile>
#include <QList>
......
QT = core gui
macx:CONFIG -= app_bundle
win32:CONFIG += console
TEMPLATE = app
TARGET = cplusplus-mkvisitor
DESTDIR = ./
include(../../../qtcreator.pri)
include(../../libs/cplusplus/cplusplus-lib.pri)
include(../../../src/tools/cplusplus-tools-utils/cplusplus-tools-utils.pri)
include(../cplusplus-shared/tool.pri)
include(../cplusplus-shared/utils.pri)
DEFINES += PATH_AST_H=\\\"$$PWD/../../libs/3rdparty/cplusplus/AST.h\\\"
SOURCES += cplusplus-mkvisitor.cpp
QTC_LIB_DEPENDS += cplusplus
include(../../../qtcreator.pri)
include(../../rpath.pri)
DESTDIR = $$IDE_BIN_PATH
QT = core gui
TEMPLATE = app
osx:CONFIG -= app_bundle
win32:CONFIG += console
win32:LIBS += -luser32 -lshell32
......@@ -29,7 +29,7 @@
****************************************************************************/
#include "cplusplus-tools-utils.h"
#include "utils.h"
#include <utils/environment.h>
......
INCLUDEPATH += $$PWD
DEFINES += PATH_PREPROCESSOR_CONFIG=\\\"$$PWD/pp-configuration.inc\\\"
HEADERS += $$PWD/utils.h
SOURCES += $$PWD/utils.cpp
DEPENDPATH += $$PWD
INCLUDEPATH += $$PWD
DEFINES *= QT_NO_CAST_FROM_ASCII
DEFINES += PATH_PREPROCESSOR_CONFIG=\\\"$$PWD/pp-configuration.inc\\\"
DEFINES += QTCREATOR_UTILS_STATIC_LIB
HEADERS += \
$$PWD/cplusplus-tools-utils.h \
$$PWD/../../libs/utils/environment.h \
$$PWD/../../libs/utils/fileutils.h \
$$PWD/../../libs/utils/qtcassert.h \
$$PWD/../../libs/utils/savefile.h
SOURCES += \
$$PWD/cplusplus-tools-utils.cpp \
$$PWD/../../libs/utils/environment.cpp \
$$PWD/../../libs/utils/fileutils.cpp \
$$PWD/../../libs/utils/qtcassert.cpp \
$$PWD/../../libs/utils/savefile.cpp
win32:LIBS += -luser32 -lshell32
osx:OBJECTIVE_SOURCES += $$PWD/../../libs/utils/fileutils_mac.mm
osx:LIBS += -framework Foundation
QTC_LIB_DEPENDS += utils
include(../../../qtcreator.pri)
include(../../libs/cplusplus/cplusplus-lib.pri)
DESTDIR = $$IDE_BIN_PATH
include(../../rpath.pri)
QT = core gui
macx:CONFIG -= app_bundle
win32:CONFIG += console
TEMPLATE = app
TARGET = cplusplus-update-frontend
include(../cplusplus-shared/tool.pri)
DEFINES += PATH_CPP_FRONTEND=\\\"$$PWD/../../libs/3rdparty/cplusplus\\\"
DEFINES += PATH_DUMPERS_FILE=\\\"$$PWD/../../../tests/tools/cplusplus-ast2png/dumpers.inc\\\"
DEFINES += PATH_DUMPERS_FILE=\\\"$$PWD/../cplusplus-ast2png/dumpers.inc\\\"
SOURCES += cplusplus-update-frontend.cpp
......@@ -19,6 +19,14 @@ mac {
SUBDIRS += iostool
}
BUILD_CPLUSPLUS_TOOLS = $$(BUILD_CPLUSPLUS_TOOLS)
!isEmpty(BUILD_CPLUSPLUS_TOOLS) {
SUBDIRS += cplusplus-ast2png \
cplusplus-frontend \
cplusplus-mkvisitor \
cplusplus-update-frontend
}
QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
!isEmpty(QT_BREAKPAD_ROOT_PATH) {
SUBDIRS += qtcrashhandler
......
QT = core gui
macx:CONFIG -= app_bundle
win32:CONFIG += console
TEMPLATE = app
TARGET = cplusplus-frontend
DESTDIR = ./
include(../../../qtcreator.pri)
include($$IDE_SOURCE_TREE/src/libs/cplusplus/cplusplus-lib.pri)
include($$IDE_SOURCE_TREE/tests/auto/qttestrpath.pri)
include(../../../src/tools/cplusplus-tools-utils/cplusplus-tools-utils.pri)
SOURCES += cplusplus-frontend.cpp
QT = core gui
macx:CONFIG -= app_bundle
win32:CONFIG += console
TEMPLATE = app
TARGET = cplusplus-ast2png
DESTDIR = ./
include(../../../qtcreator.pri)
include(../../../src/libs/cplusplus/cplusplus-lib.pri)
include(../../../src/tools/cplusplus-tools-utils/cplusplus-tools-utils.pri)
SOURCES += cplusplus-ast2png.cpp
TEMPLATE=subdirs
SUBDIRS= \
cplusplus-ast2png \
qml-ast2dot
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment