Commit Graph

107 Commits

Author SHA1 Message Date
Brad King e1c7747253 Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first).  First
run `clang-format` with the config file:

    ---
    SortIncludes: false
    ...

Commit the result temporarily.  Then run `clang-format` again with:

    ---
    SortIncludes: true
    IncludeCategories:
      - Regex:    'sys/types.h'
        Priority: -1
    ...

Commit the result temporarily.  Start a new branch and cherry-pick the
second commit.  Manually resolve conflicts to preserve indentation of
re-ordered includes.  This cleans up the include ordering without
changing any other style.

Use the following command to run `clang-format`:

    $ git ls-files -z -- \
        '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
      egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
      egrep -z -v '^Source/cm_sha2' |
      egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
      egrep -z -v '^Utilities/(KW|cm).*/' |
      egrep -z -v '^Tests/Module/GenerateExportHeader' |
      egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
      xargs -0 clang-format -i

This selects source files that do not come from a third-party.

Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
2016-04-29 13:58:54 -04:00
Brad King 180538c706 Source: Stabilize include order
Each source file has a logical first include file.  Include it in an
isolated block so that tools that sort includes do not move them.
2016-04-29 13:58:31 -04:00
Michael Scott 67211011d9 cmake-gui: Add options to control warning messages
Create a new dialog window for the cmake-gui that provides controls for
setting the state of suppression of developer and deprecated warning
messages.  This replaces the previous single checkbox for setting the
state of suppression of developer warnings.

Added a note for the new functionality to the release notes.
2015-12-10 09:28:31 -05:00
Gregor Jasny fc656fa4fe cmake-gui: Add regex explorer window 2015-12-03 21:45:54 +01:00
Robert Dailey 2b958a2027 cmake-gui: Add option to specify generator toolset
The -T parameter to CMake may now be specified through cmake-gui via a
new text field in the first-time configure wizard (below the generator
chooser).

