mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
182eb7c7ef
dd2f814
Merge branch 'dev/add_test-working-directory' into dev/strict-mode949d32c
Unwatch manual variables upon removal in cmake-gui3939032
Unwatch manual variables upon removal in ccmake8354413
Add method to unwatch a manual variable8ed3c85
Give a better message for unused variables729db48
Fix ArgumentExpansion test expected results89c2544
Checking for a definition is a usage5625dee
Don't output to stderr in the GUIad25a96
Merge branch 'ImprovedDotSupport2' into dev/strict-modec128abe
Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode9bcaff0
Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode544d0c3
Fix expected output for WarnUninitialized test4e3bea4
Update expected messages to new format8e8c9e4
Don't check at destruction for usage668e005
Use cmake::IssueMessage for warnings88cd4c1
Use 'CMake Warning' versus 'warning' for CDash3c3b98d
Initialize the class before setting warn flagscf8b15a
Ignore files under the CMakeFiles directoryfd50f06
Don't check for unused vars at configure time447a04c
Don't warn during configure when doing everythingb97ee21
Check for unused variables at the end of generatec18c977
When checking for variables, specify a reason3f1121f
Use a long int since Line is a long as well2507f93
Change the failure case string to 'Unexpected'fe390a2
Add 'ArgumentExpansion' test8dbb209
Wrong boolean value for CLI warningsd4ee998
Hard-code the --no-warn-unused-cli flaga267b99
Fix line lengths82ed104
Flag that the directories have been set5aa535b
Add argument to arg parsing to not set directories367e5c3
Revert "Revert "When calling CMake, set the args and the cache""ab5d4e4
Revert "When calling CMake, set the args and the cache"9b90040
When calling CMake, set the args and the cachefe56002
Fix long lines for KWStyle5d30cfc
Set a watch on variables added through the gui33c63b1
Add a method to put a watch for variables535253f
Initialize the warning variables earliercbb286c
Fix the path detection to work for top-level62be1f7
Initialize the usage stack earlierc6e7fab
Factor out the checks for unused variables5e41ba8
When using the API, check for Add vs. Removedee1976
Fix typo in VariableUnusedViaUnset testf231ce5
Remove old false positive avoidance codea117e02
Revert "Add test for unused warnings at the end of scope"2c82f2b
Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage6d7d449
Ignore CLI warnings for ABI determination7740a73
Only return local keys that are definedbef3aee
Use the API so that warnings can be tracked05cb0f4
Check for unused variables in the dtor91c4c99
Add test for unused warnings at the end of scopeca90f67
Fix detection of unused variables when settingf7438ca
Add test for unused detection via setting it995cfb0
Don't warn if the variable wasn't definedaefc91d
Add test for usage checks via unseta8e97f8
Remove VarRemoved code since it's been superceded59463ef
Rework CheckVariableForUnused usagef117423
Fix line lengths to be no more than 78e49a935
Improve unused warning logice01e40c
Mark ARGC, ARGV*, and ARGN as useda17aff7
Ignore CMAKE_MATCH_* variables for usage02a114d
Add method to allow variables to be marked as useda0b0d23
CMAKE_DO_TRY_COMPILE is no longer usedae3eff3
Fix the path used for ignoring system warnings056b441
Fix missing case for usage of a variable980e048
Factor out checks for unused variables83acb0a
Remove now unused variables3801463
Use built-ins for readability and maintainability8b52015
Push the initialize and unused states when copying439877f
Be consistent with single and double quotes4cf1706
Add documentation for check-system-varsb74777f
Fix the spelling of the flag for warn-unused-varsb948120
Change logic of flag to turn off cli unused checksf047a17
Add test for uninitialized variables75bda38
Add tests for unused command line variables300fc15
Fix detection of system filesd784e6a
Run the unused variables check on the final pass9efc057
VariableWatch is not available when bootstrapping2e78224
Add a missing comma to the warning message7499700
Add a flag to warn about system filesfff9f6d
Rename flags again and use variablewatch for cli786e269
Add warn-unused to the Qt interface636e6c4
Default to marking things as used4ff0340
Rename find-unused to warn-unusedd7999e9
Rename strict-mode to warn-uninitializede141bc9
Detect unused variablesd3e8eb5
Add flags to detect unused variablesf332e14
Complete strict-mode checks for uninitialized vars52f9637
Add method to get the local scope variablesf794d58
Make --strict-mode option, and integrate with cmake-gui48b5b85
Add a warning when variables are used uninitialized.cd626ea
For macros make sure the FilePath points to a valid pointer in the args.
131 lines
3.4 KiB
C++
131 lines
3.4 KiB
C++
/*============================================================================
|
|
CMake - Cross Platform Makefile Generator
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
See the License for more information.
|
|
============================================================================*/
|
|
|
|
#ifndef CMakeSetupDialog_h
|
|
#define CMakeSetupDialog_h
|
|
|
|
#include "QCMake.h"
|
|
#include <QMainWindow>
|
|
#include <QThread>
|
|
#include <QEventLoop>
|
|
#include "ui_CMakeSetupDialog.h"
|
|
|
|
class QCMakeThread;
|
|
class CMakeCacheModel;
|
|
class QProgressBar;
|
|
class QToolButton;
|
|
|
|
/// Qt user interface for CMake
|
|
class CMakeSetupDialog : public QMainWindow, public Ui::CMakeSetupDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
CMakeSetupDialog();
|
|
~CMakeSetupDialog();
|
|
|
|
public slots:
|
|
void setBinaryDirectory(const QString& dir);
|
|
void setSourceDirectory(const QString& dir);
|
|
|
|
protected slots:
|
|
void initialize();
|
|
void doConfigure();
|
|
void doGenerate();
|
|
void doInstallForCommandLine();
|
|
void doHelp();
|
|
void doAbout();
|
|
void doInterrupt();
|
|
void error(const QString& message);
|
|
void message(const QString& message);
|
|
|
|
void doSourceBrowse();
|
|
void doBinaryBrowse();
|
|
void doReloadCache();
|
|
void doDeleteCache();
|
|
void updateSourceDirectory(const QString& dir);
|
|
void updateBinaryDirectory(const QString& dir);
|
|
void showProgress(const QString& msg, float percent);
|
|
void setEnabledState(bool);
|
|
bool setupFirstConfigure();
|
|
void updateGeneratorLabel(const QString& gen);
|
|
void setExitAfterGenerate(bool);
|
|
void addBinaryPath(const QString&);
|
|
QStringList loadBuildPaths();
|
|
void saveBuildPaths(const QStringList&);
|
|
void onBinaryDirectoryChanged(const QString& dir);
|
|
void onSourceDirectoryChanged(const QString& dir);
|
|
void setCacheModified();
|
|
void removeSelectedCacheEntries();
|
|
void selectionChanged();
|
|
void addCacheEntry();
|
|
void startSearch();
|
|
void setDebugOutput(bool);
|
|
void setAdvancedView(bool);
|
|
void setGroupedView(bool);
|
|
void showUserChanges();
|
|
void setSearchFilter(const QString& str);
|
|
bool prepareConfigure();
|
|
bool doConfigureInternal();
|
|
bool doGenerateInternal();
|
|
void exitLoop(int);
|
|
|
|
protected:
|
|
|
|
enum State { Interrupting, ReadyConfigure, ReadyGenerate, Configuring, Generating };
|
|
void enterState(State s);
|
|
|
|
void closeEvent(QCloseEvent*);
|
|
void dragEnterEvent(QDragEnterEvent*);
|
|
void dropEvent(QDropEvent*);
|
|
|
|
QCMakeThread* CMakeThread;
|
|
bool ExitAfterGenerate;
|
|
bool CacheModified;
|
|
bool ConfigureNeeded;
|
|
QAction* ReloadCacheAction;
|
|
QAction* DeleteCacheAction;
|
|
QAction* ExitAction;
|
|
QAction* ConfigureAction;
|
|
QAction* GenerateAction;
|
|
QAction* SuppressDevWarningsAction;
|
|
QAction* WarnUninitializedAction;
|
|
QAction* WarnUnusedAction;
|
|
QAction* InstallForCommandLineAction;
|
|
State CurrentState;
|
|
|
|
QTextCharFormat ErrorFormat;
|
|
QTextCharFormat MessageFormat;
|
|
|
|
QEventLoop LocalLoop;
|
|
|
|
float ProgressOffset;
|
|
float ProgressFactor;
|
|
};
|
|
|
|
// QCMake instance on a thread
|
|
class QCMakeThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
QCMakeThread(QObject* p);
|
|
QCMake* cmakeInstance() const;
|
|
|
|
signals:
|
|
void cmakeInitialized();
|
|
|
|
protected:
|
|
virtual void run();
|
|
QCMake* CMakeInstance;
|
|
};
|
|
|
|
#endif // CMakeSetupDialog_h
|