summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | 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'
* iwyu: Fix more findingsDaniel Pfeifer2016-11-281-10/+10
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-0/+1
|
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | Include it in dependents which have previously relied on it transitively.
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Port dependent code to new cmStateSnapshot nameStephen Kelly2016-10-191-1/+1
|
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+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.
* CTest: fix include-what-you-use violationsDaniel Pfeifer2016-08-251-25/+26
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-5/+6
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-8/+8
|
* mark functions with CM_OVERRIDEDaniel Pfeifer2016-06-271-1/+1
|
* Add CM_OVERRIDE to some functionsDaniel Pfeifer2016-06-271-2/+2
| | | | | | | Run clang-tidy's modernize-use-override checker. This checker must have issues in version 3.8. It has way too little matches. And it adds override to destructors. Revert the changes on the destructors and change override to CM_OVERRIDE.
* Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-1/+1
| | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* cmCTestScriptHandler: don't call find repeatedly.Daniel Pfeifer2016-05-241-3/+4
| | | | Also, prefer the character overload.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-411/+280
| | | | | | | | | | | | | 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-19/+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-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cmState: Initialize default definitions immediately.Stephen Kelly2015-10-131-0/+1
| | | | Don't leave this as cmMakefile responsibility.
* Set the current dirs on the snapshot before creating the cmMakefile.Stephen Kelly2015-10-071-6/+3
| | | | | | The cmMakefile should get a fully prepared snapshot and not clobber its definitions. It should eventually be able to process list files from any starting-point snapshot, though that is some refactoring away still.
* CTest: Port away from cmLocalGenerator.Stephen Kelly2015-10-051-12/+2
|
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-4/+6
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmCTestScriptHandler: Simplify deletes.Stephen Kelly2015-08-281-26/+9
| | | | Deleting a nullptr is fine.
* cmGlobalGenerator: Remove MakeLocalGenerator method.Stephen Kelly2015-08-281-1/+1
| | | | Inline implementation to callers.
* cmGlobalGenerator: Require a snapshot to create a local generator.Stephen Kelly2015-08-281-1/+2
|
* ctest: Disable CMake Cygwin legacy warning in dashboard client scriptBrad King2015-06-081-0/+4
| | | | | | | | In ctest -S mode we load the CTestScriptMode module to give the configuration scripts access to the host system information. CYGWIN.cmake warns unless we explicitly tell it not to warn since there is no chance for a cmake_minimum_required(VERSION) to be called.
* cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-2/+1
| | | | It is required anyway, so this makes it explicit.
* Merge topic 'refactor-cmLocalGenerator'Brad King2015-05-191-0/+2
|\ | | | | | | | | | | | | | | | | fa9eb814 cmLocalGenerator: Remove redundant path access. 1933f3d1 cmLocalGenerator: Remove redundant path conversions. 9e4b6cc2 cmState: Store computed relative paths to to current directories. 991f5e49 cmState::Snapshot: Store components for current directories. 57bdc1a2 cmState: Compute and store directory components.
| * 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.
* | cmGlobalGenerator: Add NVI wrapper to create local generator.Stephen Kelly2015-05-161-1/+1
|/
* Merge topic 'clean-up-cmMakefile'Brad King2015-04-211-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8dc3a67c cmMakefile: Out-of-line the directory methods. 0f3c8cfa cmMakefile: Use method abstraction to access directories. b288a997 cmMakefile: Rename SetStart* directory API to SetCurrent*. 932d53bc cmMakefile: Remove redundant method duplication. 32b8f03a cmMakefile: Port users of GetStart* methods to new names. 54d6a918 cmMakefile: Rename GetCurrent{Output,Binary}Directory. 55d80d0a cmMakefile: Rename GetCurrent{,Source}Directory. b23cf06f cmake: Remove redundant start directories. fcf246ac cmMakefile: Populate Home directories on initialize. 8878bea7 cmake: Initialize Home directories on cmake for find-package mode. 044dc815 Use the Home directories from the cmake class where intended. d67e8f24 cmake: Fix directory used to find the cache 1ea085d1 cmMakefile: Initialize dir definitions early. f034bb2f Remove redundant calls to MakeStartDirectoriesCurrent. 3a68c323 cmMakefile: Fix wrong parameter names.
| * cmMakefile: Rename SetStart* directory API to SetCurrent*.Stephen Kelly2015-04-201-2/+2
| |
| * cmMakefile: Rename GetCurrent{,Source}Directory.Stephen Kelly2015-04-201-1/+1
| | | | | | | | Match the names used in cmake code.
* | cmSystemTools: Teach RunSingleCommand to separate stdout and stderrBrad King2015-04-201-4/+8
|/ | | | | | | 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.
* cmMakefile: Remove always-null first parameter to ReadListFile.Stephen Kelly2015-04-181-2/+2
|
* Port cmCommand consumers to cmState.Stephen Kelly2015-04-151-2/+2
|
* CTest: Drop "Error in read script" message at end of testingZack Galbreath2015-02-271-5/+1
| | | | | | | A more-specific error message is always displayed earlier in the output if any real error occurred. This final summary message is distracting to readers searching through the output for the word "error". Simply drop it.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | All compilers hosting CMake support the std class.
* ctest: count errors from scripts properlyBen Boeckel2014-12-101-1/+1
| | | | | | | In the unlikely event that someone has a billion+ scripts (or some codepath returns negative numbers), we could overflow and make a pile of errors a non-error. This change also allows us to use flags for the error in the future rather than just "something went wrong".
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-15/+15
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* CTest: Implement message(STATUS) output for 'ctest -S' scriptsBrad King2014-07-021-0/+11
| | | | | | Send status messages to the CTest HANDLER_OUTPUT log since they are part of the script handler output. This also ensures they appear inline with other test command handler output.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-10/+10
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* Remove some c_str() calls.Stephen Kelly2014-03-111-5/+5
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-2/+2
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* Refactor internal resource location APIs and initializationBrad King2013-11-121-4/+4
| | | | | | | | | | | | | | | | | | | | 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.
* CTest: more aggressive implementation of ctest_empty_binary_directory()Nils Gladitz2013-11-021-3/+60
| | | | | | | | | Make sure that CMakeCache.txt is the last file being removed since the binary directory may be left in a state that is no longer removable otherwise. Also retry removal a couple of times which makes this more robust on windows where file locks may temporarily prevent removal.
* Drop "full" documentation output typesBrad King2013-10-151-6/+0
| | | | | | | | | | | | | | | | We will no longer support full documentation generation from executables and will instead generate documentation with other tools. Disable (with a warning left behind) the command-line options: --copyright --help-compatcommands --help-full --help-html --help-man Drop supporting code. Drop manual sections generation from executables. Remove internal documentation construction APIs. Drop unused sections See Also, Author, Copyright, Compat Commands, Custom Modules.
* CTest: Extend -D command line arg handling for variable definitionsDavid Cole2012-06-241-0/+9
| | | | | | If the argument following -D is not a valid dashboard type string, then try to parse it as a "var:type=value" string just like cmake already does.
* CTest: Simplify environment save/restoreBrad King2012-04-241-5/+1
| | | | | | | | Replace use of AppendEnv/RestoreEnv pairs with instances of SaveRestoreEnvironment. Simplify the signature of AppendEnv and use it in place of similar loops elsewhere. Move the RestoreEnv implementation inside the SaveRestoreEnvironment destructor which is the only place left that calls it.
* Implement ctest_upload commandZach Mullen2011-03-151-0/+2
|