summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-3/+3
| | | | Enable the check in .clang-tidy and fix all warnings.
* Fix misc. typosluz.paz2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -I ../cmake-whitelist.txt --skip="./Utilities"` where the whitelist consists of ``` aci ans behaviour buil convertor dum earch ect emmited emmitted helpfull iff isnt ith lowercased mose nd nknown nto objext ot pathes pevents splitted substract superceded supercedes te tim todays uint upto whitespaces ```
* Help: Add new section for CPack generatorsKyle Edwards2018-06-212-0/+2
| | | | | | | | | | | | | | | | | | | | The documentation for CPack generators previously lived in their respective internal CMake modules. This setup was misleading, because it implied that you should include the modules in your own code, which is not the case. Moving the documentation into a separate section does a better job of hiding the internal modules, which are just an implementation detail. The generator documentation has also been modified to remove any references to the module name. The CPackIFW module is a special exception: since it has user-facing macros, the documentation for these macros has been kept in the module page, while all other documentation related to the IFW generator has been moved into the new section. To make it easier to find the new documentation, the old help pages for the CPack*.cmake modules have not been deleted, but have been replaced with a link to their respective help page in the new documentation section.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-013-13/+52
| | | | | | | | | | | | 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.
* cmRST: Parse inline links and inline literalsBrad King2018-05-072-0/+8
| | | | | Render links as the link text only. Render literals as themselves. This is closer to what the Sphinx text generator does.
* cmRST: Add support for 'envvar' cmake domain roleBrad King2018-05-042-0/+4
| | | | | This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx: Add role and directive for 'envvar' in CMake domain, 2018-04-19).
* CTest: Add options to control test process affinity to CPUsBrad King2018-03-052-0/+21
| | | | | | | | | | In commit v2.8.0~170 (ENH: Added ctest test options PROCESSORS and RUN_SERIAL, 2009-09-07) CTest learned to track the number of processors allocated to running tests in order to balance it against the desired level of parallelism. Extend this idea by introducing a new `PROCESSOR_AFFINITY` test property to ask that CTest run a test with the CPU affinity mask set. This will allow a set of tests that are running concurrently to use disjoint CPU resources.
* cmake: specify source file extensionsBen Boeckel2018-01-091-10/+11
|
* execute_process: Allow UTF-8 as a synonym for the UTF8 keywordCraig Scott2017-12-271-1/+1
| | | | | | | | UTF-8 is the proper naming according to the UTF-8 RFC and is also the name used for a similar keyword in the file() command. This commit brings (backward compatible) consistency to the keyword names and allows the standard UTF-8 name to be used with execute_process(). The old UTF8 keyword is still supported.
* cmUVHandlePtr: Add uv_process_ptrBrad King2017-11-301-0/+1
|
* cmUVHandlePtr: Add uv_timer_ptrBrad King2017-11-301-0/+1
|
* cmUVHandlePtr: Move to CMakeLib to make it available everywhereBrad King2017-11-302-0/+183
|
* Enable clang-tidy modernize-loop-convert lintBrad King2017-09-191-6/+3
| | | | | Fix remaining diagnostics by this lint and remove it from our list of disabled lints.
* Merge topic 'no-crlf-blobs'Brad King2017-08-3014-745/+745
|\ | | | | | | | | | | | | | | | | ebc91a44 Avoid CRLF newlines in Git repo blobs c69b4c8d bzip2: Drop unused .dsp files Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !1211
| * Avoid CRLF newlines in Git repo blobsBrad King2017-08-3014-745/+745
| | | | | | | | | | | | | | | | In commit 8ed03baa76 (gitattributes: prefer `eol=crlf` to `-crlf`, 2017-08-23) we left a few CRLF blobs in the repository. Some Git versions get confused by text files with CRLF blobs. Convert them to LF blobs. Use the `eol=crlf` attribute to tell Git to use CRLF on checkout.
* | Merge topic 'cstyle-casts'Daniel Pfeifer2017-08-301-2/+3
|\ \ | |/ |/| | | | | | | | | 190e3825 Replace C-style casts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1176
| * Replace C-style castsDaniel Pfeifer2017-08-271-2/+3
| |
* | IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-262-2/+2
|/ | | | Also remove `#include "cmConfigure.h"` from most source files.
* Merge topic 'cxx11-nullptr'Brad King2017-08-252-3/+2
|\ | | | | | | | | | | | | 5962db43 Use C++11 nullptr Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1175
| * Use C++11 nullptrDaniel Pfeifer2017-08-242-3/+2
| |
* | gitattributes: prefer `eol=crlf` to `-crlf`Ben Boeckel2017-08-231-1/+1
|/ | | | | | The `crlf` attribute is deprecated in Git. This also changes the given files to be in the index using LF newlines, but they will be checked out with CRLF newlines due to the attribute.
* Xcode: Drop support for Xcode versions below 3Brad King2017-04-223-33/+0
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-114-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'
* testEncoding: use cmsys::ifstreamDaniel Pfeifer2017-03-291-2/+2
|
* testEncoding: include <cmsys/ConsoleBuf.hxx> on Windows onlyDaniel Pfeifer2017-03-291-0/+2
|
* execute_process: Add ENCODING option for Windows child process outputDāvis Mosāns2016-11-302-0/+52
| | | | Different applications can use different output encodings.
* iwyu: Fix more findingsDaniel Pfeifer2016-11-283-3/+15
|
* iwyu: Fix OSX specific issuesDaniel Pfeifer2016-11-221-1/+3
|
* Simplify CMake per-source license noticesBrad King2016-09-276-66/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* find_package: Optionally sort globbed directories in a meaningful orderPierluigi Taddei2016-09-152-0/+77
| | | | | | | | | | | | Add `CMAKE_FIND_PACKAGE_SORT_{ORDER,DIRECTION}` variables to specify sort order and direction. When multiple package with the same name have been found in the same location sorting option can be used to force a specific version to be loaded (e.g. libA_1.12.0 instead of libA_1.1.0). Currently sorting by NAME and by NATURAL order have been implemented. Natural ordering makes use of the `strverscmp(3)` ordering.
* Tests: Add test for our strverscmp implementationPierluigi Taddei2016-09-141-4/+68
| | | | | Cover typical examples and the ordering defined by the `strverscmp(3)` man page.
* Merge topic 'macro-parenthesis'Brad King2016-09-062-3/+3
|\ | | | | | | | | 1a9de803 surround macro arguments with parentheses
| * surround macro arguments with parenthesesDaniel Pfeifer2016-09-052-3/+3
| |
* | use CM_NULLPTRDaniel Pfeifer2016-09-052-2/+3
|/
* Tests/CMakeLib: include what you useDaniel Pfeifer2016-09-033-4/+7
|
* Tests/CMakeLib: use cmsys::ifstreamDaniel Pfeifer2016-09-032-10/+16
|
* Merge topic 'readability-named-parameter'Brad King2016-08-175-5/+5
|\ | | | | | | | | e7b842e1 Make sure unnused parameters are /*named*/
| * Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-165-5/+5
| |
* | fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-162-0/+11
|/
* Add missing braces around statements.Daniel Pfeifer2016-06-102-10/+17
| | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* PseudoMemcheck: revise style with clang-format.Daniel Pfeifer2016-06-101-14/+8
| | | | | | Rename memtester.cxx.in to memtester.cxx, run clang-format, then restore the original name. Fix the @_retval@ placeholder that was broken by clang-format.
* Merge topic 'remove-needless-copies'Brad King2016-05-271-1/+1
|\ | | | | | | | | | | 27ead963 Remove unnecessary local copies. 618fb23f Pass arguments that are not modified as const&.
| * Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-1/+1
| | | | | | | | | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.
* | Remove redundant c_str() calls.Daniel Pfeifer2016-05-262-9/+9
|/ | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* Revise C++ coding style using clang-formatKitware Robot2016-05-168-313/+256
| | | | | | | | | | | | | 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-2/+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.
* Help clang-format wrap after braces on long initializer listsBrad King2016-05-061-0/+2
| | | | | | Add a long comment inside a few braced initializer lists in order to convince clang-format to break after the opening brace and format the list without indenting every value past the opening brace.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove use of include <cmsys/ios/*> and cmsys_ios::*Brad King2015-08-202-32/+32
| | | | We no longer need this compatibility layer for the compilers we support.
* cmSystemTools: Teach RunSingleCommand to separate stdout and stderrBrad King2015-04-201-1/+1
| | | | | | | Extend the RunSingleCommand signature to capture stdout and stderr separately. Allow both to be captured to the same std::string to preserve existing behavior. Update all call sites to do this so that this refactoring does not introduce functional changes.