summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildAndTestHandler.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | 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'
* cmWorkingDirectory: use the new classBen Boeckel2017-03-061-10/+4
| | | | | | These functions just need to change the directory for a block of code and then go back to the caller's expected location. Use cmWorkingDirectory to ensure that all return paths are handled.
* 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-0/+2
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-2/+3
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-9/+9
|
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-1/+1
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-256/+168
| | | | | | | | | | | | | 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-10/+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-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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.
* Add API for cache loading, deleting and saving to the cmake class.Stephen Kelly2015-04-071-2/+1
| | | | | Migrate existing users of the CacheManager API to use the new API. The CacheManager will be going away soon.
* Revert topic 'refactor-cache-api'Brad King2015-04-071-1/+2
| | | | | | This topic was never tested without some follow-up commits. The GetCacheEntryValue API returns a pointer to memory freed on return. It will have to be revised along with the rest of the original topic.
* Add API for cache loading, deleting and saving to the cmake class.Stephen Kelly2015-04-061-2/+1
| | | | | Migrate existing users of the CacheManager API to use the new API. The CacheManager will be going away soon.
* cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for NinjaGregor Jasny2015-02-261-1/+1
| | | | | | | | | The Ninja build system does not support a in-file verbositiy switch. Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE setting and pass it as an optional '-v' argument to Ninja. This can serve as a reasonable fallback. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* CTest: Use clear instead of erase-all.Stephen Kelly2015-02-171-2/+1
|
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-6/+6
|
* Replace !foo.size() pattern with foo.empty().Stephen Kelly2015-01-181-2/+2
|
* Replace 'foo.size() == 0' pattern with foo.empty().Stephen Kelly2015-01-181-2/+2
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-2/+2
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-2/+2
| | | | All compilers hosting CMake support the std class.
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-8/+8
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* CTest: Use -A option to pass generator platform selectionBrad King2014-09-151-1/+1
| | | | This is less verbose than defining CMAKE_GENERATOR_PLATFORM.
* CTest: Add options to set generator platformBrad King2014-09-051-0/+13
| | | | | | | | | | The ctest_configure command already reads the CTEST_CMAKE_GENERATOR variable to get the value for the cmake -G option. Read new variable CTEST_CMAKE_GENERATOR_PLATFORM to pass on as CMAKE_GENERATOR_PLATFORM. The "ctest --build-and-test" mode already has "--build-generator" to specify the -G option to CMake. Add a "--build-generator-platform" option to specify a value to pass on as CMAKE_GENERATOR_PLATFORM.
* cmGlobalGenerator: Take Build output argument by referenceBrad King2014-07-311-1/+1
| | | | | | No call sites pass NULL to the output argument, so take it by reference to avoid the if(output) conditions. Propagate the change through the TryCompile APIs that call it.
* cmSystemTools: Add callback for StderrBrad King2014-05-151-2/+4
| | | | | | | | | Factor a common callback type out of StdoutCallback. Add an equivalent StderrCallback. While at it, use "size_t" for the data length instead of "int". Teach "ctest --build-and-test" to capture the Stderr callback because output sent through it is part of the logical CMake process output.
* cmSystemTools: Rename ErrorCallback to MessageCallbackBrad King2014-05-151-2/+2
| | | | | Clarify that it is the callback for the cmSystemTools::Message API. Rename callback clients too.
* cmCTestBuildAndTestHandler: Refactor output captureBrad King2014-05-151-19/+22
| | | | Use an RAII class to add and remove callbacks.
* cmCTestBuildAndTestHandler: Refactor local loop varBrad King2014-05-151-3/+2
|
* 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.
* ctest: Teach --build-options to allow zero optionsBrad King2013-11-181-14/+5
| | | | | | The --build-options option consumes all following arguments until either --build-target or --test-command. Fix the logic to allow this to be zero options.
* ctest: Make the --build-makeprogram optional for --build-and-testBrad King2013-11-181-4/+9
| | | | | | | | | | GenerateBuildCommand now knows how to lookup CMAKE_MAKE_PROGRAM or choose a generator-provided default build tool. Therefore the --build-makeprogram can now be optional and simply override the default selection when provided. Note that with --build-nocmake we now need to load the cache in order to make the CMAKE_MAKE_PROGRAM entry available to GenerateBuildCommand.
* Refactor internal resource location APIs and initializationBrad King2013-11-121-1/+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.
* CTest: Add options to set generator toolsetBrad King2013-02-071-4/+20
| | | | | | | | | | The ctest_configure command already reads the CTEST_CMAKE_GENERATOR variable to get the value for the cmake -G option. Read new variable CTEST_CMAKE_GENERATOR_TOOLSET for -T. The "ctest --build-and-test" mode already has "--build-generator" to specify the -G option to CMake. Add a "--build-generator-toolset" option to specify the -T value.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-13/+13
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Fix floating point comparison warnings. Thanks to Alex Neundorf for the patch.David Cole2009-10-131-2/+2
|
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* STYLE: fix warningBill Hoffman2009-06-151-0/+1
|
* BUG: fix crash when running ctest coverage for VTKBill Hoffman2009-06-151-0/+12
|
* ENH: Minor readability improvement in CTest outputBrad King2008-12-181-3/+3
| | | | | | | | When ctest --build-and-test runs the --test-command its output did not quote the arguments of the command being tested making it difficult to read. This adds the quotes. This also changes the wording of the failure case to not sound like CTest could not run the executable when in fact it ran and returned failure.
* ENH: Implement feature request from issue 7885. Allow setting environment ↵David Cole2008-11-261-1/+1
| | | | variables on a per-test basis for ctest using set_test_properties ENVIRONMENT.
* BUG: Make CTest honor user-specified configBrad King2008-09-041-2/+8
| | | | | | When the -C or --build-config option is used to specify the configuration to be tested by CTest, do not override it with the configuration in which CTest is built.
* BUG: make sure ctest sees the output of the cmake run in build and test ↵Bill Hoffman2008-06-181-0/+8
| | | | cases, it was not...
* ENH: fix build issue with config type not being specified by ctestBill Hoffman2007-09-171-1/+0
|
* ENH: for build and test default the config type to the one that ctest was ↵Bill Hoffman2007-09-111-2/+24
| | | | built with, it is good for the current ctest setup, and other projects can always specify a value on the command line
* BUG: better passing of global TIMEOUT to internal ctest invocaitonsKen Martin2007-06-061-11/+11
|
* ENH: fix passing of time limit to some ctest invocations that also use ↵Ken Martin2007-06-041-2/+2
| | | | build-options
* ENH: support for --build-config-sample feature #1022Ken Martin2007-03-191-88/+43
|
* BUG: fixes so that --build-and-test will honor timeoutsKen Martin2007-01-301-3/+39
|
* ENH: added per test timeout supportKen Martin2007-01-251-4/+9
|