Commit Graph

29 Commits

Author SHA1 Message Date
Kitware Robot d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
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 821667018c cmake-gui: Add options to control warning-as-error messages
Add new widgets to the warning messages dialog to control treating
warnings as errors.
2016-01-12 14:03:32 -05: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
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
Sean McBride 111be1801f Rename header guards to not start with double underscore
Use regex to find/replace:

__(cm.*_h)
\1

Then fix QCMake.h by hand.
2014-12-11 13:53:06 -05:00
Brad King 92ddf0c9e2 cmake-gui: Capture cmSystemTools::Stdout and Stderr
Output sent through these APIs is logically part of the CMake process
output.  Capture it with callbacks and display it in the cmake-gui
output window along with other messages.
2014-05-15 10:28:42 -04:00
Brad King 73b13f5641 cmSystemTools: Rename ErrorCallback to MessageCallback
Clarify that it is the callback for the cmSystemTools::Message API.
Rename callback clients too.
2014-05-15 10:24:21 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04: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
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
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 c54f47635c ENH: Add support for showing combo box for choosing from a list of strings that a cache property can have. 2009-03-12 11:19:27 -04:00
Clinton Stimpson f8f4140b6c ENH: Add cross compiling support in the GUI in the same dialog that prompts for
the generator on the first configure.  It either ask for a toolchain file
      or asks for all the information a toolchain file might contain.

      Also added option for setting non-default compilers if not cross compiling.
      Fixes #6849.

      Also a bit of code cleanup and re-organizing.
2008-05-15 19:21:01 -04:00
Clinton Stimpson 7d2bbfe842 BUG: Fix #6733. Always convert "\" to "/" in source & binary directory fields on Windows. 2008-04-07 19:19:50 -04:00
Clinton Stimpson 7ff914227d ENH: Add debug output option to a new Options menu.
Move dev warnings option to the new Options menu.
      Fixes #6335.
2008-04-02 17:41:24 -04:00
Bill Hoffman 420725077c ENH: add ability to suppress dev warnings to gui code 2008-03-11 22:51:56 -04:00
Clinton Stimpson 57e46c74d4 BUG: Don't prompt for unsaved changes if no changes were made.
ENH:  Error messages go to output window instead of message boxes.
2007-11-09 15:18:49 -05:00
Clinton Stimpson e8a208384c ENH: Add menus in menu bar.
Add reload & delete cache options.
      Add option to quit after generation step (not yet remembered between sessions).
      Add Help -> About
      Remove Help button (in menu now)
      Remove Cancel button (File -> Exit and the Window 'X' button exist)
2007-11-06 01:16:11 -05:00
Clinton Stimpson cfa723d457 ENH: Prompt user for generator when there is none.
Many minor improvements, bug fixes, and style fixes.
2007-11-05 13:20:54 -05:00
Clinton Stimpson 8770969464 ENH: Allow working with empty build directories.
Make output window a bit smaller compared to cache view.
      Prompt on X'ing window as well as hitting cancel.
      Color new cache values red, and put them first.
2007-11-03 19:48:59 -04:00
Bill Hoffman c27953b62f ENH: remove qt warnings from qt with MS compiler 2007-11-03 12:50:02 -04:00
Clinton Stimpson 77ad85a6ab ENH: Add interrupt button near progress bar.
Implement help button.
      Implement cancel button.
      Add scrollable output window.
      Replace ON/OFF & combobox editors with checkboxes.
      Tab/backtab in cache table jumps between values (not names and values)
      Add tooltips to show help strings.
      Add application icon and qtmain for Windows.

BUG:  Fix save of cache values on configure.
2007-11-03 10:30:52 -04:00
Clinton Stimpson 6921981452 STYLE: Add license info to code. 2007-11-02 11:55:57 -04:00
Clinton Stimpson 800cbd0550 ENH: Beginnings of a Qt UI for CMake. 2007-11-02 11:50:17 -04:00