summaryrefslogtreecommitdiffstats
path: root/Source/cmTest.cxx
Commit message (Collapse)AuthorAgeFilesLines
* add_test: Honor CROSSCOMPILING_EMULATOR only when cross-compilingRalf Habacker2023-12-191-0/+1
| | | | | | Add policy CMP0158 to provide compatibility for existing projects. Fixes: #23672
* SetProperty: suppress raw pointer usageMarc Chevrier2023-05-261-4/+0
|
* clang-tidy: address `modernize-use-default-member-init` lintsBen Boeckel2022-05-241-2/+1
|
* Move helpers functions from cmStringAlgorithms.h to cmValue.hMarc Chevrier2021-09-211-1/+0
| | | | | Helpers functions related to cmValue semantic are now part of cmValue.h header.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-4/+5
|
* Enhancement: SetProperty accept cmProp or std::stringMarc Chevrier2021-08-251-0/+4
| | | | | Methods SetProperty of classes cmPropertyMap, cmStateDirectory and cmMakefile accept now cmProp or std::string as argument.
* Refactor: cmTest::GetProperty returns cmPropMarc Chevrier2021-08-091-3/+3
|
* cmMakefile::GetProperty: return cmPropVitaly Stakhovsky2020-04-011-1/+3
|
* cmPropertyMap: Introduce cmProp as return type for GetProperty() functionsVitaly Stakhovsky2020-03-131-2/+3
| | | | | | | Currently properties are usually stored internally as `std::string`. However, family of GetProperty() functions return them as `const char *` using `c_str()`. The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties more naturally.
* AppendProperty: convert value param to std::stringVitaly Stakhovsky2020-01-251-1/+1
|
* Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-2/+2
| | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* add_test: Add COMMAND_EXPAND_LISTS optionSergey Bobrenok2019-06-071-1/+12
| | | | | | | | | Add a `COMMAND_EXPAND_LISTS` option to the `add_test` command to cause `;`-separated lists produced by generator expressions to be expanded into multiple arguments. The `add_custom_command` command already has such an option. Fixes: #17284
* clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
| | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-1/+0
|
* 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
|
* 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.
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-161-3/+3
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-11/+9
| | | | | | | | | | | | | 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-9/+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-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>
* 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.
* cmPropertyMap: Remove chaining logic.Stephen Kelly2015-06-071-6/+8
| | | | | | | The chaining logic doesn't belong to the container, and the CMakeInstance pointer doesn't need to be in cmPropertyMap. Size goes from 56 to 48 bytes with GNU libstdc++-5.1.
* cmPropertyMap: Remove scope parameter from API where not used.Stephen Kelly2015-06-071-2/+2
|
* backtrace: Convert to local paths in IssueMessageBen Boeckel2014-06-051-1/+1
| | | | | This is the only place we care show the FilePath to the user, so defer the expensive relative path calculation until here.
* genex: remove the need for backtracesBen Boeckel2014-06-051-4/+2
| | | | | Rather than making dummy backtraces and passing them around, just make backtraces optional.
* cmMakefile: return a backtraceBen Boeckel2014-06-051-1/+1
| | | | | This allows backtraces to be fully controlled by the makefile rather than externally (and makes changing how they are manipulated easier).
* stringapi: Use strings for test namesBen Boeckel2014-03-081-5/+1
|
* stringapi: Use strings for property namesBen Boeckel2014-03-081-13/+5
| | | | Property names are always generated by CMake and should never be NULL.
* Drop builtin property documentationBrad King2013-10-161-111/+0
| | | | | | Drop all DefineProperty calls for non-chained properties. Drop the documentation from the chained ones. The documentation for all properties is now in Help/prop_*/*.rst files.
* Doc: fix example for FAIL_REGULAR_EXPRESSIONRolf Eike Beer2013-05-111-1/+1
| | | | The example used PASS_REGULAR_EXPRESSION instead of FAIL...
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-5/+5
| | | | | | | | | | | | | | | | | 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 #12342: Add APPEND_STRING option to set_property()Alex Neundorf2011-07-151-2/+2
| | | | | | | | | set_property() has APPEND, which creates a list. E.g. when appending to COMPILE_FLAGS a string is needed, not a list. With the APPEND_STRING option the value is append as string, not as list. Alex
* Add the WORKING_DIRECTORY property to testsRolf Eike Beer2010-12-161-0/+6
|
* Added RESOURCE_LOCK test property.Zach Mullen2010-03-021-0/+6
|
* Move documentation for new set_tests_properties properties.Zach Mullen2009-12-171-0/+45
|
* 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.
* Record backtrace for every add_test commandBrad King2009-08-111-9/+12
| | | | | | We teach cmTest to hold a backtrace for the add_test command that created it. This will be used later to report context for errors at generate time.
* ENH: change to CDASHKen Martin2009-08-041-3/+3
|
* BUG: Fix documentation deficiency noted in issue #7885. Thanks to Philip ↵David Cole2009-04-031-4/+18
| | | | Lowman for the gist of the patch.
* ENH: Add NAME mode to ADD_TEST commandBrad King2009-03-161-0/+1
| | | | | | | | This creates command mode add_test(NAME ...). This signature is extensible with more keyword arguments later. The main purpose is to enable automatic replacement of target names with built target file locations. A side effect of this feature is support for tests that only run under specific configurations.
* ENH: Refactor storage of test command linesBrad King2009-03-161-11/+1
| | | | | We used to separate the command executable from its argument vector. It is simpler to just store the whole command line in one vector.
* ENH: Teach CTest to submit test property LABELSBrad King2009-01-071-0/+5
| | | | | This teaches CTest to send the test property "LABELS" in Test.xml dashboard submissions as Label elements inside a Labels element.
* ENH: support unset of propertiesKen Martin2008-04-011-4/+0
|
* ENH: Add AppendProperty methods for use by C++ code in CMake. Simplify ↵Brad King2008-01-171-0/+10
| | | | implementation of SET_PROPERTY command by using them.
* STYLE: Spelling fixes on documentationAmitha Perera2008-01-101-4/+4
|
* ENH: added per test timeout supportKen Martin2007-01-251-0/+9
|
* BUG: fix missing return valueKen Martin2006-12-071-0/+1
|
* ENH: make properties a bit more formal with documentation and chainingKen Martin2006-12-071-13/+50
|
* ENH: make sure command is unix style as it may have been sent into cmake as ↵Bill Hoffman2006-04-251-0/+1
| | | | a windows path