Commit Graph

141 Commits

Author SHA1 Message Date
Kyle Edwards
fd6ea2f67f Refactor: Rename cmCMakePresetsFile to cmCMakePresetsGraph
And change all references to "file" to say "graph" instead.
2022-01-06 18:52:30 -05:00
Craig Scott
6c657173d8 cmake-gui: Address deprecation warnings with Qt6 2021-05-08 16:19:21 +10:00
Matthew Woehlke
8aebd159fc CMake GUI: Don't use QToolButton
Replace QToolButton instances with QPushButton. QToolButton is only
meant to be used on tool bars and some other special situations. Worse,
we had a mix of QToolButton and QPushButton for things that clearly
should be using the same widget. This will improve visual consistency
and may fix some rendering issues.
2021-01-15 11:24:16 -05:00
Matthew Woehlke
0bc327a79c CMake GUI: Improve signal specification
Don't use subclasses to connect to QAbstractButton::clicked. This is
slightly dodgy, but of more immediate importance, tweaking it will allow
us to change the widget type of some QToolButton instances that should
be QPushButton.
2021-01-15 11:21:07 -05:00
Kyle Edwards
ef03124237 CMake GUI: Add --browse-manual argument 2020-10-27 12:05:41 -04:00
Kyle Edwards
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field
Make this field separate for both architecture and toolset. Allow
architecture and toolset to be either strings or objects with value
and strategy fields.

Fixes: #21317
2020-10-22 11:24:39 -04:00
Kyle Edwards
d471406f0b CMake GUI: Disable preset fields instead of hiding them 2020-10-16 15:16:04 -04:00
Kyle Edwards
a4382f72d7 CMake GUI: Add presets functionality 2020-10-05 09:49:59 -04:00
Kyle Edwards
0fe2ee3d43 CMake GUI: Add "CMake Reference Manual" help item
And switch the ordering of "Help" and "About".
2020-09-30 16:17:31 -04:00
Kyle Edwards
85f5009d27 CMake GUI: Add environment editor 2020-09-28 09:46:35 -04:00
Kyle Edwards
ab8f6fdd8c CMake GUI: Modernize signal-slot connections
Qt5 supports passing function pointers to QObject::connect(), and
prefers this over SIGNAL() and SLOT(). Modernize the connections,
stop using a deprecated signal from QComboBox, and modernize a few
QKeySequence's.
2020-09-27 12:06:54 -04:00
Brad King
df6b077625 cmake: Remove broken '--warn-unused-vars' option
This option has been broken since commit b9f9915516 (cmMakefile: Remove
VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2).  That commit removed the
check that an initialized variable has actually been used and caused the
option to warn on every variable ever set.  This was not caught by the
test suite because the test for the feature only checked that warnings
appear when needed and not that they do not appear when not needed.

The option was never very practical to use.  Remove it to avoid the
runtime cost of usage tracking and checks for every variable (which we
were doing even when the option was not used).
2020-06-29 17:23:27 -04:00
Ben Boeckel
ed2fe558b0 CursesDialog: resolve clang-tidy warnings
Fixes:

  - unnecessary bool expression (cmCursesMainForm)
  - removes a duplicate if/else branch (RegexExplorer)
  - collapses redundant if/else branch logic (CMakeSetupDialog and
    cmCursesStringWidget)
2020-06-02 07:37:56 -04:00
Ben Boeckel
44f1744bed QtDialog: avoid using deprecated APIs 2020-06-02 07:37:56 -04:00
Jiri Malak
7a0c17f704 cmake-gui: Do not pass CMAKE_{C,CXX}_COMPILER items to cmake if empty
If C or C++ compiler is not specified in the initial dialog, do not pass
`CMAKE_C_COMPILER` or `CMAKE_CXX_COMPILER` cache entries for
cross-compilation setup.  Instead allow the normal search for the
compiler to proceed.
2020-04-27 11:12:25 -04:00
Jiri Malak
11cbf79d15 cmake-gui: Pass CMAKE_SYSTEM_PROCESSOR to from gui to cmake
Add missing `CMAKE_SYSTEM_PROCESSOR` cmake cache entry to passed options
for first configure.  We already pass `CMAKE_SYSTEM_{NAME,VERSION}`.
2020-04-13 11:17:10 -04:00
Marc Chevrier
9de0355d4f Modernize memory management
Update internals of various classes.
2020-03-05 07:34:01 -05:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Brad King
c1d6b135ed cmake-gui: Update Qt copyright holder in About dialog
Qt is now copyright "The Qt Company Ltd.".
2019-06-12 12:39:25 -04:00
Julien Jomier
12ef832c96 cmake-gui: Fix icon overlay on windows
Since commit 9175a378f5 (QtDialog: Add windows taskbar progress,
2018-11-17, v3.14.0-rc1~330^2) we've added a missing overlay icon.
This results in Windows falling back to a default overlay icon.
Simply drop this line.

Fixes: #19160
2019-04-11 14:03:29 -04:00
Julien Jomier
48ec0bc140 cmake-gui: Add field for generator platform selection
Extend the "first configure" dialog with a field for the user to select
a value for `CMAKE_GENERATOR_PLATFORM`.

Fixes: #17343
2019-01-18 12:41:35 -05:00
Julien Jomier
9175a378f5 QtDialog: Add windows taskbar progress 2018-11-20 17:16:08 +01:00
Bartosz Kosiorek
ab2e35d614 Replace occurrences of "Mac OS X" with "macOS" in comments
Apple's main Operating system changed their name from OS X to macOS:

    https://www.engadget.com/2016/06/13/os-x-is-now-macos/

Revise source comments accordingly.
2018-09-10 13:34:09 +02:00
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* 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.
2018-06-01 09:53:42 -04:00
Gregor Jasny
96d642c7b8 cmake-gui: Use cmake::Open to open generated project 2017-10-13 21:28:35 +02:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Daniel Pfeifer
994beddb93 CMakeSetupDialog: Pass QPoint by value 2017-06-08 22:15:21 +02:00
Daniel Pfeifer
422359fe79 CMakeSetupDialog: use multi-arg 2017-05-05 09:21:17 +02:00
Daniel Pfeifer
726b3b6f75 QtDialog: add reference in foreach 2017-05-05 09:21:13 +02:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Nico Heßler
1ca2d5d1db cmake-gui: Add button to open the generated project
Look for VS or Xcode project files at the top of the build tree.
If present, enable an "Open Project" button to open them through
the OS desktop services.
2016-09-13 16:11:29 -04:00
Daniel Pfeifer
62c5f9afc3 QtDialog: fix clang-tidy warnings 2016-09-06 08:42:54 -04:00
Brad King
9ad10c8feb cmake-gui: Reference LGPLv3 when redistributing Qt
Download http://www.gnu.org/licenses/lgpl.txt and place it as
Licenses/LGPLv3.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/LGPLv3.txt so that the dialog can
display a path to it.
2016-06-17 15:02:54 -04:00
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
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