The generator factories specify whether or not they support toolsets.
This information is propagated to the Qt code and used to determine if
the selected generator should also display the optional Toolset widgets.
2015-11-17 10:03:10 -05:00
Brad King d2cf92ec26 cmake-gui: Change --install to use /usr/local/bin by default (#15627)
In commit v3.3.0-rc1~49^2~2 (cmake-gui: Add --install option to add
command-line tools on OS X, 2015-05-19) the option default was set to
/usr/bin because that is where the old command line install dialog
placed the symlinks.  A better default is /usr/local/bin because it is
meant for locally installed software rather than Apple-installed tools.
Also, as of OS X El Capitan, special privileges are required even for
root to modify /usr/bin but not /usr/local/bin.
2015-06-24 08:57:50 -04:00
Clinton Stimpson d9b974b18e cmake-gui: Make command-line install help text selectable
This will allow users to cut-n-paste the instructions over to a command
prompt.
2015-06-08 09:59:11 -04:00
Brad King 8ea2db2639 cmake-gui: Replace command-line install dialog with information box
The QMacInstallDialog infrastructure no longer works on modern OS X
versions.  Drop it and replace the dialog with a simple info box that
explains to the user how to run 'cmake-gui --install' to add symlinks.
Also suggest simply modifying the PATH.

This approach is similar to the Xcode 'xcode-select --install' method
of installing Xcode Command Line Tools.
2015-05-21 08:59:32 -04:00
Kevin Wojniak c19539c594 cmake-gui: Fix install menu to be available for Qt5 builds on OS X. 2015-01-26 09:20:49 -07:00
Gilles Khouzam 1412960e89 cmake-gui: Pass CMAKE_SYSTEM_VERSION from cross-compile configuration
Although this value can be configured in the dialog, it was simply not
passed to the project as CMAKE_SYSTEM_VERSION.  Fix that.
2014-08-13 10:17:31 -04:00
Brad King 9490e90af4 Merge topic 'cmake-credits'
8da0a75b Simplify and clarify credit text and link
2014-06-03 09:30:45 -04:00
Brad King 8da0a75ba2 Simplify and clarify credit text and link
Use the name "Kitware" rather than "Kitware, Inc." to simplify the text.
Provide a CMake-specific URL.
2014-06-03 09:24:26 -04:00
Clinton Stimpson 480be00bfa cmake-gui: Don't resolve symlinks with using file dialog.
This fixes bug #14274 where a clang++ symlink was resolved to
a clang executable.
2014-03-29 22:41:44 -06:00
Sergey Zolotarev cfec180d66 cmake-gui: Remember variable type in Add Entry
Store variable types together with their names in the variable completion
list so that the type is automatically recovered when you select a variable.

Keep variable names and types in separate lists.  This removes the :TYPE
string from completion list and the Name field and makes variable search
easier.  The variable names and types are now kept in two different
settings - AddVariableNames and AddVariableTypes.  Drop the old
AddVariableCompletionEntries setting.
2014-01-16 09:23:36 -05:00
Brad King d121a8cb66 Merge topic 'cmake-credits'
8ad8a9b cmake-gui: Reference LGPLv2.1 when redistributing Qt
2013-11-22 08:41:16 -05:00
Brad King ed0b342603 Merge topic 'qt-dialog-reconfigure'
b566987 cmake-gui: Configure again if a variable is changed before Generate is pushed.
2013-11-22 08:40:29 -05:00
Brad King 8ad8a9b1a6 cmake-gui: Reference LGPLv2.1 when redistributing Qt
Download http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and place
it as Licenses/LGPLv2.1.txt in our source tree.  When building cmake-gui,
use option CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL to enable notification
in the "About" dialog of how the distribution of Qt is licensed.
Install the license file as ${CMAKE_ROOT}/Licenses/LGPLv2.1.txt so that
the dialog can display a path to it.
2013-11-21 11:04:24 -05:00
Clinton Stimpson b566987374 cmake-gui: Configure again if a variable is changed before Generate is pushed. 2013-11-20 21:24:54 -07:00
Brad King 6fc4ab9b28 Credit Kitware and csimsoft for their maintenance roles
Add maintenance credit to command-line "--version" output and the
cmake-gui "About" dialog.
2013-11-19 18:12:58 -05:00
Brad King 82baceaa60 cmake-gui: Rename local variable to avoid shadowing a member
Address warnings:

 Source/QtDialog/CMakeSetupDialog.cxx:1233:15:
 warning: declaration of 'cursor' shadows a member of 'this' [-Wshadow]
 Source/QtDialog/CMakeSetupDialog.cxx:1260:15:
 warning: declaration of 'cursor' shadows a member of 'this' [-Wshadow]

by renaming the local variable to 'textCursor'.
2013-11-01 12:56:43 -04:00
Clinton Stimpson 81ea3637b4 cmake-gui: save and restore the geometry and window state between sessions. 2013-09-10 14:35:11 -06:00
Alex Neundorf f92d7e7f95 cmake-gui: use shortcut F only for "Find in Output"
Before it was used also for "Find Next" and "Find Previous"

Alex
2013-04-24 15:32:43 -04:00
Marc Bartholomaeus 6e57724fc3 cmake-gui: Add function for going to next error message in Output window
Using new shortcuts: F8 (Visual Studio) and Ctrl-. (Eclipse)

Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus 7be2d8acc6 cmake-gui: Change shortcut of the search field from Ctrl-F to Alt-E
Ctrl-F is now used by "Find in Output".

Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus 4ce65e82f5 cmake-gui: Add search functions to the context menu of the Output widget
Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus df3663bfab cmake-gui: Add search functions for Output window (#9733)
Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:34 -04:00
Clinton Stimpson ecfc53da7e cmake-gui: Fix code to respect current locale.
This means non-ascii characters now work correctly on systems that
have a non-ascii 8 bit encoding as the current locale.
2012-07-06 13:26:39 -06:00
Clinton Stimpson 2c050a2e11 cmake-gui: Wait for configure/generate thread to complete before exiting.
A prevous fix to interrupt granularity makes it so we don't have to wait very long.
2012-04-30 13:12:16 -06:00
Clinton Stimpson 131eed6607 cmake-gui: Improve interrupt granularity to fix bug 12649.
Instead of enabling interrupt only when a progress or message callback is called, add a new callback specifically for
interrupt.  This new callback is called from GetFatalErrorOccured() so cmake-gui can immediately report interrupt status
instead of calling queuing a call to cmSystemTools::SetFatalErrorOccured() and waiting for the progress or message
callback to be called to process that queued call.
2012-01-02 11:07:43 -07:00
Raphael Kubo da Costa 56e0499104 QtDialog: Set Ctrl+Q as the shortcut for quitting the program.
QKeySequence::Quit does not work on all platforms, and since it
translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was
hardcoded instead.
2011-12-15 08:51:50 -07:00
Alex Neundorf b0d01c306b cmake-gui: add completion for the names when adding cache entries
Up to 100 completion strings for the names of added variables
are saved in the settings, so it will remember the variables
you are usually adding.
It also ensures that CMAKE_INSTALL_PREFIX is always there, since
this is maybe the one which is set most often.

Alex
2011-11-19 22:21:41 +01:00
Brad King 182eb7c7ef Merge topic 'dev/strict-mode'
dd2f814 Merge branch 'dev/add_test-working-directory' into dev/strict-mode
949d32c Unwatch manual variables upon removal in cmake-gui
3939032 Unwatch manual variables upon removal in ccmake
8354413 Add method to unwatch a manual variable
8ed3c85 Give a better message for unused variables
729db48 Fix ArgumentExpansion test expected results
89c2544 Checking for a definition is a usage
5625dee Don't output to stderr in the GUI
ad25a96 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
c128abe Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode
9bcaff0 Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
544d0c3 Fix expected output for WarnUninitialized test
4e3bea4 Update expected messages to new format
8e8c9e4 Don't check at destruction for usage
668e005 Use cmake::IssueMessage for warnings
88cd4c1 Use 'CMake Warning' versus 'warning' for CDash
3c3b98d Initialize the class before setting warn flags
cf8b15a Ignore files under the CMakeFiles directory
fd50f06 Don't check for unused vars at configure time
447a04c Don't warn during configure when doing everything
b97ee21 Check for unused variables at the end of generate
c18c977 When checking for variables, specify a reason
3f1121f Use a long int since Line is a long as well
2507f93 Change the failure case string to 'Unexpected'
fe390a2 Add 'ArgumentExpansion' test
8dbb209 Wrong boolean value for CLI warnings
d4ee998 Hard-code the --no-warn-unused-cli flag
a267b99 Fix line lengths
82ed104 Flag that the directories have been set
5aa535b Add argument to arg parsing to not set directories
367e5c3 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 cache
fe56002 Fix long lines for KWStyle
5d30cfc Set a watch on variables added through the gui
33c63b1 Add a method to put a watch for variables
535253f Initialize the warning variables earlier
cbb286c Fix the path detection to work for top-level
62be1f7 Initialize the usage stack earlier
c6e7fab Factor out the checks for unused variables
5e41ba8 When using the API, check for Add vs. Remove
dee1976 Fix typo in VariableUnusedViaUnset test
f231ce5 Remove old false positive avoidance code
a117e02 Revert "Add test for unused warnings at the end of scope"
2c82f2b Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage
6d7d449 Ignore CLI warnings for ABI determination
7740a73 Only return local keys that are defined
bef3aee Use the API so that warnings can be tracked
05cb0f4 Check for unused variables in the dtor
91c4c99 Add test for unused warnings at the end of scope
ca90f67 Fix detection of unused variables when setting
f7438ca Add test for unused detection via setting it
995cfb0 Don't warn if the variable wasn't defined
aefc91d Add test for usage checks via unset
a8e97f8 Remove VarRemoved code since it's been superceded
59463ef Rework CheckVariableForUnused usage
f117423 Fix line lengths to be no more than 78
e49a935 Improve unused warning logic
e01e40c Mark ARGC, ARGV*, and ARGN as used
a17aff7 Ignore CMAKE_MATCH_* variables for usage
02a114d Add method to allow variables to be marked as used
a0b0d23 CMAKE_DO_TRY_COMPILE is no longer used
ae3eff3 Fix the path used for ignoring system warnings
056b441 Fix missing case for usage of a variable
980e048 Factor out checks for unused variables
83acb0a Remove now unused variables
3801463 Use built-ins for readability and maintainability
8b52015 Push the initialize and unused states when copying
439877f Be consistent with single and double quotes
4cf1706 Add documentation for check-system-vars
b74777f Fix the spelling of the flag for warn-unused-vars
b948120 Change logic of flag to turn off cli unused checks
f047a17 Add test for uninitialized variables
75bda38 Add tests for unused command line variables
300fc15 Fix detection of system files
d784e6a Run the unused variables check on the final pass
9efc057 VariableWatch is not available when bootstrapping
2e78224 Add a missing comma to the warning message
7499700 Add a flag to warn about system files
fff9f6d Rename flags again and use variablewatch for cli
786e269 Add warn-unused to the Qt interface
636e6c4 Default to marking things as used
4ff0340 Rename find-unused to warn-unused
d7999e9 Rename strict-mode to warn-uninitialized
e141bc9 Detect unused variables
d3e8eb5 Add flags to detect unused variables
f332e14 Complete strict-mode checks for uninitialized vars
52f9637 Add method to get the local scope variables
f794d58 Make --strict-mode option, and integrate with cmake-gui
48b5b85 Add a warning when variables are used uninitialized.
cd626ea For macros make sure the FilePath points to a valid pointer in the args.
2011-01-27 15:34:07 -05:00
Clinton Stimpson 3f158c6dfa cmake-gui: always enable generate button. 2010-12-17 19:04:57 -07:00
Brad King 9bcaff02ff Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
Conflicts:
	Source/QtDialog/CMakeSetupDialog.cxx
2010-12-17 10:31:19 -05:00
Alex Neundorf 3d13502c98 Make cmake-gui remember whether the "Advanced" checkbox was checked or not
Alex
2010-09-23 21:48:07 +02:00
Alex Neundorf 8e8acb7aab -remove trailing whitespace
Alex
2010-09-23 21:47:06 +02:00
Ben Boeckel fff9f6d6f7 Rename flags again and use variablewatch for cli 2010-09-01 13:09:08 -04:00
Ben Boeckel 786e2695cb Add warn-unused to the Qt interface 2010-09-01 13:08:15 -04:00
Ben Boeckel d7999e9b29 Rename strict-mode to warn-uninitialized 2010-09-01 13:08:14 -04:00
Bill Hoffman f794d589a4 Make --strict-mode option, and integrate with cmake-gui 2010-09-01 13:08:14 -04:00
Clinton Stimpson 9ced0bf69b ENH: Add simple grouped view. 2010-04-26 16:06:52 -06:00
Clinton Stimpson 3dab0e477f Fix bug #9722. Report error when not able to create build directory. 2009-10-30 15:02:25 -04:00
Clinton Stimpson 08583fc58e don't allow consecutive generates without a configure. 2009-10-05 16:05:40 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Clinton Stimpson 551fcc23c2 fix compile warnings 2009-09-23 13:09:56 -04:00
Clinton Stimpson ecfca5d0a8 fix issue 9346. add binary directory to window title to make it easier to deal with multiple cmake-gui instances 2009-09-22 18:29:35 -04:00
Clinton Stimpson 0b49e4ad1e fix focus fighting between search field and cache value editors 2009-09-04 16:43:07 -04:00
Clinton Stimpson df9c3b1a68 ENH: Edit button label for new changes dialog. 2009-07-17 14:51:31 -04:00
Clinton Stimpson 17acf0a310 ENH: Add a "Show my changes" to the Tools menu.
Changes by the user are recorded and when requested, it shows
      -D arguments for commandline or contents for a cache file.
2009-07-17 14:38:36 -04:00
Clinton Stimpson 33f7717536 ENH: Save/restore splitter sizes. Fixes #9070. 2009-06-24 16:50:52 -04:00