summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-6/+5
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Add properties to run cppcheck along with the compilerBill Hoffman2017-08-301-7/+60
| | | | | | Create a `<LANG>_CPPCHECK` target property (initialized by a `CMAKE_<LANG>_CPPCHECK` variable) to specify a `cppcheck` command line to be run along with the compiler.
* Merge topic 'server-cxx11'Daniel Pfeifer2017-08-271-7/+4
|\ | | | | | | | | | | | | | | | | 27d87fbd CTestCustom: Suppress exception loosening warning 7f29bbe6 server: always enable server 4614a3b2 server: backport to C++11 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1149
| * server: always enable serverDaniel Pfeifer2017-08-261-7/+4
| |
* | IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+0
|/ | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-17/+16
|
* Merge topic 'server-refactor'Brad King2017-07-181-1/+3
|\ | | | | | | | | | | | | | | | | | | cf0ae55d server: Add support for connections that aren't event based 5ddfb6a4 server: Add connection as part of a request d4f5d35c server: Refactor to make the event loop owned by server object 5acbf08b Tests: Teach Server test to forward exit code from server process Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !552
| * server: Refactor to make the event loop owned by server objectJustin Berger2017-07-111-1/+3
| |
* | Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command modeAndré Klitzing2017-07-141-22/+54
| |
* | Change ComputeFileMD5 to ComputeFileHashAndré Klitzing2017-07-141-7/+11
|/ | | | | | | * Use a parameter to select hash algorithm * Return a std::string as result or an empty string if it fails * Avoids unnecessary copy of hash value
* Access string npos without instancePavel Solodovnikov2017-06-011-13/+13
|
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-8/+8
|
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-2/+2
|
* clang-tidy: remove else after break and continueDaniel Pfeifer2017-04-211-1/+2
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-5/+5
| | | | | | | | | | | | | 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'
* bindexplib: Add support for parsing and integrating `.def` filesBrad King2017-03-211-4/+11
|
* Add properties to run the cpplint style checker with the compilerJamie Snape2017-01-231-5/+37
| | | | | | Create a `<LANG>_CPPLINT` target property (initialized by a `CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker command line to be run along with the compiler.
* clang-tidy: apply modernize-use-bool-literals fixesDaniel Pfeifer2016-12-121-8/+8
|
* cmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zeroBrad King2016-11-181-3/+10
| | | | | | | | When using `<LANG>_CLANG_TIDY` our internal launcher for the tool must capture its return code and stderr and report them on failure. Otherwise incorrect command lines silently fail. Closes: #16435
* cmake: If ldd for LINK_WHAT_YOU_USE fails to run then report whyBrad King2016-11-181-3/+7
|
* cmake: Comment why we ignore the include-what-you-use return codeBrad King2016-11-181-0/+1
| | | | | | | | The include-what-you-use tool always returns non-zero to indicate that it did not actually produce an object file as Clang would from the same command line. Add a comment explaining that this is why we ignore its return code. Also update our `pseudo_iwyu` test suite tool to always exit with an error too.
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-0/+1
|
* Merge topic 'clang-tidy'Brad King2016-10-201-38/+54
|\ | | | | | | | | | | effa6c83 fix more issues reported by clang-tidy fb461cac silence selected clang-tidy violations
| * fix more issues reported by clang-tidyDaniel Pfeifer2016-10-201-38/+54
| |
* | cmState: Split auxiliary classes into separate filesStephen Kelly2016-10-191-1/+1
| | | | | | | | | | | | | | Port dependents to the new locations as needed. Leave behind a cmState.h include in cmListFileCache to reduce noise. It is removed in a following commit.
* | cmState: Port dependent code to new cmStateSnapshot nameStephen Kelly2016-10-191-1/+1
|/
* 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.
* Ninja: Add internal tool to produce a ninja dyndep file for FortranBrad King2016-09-221-0/+7
| | | | | | | Create an internal `cmake -E cmake_ninja_dyndep` tool to read the "ddi" files generated by `cmake -E cmake_ninja_depends` from all sources in a target and generate a ninja dyndep file that tells Ninja about Fortran module dependencies within the target and on target dependencies.
* Ninja: Add internal tool to scan Fortran code for module dependenciesBrad King2016-09-221-0/+10
| | | | | | | | Create an internal `cmake -E cmake_ninja_depends` tool to scan an already-preprocessed Fortran translation unit for modules that it provides or requires. Save the information in a "ddi" file with a CMake-private format for intermediate dynamic dependency information. This file may the be loaded by another tool to be added later.
* server-mode: Introduce cmServerConnectionTobias Hunger2016-09-221-12/+30
| | | | | | | | Use it to split pipe and stdin/out handling out of cmServer itself. The server will shut down when it looses its connection to the client. This has the nice property that a crashing client will cause the server to terminate as the OS will close the connection on behave of the client.
* server-mode: Add --experimental flagTobias Hunger2016-09-201-4/+21
| | | | | | | | Allow for experimental cmProtocolVersions, which will only ever get listed if the server was started with the (undocumented) "--experimental" flag. Mark current protocol version 1.0 as experimental.
* cmake-server: Bare-bones server implementationTobias Hunger2016-09-191-0/+18
| | | | | | | | | | | | | | | Adds a bare-bones cmake-server implementation and makes it possible to start that with "cmake -E server". Communication happens via stdin/stdout for now. Protocol is based on Json objects surrounded by magic strings ("[== CMake Server ==[" and "]== CMake Server ==]"), which simplifies Json parsing significantly. This patch also defines an interface used to implement different versions of the protocol spoken by the server, but does not include any protocol implementaiton.
* cmake-server: Report server mode availablitily in CapabilitiesTobias Hunger2016-09-191-1/+5
| | | | | Report the availability of the server-mode in the output of cmake -E capabilities.
* cmcmd: Fix sort order in help outputTobias Hunger2016-09-131-1/+1
| | | | sort "sleep" before "tar", not after
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-9/+17
|
* CMake: don't use else after returnDaniel Pfeifer2016-08-181-9/+10
|
* cmake: Add `cmake -E capabilities` modeTobias Hunger2016-08-161-0/+12
| | | | | | | Add `cmake -E capabilities` to report on generators, cmake version and possibly other static capabilities of cmake. Closes: #15462
* Use better KWSys SystemTools::GetEnv and HasEnv signaturesDāvis Mosāns2016-07-181-10/+6
|
* cmake: Fix -E env_vs8_wince implementationBrad King2016-07-111-2/+2
| | | | | | | | | This code has accidentally not been compiled since commit v3.0.0-rc1~556^2 (cmake: Split -E command implementation into separate source file, 2013-10-03) because CMAKE_HAVE_VS_GENERATORS was local to `cmake.cxx`. Fixes #16195.
* cmake: Drop unused -E cmake_call_visual_studio_macro codeBrad King2016-07-111-24/+0
| | | | | | This code has not been compiled since commit v3.0.0-rc1~556^2 (cmake: Split -E command implementation into separate source file, 2013-10-03). It appears the code was never used since it was added anyway.
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-3/+2
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* use CM_NULLPTRDaniel Pfeifer2016-06-281-16/+23
|
* Add options to run `ldd -u -r` as a "link-what-you-use" toolBill Hoffman2016-06-171-4/+31
| | | | | | | Create a LINK_WHAT_YOU_USE target property and corresponding CMAKE_LINK_WHAT_YOU_USE variable to enable this behavior. Extend link commands by running `ldd -u -r` to detect shared libraries that are linked but not needed.
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-6/+2
| | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-2/+1
| | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* Improve string find: prefer character overloads.Daniel Pfeifer2016-05-241-1/+1
| | | | | Apply fix-its from clang-tidy's performance-faster-string-find checker. Ignore findings in kwsys.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-822/+507
| | | | | | | | | | | | | 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-7/+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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Help: Improve 'cmake -E md5sum' documentationBartosz Kosiorek2016-05-021-1/+1
|