Commit Graph

331 Commits

Author SHA1 Message Date
Brad King
79b241dee0 cmake-gui: Update RegexExplorer for changes to KWSys 2017-12-05 11:32:08 -05:00
Brad King
6c23107725 Merge topic 'cmake-gui-qt-static-windows'
3a993c49 Tests: Add options to disable tests requiring Qt
27a73f16 cmake-gui: Add build option to use Qt5 windows plugin statically

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1476
2017-11-14 07:23:40 -05:00
Brad King
27a73f1613 cmake-gui: Add build option to use Qt5 windows plugin statically
This will enable builds against a static Qt5 on Windows.
2017-11-13 09:54:49 -05:00
Gregor Jasny
96d642c7b8 cmake-gui: Use cmake::Open to open generated project 2017-10-13 21:28:35 +02:00
Brad King
836f42b3c0 Merge topic 'cmake-gui-high-dpi'
6fb36572 cmake-gui: Enable High DPI scaling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1271
2017-09-18 10:08:59 -04:00
Luis Caro
6fb36572dc cmake-gui: Enable High DPI scaling
This Qt flag enables UI scaling based on scale factor provided by the
operating system.  Only supported on versions of Qt >= 5.6.

The flag has no effect on macOS, where high DPI support is already
enabled as a setting in the bundle's info.plist.

Fixes: #17026
2017-09-15 10:54:36 -04:00
Brad King
0b33aee48b Use C++11 override instead of CM_OVERRIDE
We now require C++11 support including `override`.  Drop use of
the old compatibility macro.  Convert references as follows:

    git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' |
      xargs sed -i 's/CM_OVERRIDE/override/g'
2017-09-15 10:06:41 -04:00
Daniel Pfeifer
ca2233e31f IWYU: Mark cmConfigure.h with pragma: keep
Also remove `#include "cmConfigure.h"` from most source files.
2017-08-26 07:41:04 +02:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Brad King
b90330f574 Merge topic 'qt-pass-point-by-value'
994beddb CMakeSetupDialog: Pass QPoint by value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !946
2017-06-09 10:34:06 -04:00
Daniel Pfeifer
994beddb93 CMakeSetupDialog: Pass QPoint by value 2017-06-08 22:15:21 +02:00
Daniel Pfeifer
5b02bcf682 QtDialog/FirstConfigure: remove 'return' from void expression 2017-06-08 16:40:57 +02:00
Daniel Pfeifer
c36d63cd48 cmake: initialize with Role that controls which commands to register 2017-05-08 22:29:44 +02:00
Brad King
22d0a83a4c Merge topic 'c++11-iwyu'
50dd15af QtDialog: block include-what-you-use
f3e21613 cmServer: include what you use
9535823b IWYU: map system symbols to libuv
6a91ee02 IWYU: add mapping for cm::auto_ptr
7165065f cmInstalledFile: add cmConfigure.h as first #include

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !811
2017-05-08 10:03:15 -04:00
Daniel Pfeifer
50dd15af58 QtDialog: block include-what-you-use 2017-05-06 00:03:48 +02:00
Daniel Pfeifer
422359fe79 CMakeSetupDialog: use multi-arg 2017-05-05 09:21:17 +02:00
Daniel Pfeifer
1ffe47e37f QCMakeCacheView: prever QVector over QList 2017-05-05 09:21:16 +02:00
Daniel Pfeifer
726b3b6f75 QtDialog: add reference in foreach 2017-05-05 09:21:13 +02:00
Daniel Pfeifer
377d4df279 QCMakeCacheView: avoid temporary containers for iteration 2017-05-05 09:21:12 +02:00
Daniel Pfeifer
a57b30bb60 QtDialog: add missing emit keywords 2017-05-05 09:21:11 +02:00
Daniel Pfeifer
b13bc8659f Disable clang-tidy checks on files generated by Qt 2017-04-28 09:45:21 +02:00
Clinton Stimpson
86787633f8 cmake-gui: Fix display of icon under Wayland.
Fixes: #16797
2017-04-17 16:48:25 -06:00
Daniel Pfeifer
1d829c862c Use quotes for non-system includes
Automate with:

git grep -l '#include <cm_' -- Source \
  | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'

git grep -l '#include <cmsys/' -- Source \
  | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'

git grep -l '#include <cm[A-Z]' -- Source \
  | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
