summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/CMakeSetup.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-13/+16
| | | | | 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.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-2/+2
|
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Ensure stdin, stdout, and stderr pipes are always openBrad King2019-05-021-0/+1
| | | | | | | | | | | | | On non-Windows platforms libuv assumes that file descriptors 0-2 are always used for standard pipes and never for anything else. Otherwise, libuv may re-use one of these descriptors and then fail an assertion when closing it. Similarly, On Windows platforms our ConsoleBuf implementation assumes that the standard handles are always open. If CMake is run with any standard pipes closed, open them with `/dev/null` or `NUL` to satisfy these assumptions. Fixes: #19219
* cmake-gui: Fix theme on Windows with Qt >= 5.10mistersandman2019-04-081-0/+3
| | | | | | | In Qt 5.10 the theme support moved to a separate QWindowsVistaStyle plugin. Issue: #19147
* QtDialog: Clean up and document -S and -B optionsKyle Edwards2019-01-251-12/+43
|
* cmake: Return generator docs directlyArtur Ryt2019-01-181-2/+1
| | | | | | | | | The GetGeneratorDocumentation() function was not accurately named and required the vector to populate to be passed as a function argument. This commit makes the slightly renamed function return by value, making it a true getter as implied by its name. Some minor refactoring of the implementation also makes the steps of populating the vector clearer.
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-1/+1
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* Merge topic 'readability-static-accessed-through-instance'Brad King2018-11-281-6/+6
|\ | | | | | | | | | | | | 3e60580784 clang-tidy: Fix readability-static-accessed-through-instance Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2647
| * clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-6/+6
| | | | | | | | Enable the check in .clang-tidy and fix all warnings.
* | clang-tidy: fix warnings in macOS-only codeBrad King2018-11-271-5/+4
|/
* CMake: Internally uses -S instead of -H to specify source directoryRobert Maynard2018-09-151-1/+1
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-7/+8
| | | | | | | | | | | | 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.
* Extend libuv file translate mode workaround to all executablesBrad King2018-01-231-0/+1
| | | | | | | | | | | | | | | Since libuv commit v1.14.1~7 (win: add uv__once_init() calls, 2017-08-30) the libuv initialization of the file translate mode may take place even if we do not use a uv loop. This change was included in our libuv update commit f4a26c748b (libuv 2018-01-19). Therefore use of libuv even through `cmSystemTools::GetRealPath` in any executable may trigger its file translate mode setting. Factor out the logic added to `cmake.exe` by commit v3.9.0-rc4~10^2 (cmake: Fix default file translate mode when using libuv, 2017-06-13) and re-use to initialize all executables. Issue: #16962
* cmake-gui: Add build option to use Qt5 windows plugin staticallyBrad King2017-11-131-0/+4
| | | | This will enable builds against a static Qt5 on Windows.
* cmake-gui: Enable High DPI scalingLuis Caro2017-09-151-0/+4
| | | | | | | | | | 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
* Use C++11 nullptrDaniel Pfeifer2017-08-241-8/+7
|
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-1/+1
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-3/+3
| | | | | | | | | | | | | 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'
* Add self-sufficient wrapper for <sys/stat.h>Daniel Pfeifer2017-03-241-1/+1
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-0/+2
|
* Encoding: Remove option to use ANSI code page internallyClinton Stimpson2016-11-021-2/+0
| | | | | | 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).
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge topic 'qtdialog-lib-paths'Brad King2016-09-231-0/+2
|\ | | | | | | | | 48624b3c cmake-gui: Do not remove library paths for Qt5 plugins.
| * cmake-gui: Do not remove library paths for Qt5 plugins.Clinton Stimpson2016-09-221-0/+2
| | | | | | | | | | Not removing library paths is necessary for QFileDialog to function correctly on Linux when using Qt5.
* | QtDialog: fix clang-tidy warningsDaniel Pfeifer2016-09-061-7/+8
| |
* | fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-0/+2
| |
* | Source/QtDialog: Run clang-formatBrad King2016-07-051-1/+1
| |
* | cmake-gui: Add build option to use Qt5 xcb plugin staticallyBrad King2016-06-301-0/+5
|/ | | | This will enable builds against a static Qt5.
* cmake-gui: Teach Qt5 where plugins are when launched through a symlinkRobert Maynard2016-06-091-0/+34
| | | | | | | | 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
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-97/+67
| | | | | | | | | | | | | 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.
* cmake-gui: Always use "C" locale for numbers (#16099)Clinton Stimpson2016-05-121-0/+2
| | | | | | 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | 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.
* cmake-gui: Teach --install make destination directory (#16064)Brad King2016-04-151-0/+1
| | | | Ensure the destination directory exists before creating symlinks in it.
* Merge topic 'cmake-gui-osx-install-command-line'Brad King2015-06-251-1/+1
|\ | | | | | | | | d2cf92ec cmake-gui: Change --install to use /usr/local/bin by default (#15627)
| * cmake-gui: Change --install to use /usr/local/bin by default (#15627)Brad King2015-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'cmake-gui-osx-install-command-line'Brad King2015-05-211-11/+67
|\ \ | |/ | | | | | | | | | | | | 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
| * cmake-gui: Replace command-line install dialog with information boxBrad King2015-05-211-1/+0
| | | | | | | | | | | | | | | | | | | | 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.
| * cmake-gui: Add --install option to add command-line tools on OS XBrad King2015-05-211-0/+67
| | | | | | | | | | | | | | 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.
| * cmake-gui: Drop undocumented and unused --mac-install optionBrad King2015-05-191-10/+0
| | | | | | | | | | | | 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.
* | cmState: Compute and store directory components.Stephen Kelly2015-05-161-0/+2
|/ | | | | | | | | | | | | 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.
* Remove use of cmsys_stl.Stephen Kelly2015-02-051-3/+3
| | | | It is not needed.
* Merge topic 'unicode-vs-projects'Brad King2014-03-171-1/+1
|\ | | | | | | | | | | ee8cef87 Encoding: If configured, write Visual Studio project files as UTF-8. 91fd99b8 Encoding: Provide option to configure CMake to use UTF-8 encoding.
| * Encoding: Provide option to configure CMake to use UTF-8 encoding.Clinton Stimpson2014-03-141-1/+1
| |
* | cmake-gui: Fix compile with Qt5 using UTF-8 internal encoding.Clinton Stimpson2014-03-131-2/+0
|/ | | | | Because we already call [to|from]Local8Bit() with C strings where we are supposed to, we do not need to specify UTF-8 encoding when converting C strings to QString.
* Unicode: cmake-gui encoding now matches KWSys encoding.Clinton Stimpson2014-03-111-0/+8
| | | | | | A UTF-8 QTextCodec is used with QString when KWSys is configured to treat strings as UTF-8. This means QString::toLocal8Bit() will convert to UTF-8.
* Use Encoding::CommandLineArguments for main() functions.Clinton Stimpson2014-01-041-5/+11
|
* Refactor internal resource location APIs and initializationBrad King2013-11-121-2/+1
| | | | | | | | | | | | | | | | | | | | Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources. Teach it to compute the locations of cmake, ctest, cpack, ccmake, and cmake-gui executables, and the location of CMAKE_ROOT. Provide this information from static cmSystemTools::Get<resource>() methods. Refactor code that needs these locations to use the new APIs. Teach FindCMakeResources to use the OS X system API to lookup the executable location. When running from the CMake build tree itself, leave a file in the tree that FindCMakeResources can use to read the location of the source tree. This avoids the need to compile the source tree location into a binary that may be installed and used without the source tree. Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build tree next to "cmake" and the other tools, as is already done in the install tree for the application bundle. This ensures a consistent set of executables are available in one directory.