forked from qt-creator/qt-creator
C++: introduce a project config file field in the projectPart.
This field is used by the generic project manager which passes the ".config" file in it. The advantage is that both the SnapshotUpdater and the clang code model do not need to do anything smart, but can pass it directly to the preprocessor. Task-number: QTCREATORBUG-11390 Change-Id: I44fc7b20afd28fb59608412f2cce86af6f7e7d6b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -48,6 +48,11 @@
|
||||
namespace GenericProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
static const char *const ConfigFileTemplate =
|
||||
"// Add predefined macros for your project here. For example:\n"
|
||||
"// #define THE_ANSWER 42\n"
|
||||
;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// GenericProjectWizardDialog
|
||||
@@ -189,7 +194,7 @@ Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
|
||||
generatedIncludesFile.setContents(includePaths.join(QLatin1String("\n")));
|
||||
|
||||
Core::GeneratedFile generatedConfigFile(configFileName);
|
||||
generatedConfigFile.setContents(QLatin1String("// ADD PREDEFINED MACROS HERE!\n"));
|
||||
generatedConfigFile.setContents(QLatin1String(ConfigFileTemplate));
|
||||
|
||||
Core::GeneratedFiles files;
|
||||
files.append(generatedFilesFile);
|
||||
|
||||
Reference in New Issue
Block a user