Commit Graph

285 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
Brad King 32d569af9a cmake-gui: Teach --install make destination directory (#16064)
Ensure the destination directory exists before creating symlinks in it.
2016-04-15 13:23:41 -04:00
Brad King 7b990e82c5 cmake-gui: Populate CFBundleIdentifier in our Info.plist file (#16023) 2016-03-17 16:07:39 -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
Niels Ole Salscheider 7656662148 QtDialog: Add option to control XDG file install destination
Create a `CMAKE_XDGDATA_DIR` option and add a corresponding flag to the
`bootstrap` script.  This is needed for multiarch layouts where the
prefix is `/usr/${host}` but where architecture-independent files (like
the XDG-specific ones) are installed to `/usr/share`.
2015-12-21 10:23:48 -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
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
Gilles Khouzam 17009189f8 Windows: Fix CMAKE_HOST_SYSTEM_VERSION on Windows >= 8 (#15674)
According to GetVersionEx documentation:

 https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451.aspx
 https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241.aspx

we must manifest each application to explicitly declare support for each
version of Windows.
2015-09-21 09:02:41 -04:00
Clinton Stimpson 851915a58c cmake-gui: Improve packaging of Qt5 libraries.
Fixes #15685, where the right Qt5 dlls on Windows were not packaged because
they were not found when relying on the PATH environment variable.

Also some cleanup of code introduced in 8120e13f, but no longer needed with 678aaad1.
2015-09-17 08:32:51 -06:00
Francois Best a41ebd4ee5 cmake-gui: Add support for HiDPI (Retina) screens on OS X 2015-08-17 11:36:42 -04:00
Konstantin Podsvirov 068e7962bb CMake: Add CMake_INSTALL_DEPENDENCIES option
By default this option is ON.  Turn OFF to disable installing runtime
3rd-party dependencies.
2015-07-27 10:30:41 -04:00
Konstantin Podsvirov 42f0155bb9 cmake-gui: Install Qt5 Windows platform plugin
Qt5 requires a platform-specific runtime-loaded plugin.  We already
install it for OS X.  Install it for Windows too.
2015-07-27 10:21:10 -04:00
Konstantin Podsvirov c823f04e0c CMake: New option CMake_INSTALL_COMPONENTS
By default is OFF.
Now it's used with CPack IFW himself installer.
2015-07-07 09:16:40 -04:00
Konstantin Podsvirov 2531b90954 CMake: Install COMPONENTs (QtDialog)
Added "COMPONENT cmake-gui" for all install commands in lists file
2015-07-07 08:11:09 +03:00
Konstantin Podsvirov 938bbc4352 CMake: Install COMPONENTs
Added components:
- cmake
- ctest
- cpack
- cmake-gui
- ccmake
- data
- sphinx-html
- sphinx-singlehtml
- sphinx-qthelp

Other now Unspecified.
2015-07-07 08:11:09 +03:00
Brad King bd5bf762c8 Merge topic 'cmake-gui-osx-install-command-line'
d2cf92ec cmake-gui: Change --install to use /usr/local/bin by default (#15627)
2015-06-25 10:39:19 -04: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
Brad King d6011a61e9 Merge topic 'cmake-gui-osx-install-command-line'
d9b974b1 cmake-gui: Make command-line install help text selectable
2015-06-09 09:18:42 -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 2c54622ff5 Merge topic 'cmake-gui-osx-install-command-line'
e462ef74 Help: Add notes for topic 'cmake-gui-osx-install-command-line'
8ea2db26 cmake-gui: Replace command-line install dialog with information box
438ce4a0 cmake-gui: Add --install option to add command-line tools on OS X
41477d5c cmake-gui: Drop undocumented and unused --mac-install option
2015-05-21 09:03:50 -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
Brad King 438ce4a0fb cmake-gui: Add --install option to add command-line tools on OS X
On OS X add an "--install[=/path/to/bin]" option (defaulting to
/usr/bin) that installs symbolic links into the given directory.
This will help OS X users make the tools available on the command
line even when they sit inside a CMake.app bundle.
2015-05-21 08:59:31 -04:00
Brad King 41477d5c07 cmake-gui: Drop undocumented and unused --mac-install option
This option was once used by our OS X package installer to create
symlinks at install time.  Since switching to the DragNDrop installer
we no longer use this option.
2015-05-19 09:39:16 -04:00
Stephen Kelly 57bdc1a2f7 cmState: Compute and store directory components.
There is no need to duplicate these in all cmLocalGenerators.

Rename the symbols according to current conventions.

Add explicit calls to Set{Source,Binary}Directory with empty strings
in order to trigger the population of the components containers with
the current working directory in cmLocalGenerator.  Having
directories set to empty is a special case in CMake, which is relied
on for the `if(CMAKE_BINARY_DIR)` condition at the end of
CMakeDetermineSystem.cmake.
2015-05-16 08:11:33 +02:00
Stephen Kelly b23cf06f86 cmake: Remove redundant start directories.
They are maintained as containing the same content as the 'home'
directories, but they are never read from.

Fix some comments and help strings which confused the two by
name. They actually mean what is called CMAKE_SOURCE_DIR in
cmake code.
2015-04-21 00:12:51 +02:00
Stephen Kelly f081c5bddd cmState: Move CacheEntryType enum from cmCacheManager. 2015-04-13 11:44:16 -04:00
Stephen Kelly ff7169a03c Port to cmState. 2015-04-13 11:44:15 -04:00
Stephen Kelly f3922a9a5b Port QtDialog to non-iterator cache API. 2015-04-08 18:47:00 +02:00
Stephen Kelly 77f2807ce5 cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
Being initialized is a requirement for this method to return something,
and is what differentiates it from using GetIterator with it.GetValue.
2015-04-07 23:25:44 +02:00
Stephen Kelly 14973054a2 Add API for cache loading, deleting and saving to the cmake class.
Migrate existing users of the CacheManager API to use the new
API.  The CacheManager will be going away soon.
2015-04-07 23:25:39 +02:00
Brad King 3347c5e4f9 Revert topic 'refactor-cache-api'
This topic was never tested without some follow-up commits.  The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
2015-04-07 17:15:04 -04:00
Stephen Kelly 7b7ae3b1a1 Port QtDialog to non-iterator cache API. 2015-04-06 17:58:55 +02:00
Stephen Kelly 9ada4c0433 cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
Being initialized is a requirement for this method to return something,
and is what differentiates it from using GetIterator with it.GetValue.
2015-04-06 17:58:55 +02:00
Stephen Kelly 1fe7f24c2b Add API for cache loading, deleting and saving to the cmake class.
Migrate existing users of the CacheManager API to use the new
API.  The CacheManager will be going away soon.
2015-04-06 17:58:55 +02:00
Clinton Stimpson 9c76ff015a QtDialog: Fix CMake packaging with CPack on OS X with Qt5. 2015-03-24 20:56:38 -06:00
Brad King b7351d8e14 Merge topic 'cmake-gui-reset-generator-toolset-and-platform'
1ade687d cmake-gui: Reset generator platform and toolset on configure (#15411)
2015-02-20 08:10:48 -05:00
Brad King 1ade687d8d cmake-gui: Reset generator platform and toolset on configure (#15411)
At the start of each configure step we already reset the generator
selection (CMAKE_GENERATOR) to match that loaded for the current
project.  Add missing code to reset the generator platform and toolset
(CMAKE_GENERATOR_PLATFORM and CMAKE_GENERATOR_TOOLSET) also so that they
do not leak across projects.
2015-02-19 09:14:38 -05:00
Stephen Kelly 421eadb45b Remove use of cmsys_stl.
It is not needed.
2015-02-05 20:44:25 +01:00
Kevin Wojniak 8ced6375df cmake-gui: Shrink spacing between search field and checkbox.
This allows the search field to show on OS X Yosemite
2015-01-26 09:22:21 -07:00
Kevin Wojniak b46a15194b cmake-gui: Change install buttons to activate on clicked instead of pressed.
This matches the behavior of other buttons.
2015-01-26 09:21:36 -07: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
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
Ben Boeckel fb13502fca QtDialog: install the 128x128 icon
Also only install the icons to the icons directory.
2014-10-29 11:47:29 -04:00
Ben Boeckel fcb4541a05 QtDialog: don't install desktop file bits on Apple
Apple uses the dmg file which doesn't have .desktop support.
2014-10-29 11:38:48 -04:00
Adam Strzelecki 9b98fd528d cmake-gui: Make sure we bundle Qt5 Cocoa platform plugin
Otherwise CMake.app bundle will not run when using Qt5.
2014-10-10 10:17:18 -04: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