Commit Graph

8 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
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
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 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 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 89e1512f23 STYLE: add license. 2007-11-12 23:59:25 -05:00
Clinton Stimpson a81896eaed ENH: Add ability to add cache entries (even before first configure). 2007-11-12 23:54:49 -05:00