2017-04-11 22:35:21 +02:00
Daniel Pfeifer
e9fc7ff505 Add self-sufficient wrapper for <sys/stat.h> 2017-03-24 22:58:25 +01:00
Clinton Stimpson
8f1bce12d2 cmake-gui: trim spaces from user-created variable names
Fixes: #15955
2017-01-20 13:31:09 -05:00
Gregor Jasny
4164078c85 cmake-gui: Add MATCHALL option to Regex Explorer
Closes: #16204
2017-01-10 09:28:13 -05:00
Brad King
dde72ee943 cmake-gui: Clarify help string on toolset selection field
The text `-T parameter` may be read as an example value for the field,
but the `-T` part should not be included.  Clarify the wording.

Closes: #16475
2016-12-01 14:27:13 -05:00
Daniel Pfeifer
2e620f0b38 Fix several include-what-you-use findings 2016-11-08 09:42:04 -05:00
Clinton Stimpson
baead1e2a8 Encoding: Remove option to use ANSI code page internally
The switch to use UTF-8 encoding has been defaulted to on for quite some
time since commit v3.2.0-rc1~116^2 (Encoding: Switch to use UTF-8
internally by default on Windows, 2014-12-26).
2016-11-02 08:48:34 -06:00
Stephen Kelly
2fe3e55d53 cmState: Move CacheEntryType enum to separate namespace
Port dependent code to the change.
2016-10-19 15:40:58 +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
Brad King
785f875426 Merge topic 'qtdialog-lib-paths'
48624b3c cmake-gui: Do not remove library paths for Qt5 plugins.
2016-09-23 08:39:56 -04:00
Clinton Stimpson
48624b3cb8 cmake-gui: Do not remove library paths for Qt5 plugins.
Not removing library paths is necessary for QFileDialog to function correctly
on Linux when using Qt5.
2016-09-22 13:19:04 -06: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
5d3b5bef11 QCMakeCacheView: simplify boolean expression 2016-09-08 23:35:59 +02:00
Daniel Pfeifer
ad42eb33b6 QCMakeCacheView: no else after return 2016-09-08 23:33:08 +02:00
Daniel Pfeifer
62c5f9afc3 QtDialog: fix clang-tidy warnings 2016-09-06 08:42:54 -04:00
Daniel Pfeifer
efed6468ed fix a load of include-what-you-use violations 2016-09-03 08:04:56 -04:00
Konstantin Podsvirov
c18dc6fbe5 Added CMake_BUILD_DEVELOPER_REFERENCE option
By default is OFF and marked as advanced.

It's also add custom cmake-developer-reference (ALL) target

Generated output will be installed to ${CMAKE_DOC_DIR}/developer-reference.
2016-08-16 19:02:35 +03:00
Brad King
5de1d406f1 Source/QtDialog: Run clang-format 2016-07-05 15:15:57 -04:00
Brad King
73a3c0cd98 cmake-gui: Add build option to use Qt5 xcb plugin statically
This will enable builds against a static Qt5.
2016-06-30 11:26:53 -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
Robert Maynard
f28401554a cmake-gui: Teach Qt5 where plugins are when launched through a symlink
When we are on OSX and we are launching cmake-gui from a symlink, the
application will fail to launch as it can't find the qt.conf file which
tells it what the name of the plugin folder is. We need to add this path
BEFORE the application is constructed as that is what triggers the
searching for the platform plugins
2016-06-09 13:21:27 -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
Clinton Stimpson
cab095e11e cmake-gui: Always use "C" locale for numbers (#16099)
Set LC_NUMERIC = "C" at startup after Qt initializes the application
because Qt may have adopted the current locale from the environment.
CMake does not define behavior for non-C-locale numeric behavior.
2016-05-12 09:24:36 -04:00
Brad King
0ac18d40c8 Remove //------... horizontal separator comments
Modern editors provide plenty of ways to visually separate functions.
Drop the explicit comments that previously served this purpose.
Use the following command to automate the change:

    $ git ls-files -z -- \
        "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" |
      egrep -z -v "^Source/cmCommandArgumentLexer\." |
      egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" |
      egrep -z -v "^Source/cmDependsJavaLexer\." |
      egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" |
      egrep -z -v "^Source/cmExprLexer\." |
      egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" |
      egrep -z -v "^Source/cmFortranLexer\." |
      egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" |
      egrep -z -v "^Source/cmListFileLexer\." |
      egrep -z -v "^Source/cm_sha2" |
      egrep -z -v "^Source/(kwsys|CursesDialog/form)/" |
      egrep -z -v "^Utilities/(KW|cm).*/" |
      xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}'

This avoids modifying third-party sources and generated sources.
2016-05-09 09:41:43 -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
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