summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Fix `-E time` argument passing to childBrad King2016-01-204-0/+10
| | | | | | | | | | Since this command was introduced in 2002 it has incorrectly constructed the child process command line by concatenating arguments separated by spaces with no quoting. Fix this by passing the command argument vector directly to RunSingleCommand without an intermediate quoting and re-parsing step. Reported-by: Andrey Pokrovskiy <wonder.mice@gmail.com>
* Print line number of cache parse errors (#11109)Ashley Whetter2016-01-197-0/+26
| | | | | Track the line number while parsing `CMakeCache.txt` files and include it in a parse failure error message.
* Add -Werror and -Wno-error command-line optionsMichael Scott2016-01-1213-0/+74
| | | | | | | | | Expand the -W set of cmake options to include support for the -Werror and -Wno-error format, which is used to control upgrading and downgrading warning and error messages. Implement support for these new formats for the dev and deprecated message types. Add tests and updated documentation for new options.
* cmake: Teach -E make_directory to support multiple input directoriesBartosz Kosiorek2015-12-107-0/+18
|
* cmake: Teach -E copy_directory to support multiple input directoriesBartosz Kosiorek2015-12-0710-0/+23
|
* cmake: Teach -E copy[_if_different] to support multiple files (#15703)Bartosz Kosiorek2015-12-0420-0/+35
| | | | | | If multiple input files are provided then the destination must be a directory. If only one input file is provided then destination may be either a file or directory.
* cmake: Improve '-E' help message formattingBartosz Kosiorek2015-12-044-4/+4
|
* Explicitly enable deprecated warnings by default.Michael Scott2015-12-011-0/+3
| | | | | | | | | | Explicitly enable deprecated warnings by default, via the cmake::GetSuppressDeprecatedWarnings method, which signals suppression is turned off unless the CMake variables are set as required. Add tests and update the documentation for the new functionality.
* Modify dev warning options to affect deprecated warnings.Michael Scott2015-12-011-0/+13
| | | | | | | | | | | Change the '-Wdev' and '-Wno-dev' options to also enable and suppress the deprecated warnings output, via the 'CMAKE_WARN_DEPRECATED' CMake variable, by default. This action does not happen if the user specifies a deprecated warning message option. Add tests and update the documentation for the new functionality.
* Add -W options to control deprecated warning messages.Michael Scott2015-12-014-0/+14
| | | | | | | | Add 'deprecated' warning options type, to allow setting CMAKE_WARN_DEPRECATED via the -W '-Wdeprecated' and '-Wno-deprecated' options. Add tests for new options and updated documentation.
* Refactor the -W options parser to be generic.Michael Scott2015-12-015-1/+18
| | | | | | Refactor the -Wdev and -Wno-dev options parser to use a generic -W parser that follows the GCC pattern, excluding support for -Werror=TYPE and -Wno-error=TYPE formats for now.
* Explicitly enable author (dev) warnings by default.Michael Scott2015-12-011-0/+3
| | | | | | | | | Explicitly enable author warnings by default, via the cmake::GetSuppressDevWarnings method, which signals suppression is turned off unless the CMake variables are set as required. Add test cases for author and deprecated messages displayed by default.
* Tests: Revise message in RunCMake.CommandLine -Wdev caseMichael Scott2015-11-303-3/+3
| | | | Use more prose-like capitalization.
* Document and test CMAKE_[CURRENT_](BINARY|SOURCE)_DIR in script modeTamas Kenez2015-10-062-0/+15
|
* Tests: Add case for -Wdev and -Wno-dev with non-message() warnings (#15747)Michael Scott2015-09-253-0/+16
|
* Revert topic 'cmake-W-options' (#15747)Brad King2015-09-2218-76/+0
| | | | | | | | The changes in commit c96fe0b4 (cmake: Add -W options to control deprecation warnings and errors, 2015-07-28) fail to account for -Wdev warnings produced by places in CMake other than message(). This causes a regression in which -Wno-dev fails to suppress such warnings. Revert the feature until it can be revised accordingly.
* cmake: Add -W options to control deprecation warnings and errorsMichael Scott2015-07-2918-0/+76
| | | | | | | | | | | Refactor the -Wdev and -Wno-dev to use a generic -W parser that follows the GCC pattern. Include support for setting CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED via the deprecated warning. Add -Werror=dev and -Wno-error=dev options so that dev warning options are in line with deprecated warning options. Use a new CMAKE_SUPPRESS_DEVELOPER_ERRORS internal cache entry to store the above new dev options persistently. Add tests for new options and updated cmake documentation and release notes to list new options.
* cmake: add --trace-expand optionBen Boeckel2015-07-233-0/+6
| | | | | | | | The --trace option is helpful, but sometimes, what you're looking for is deep under many layers of function calls and figuring out what instance of the function call you're looking at is tedious to determine (usually involving patching and message()). Instead, add a --trace-expand option to trace while expanding commands into what CMake actually sees.
* cmake: Fix --build <relative-dir> for VS generators (#15609)Brad King2015-06-115-0/+24
| | | | | | | | | | The VS >= 10 generators need to parse the .sln file from the build directory to locate targets in subdirectories. This occurs after we change the working directory to the build tree. If a relative directory other than "." was given then we would change to it and also refer to the .sln file location with it. Fix this by converting the build tree to a full path always. This will also give a more informative error message when the directory does not exist.
* Tests: Extend RunCMake.CommandLine to cover --build with no argBrad King2015-06-113-0/+4
|
* cmake: Add internal -E mode to run include-what-you-use with the compilerBill Hoffman2015-05-199-0/+14
| | | | | | | | Add an internal "cmake -E __run_iwyu" mode to wrap the compiler call. Run a given include-what-you-use command line with the compiler options and report a warning if it finds anything. Then run the real compiler. Co-Author: Brad King <brad.king@kitware.com>
* Deprecate Visual Studio 7 generator (.NET 2002)Brad King2015-04-154-0/+10
| | | | | Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
* Deprecate Visual Studio 6 generatorBrad King2015-04-154-0/+12
| | | | | Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
* cmake: Provide guidance when an invalid -G option is givenGerald Combs2015-04-102-2/+6
| | | | | | | Print a list of generators if no generator or an invalid one is supplied. Signed-off-by: Gerald Combs <gerald@wireshark.org>
* Tests: Move more command line tests into RunCMake.CommandLineBrad King2015-04-1038-0/+108
| | | | | | Port most CMakeTestBadCommandLines test cases to RunCMake.CommandLine and drop the former test. Add validation of expected results, which was not done by the old test.
* Tests: Consolidate, refactor and extend -E tar testsNils Gladitz2015-04-1022-40/+0
|
* cmake: Teach "-E tar" command a "--format=" optionNils Gladitz2015-04-103-0/+3
| | | | | | | Allows specifying a libarchive defined archive format currently restricted to 7zip, gnutar, pax, paxr and zip. The default is "paxr" (pax restricted).
* Makefile: Tolerate a BOM while scanning source dependencies (#15493)Brad King2015-04-036-0/+43
| | | | | | | Otherwise an #include directive on the first line of a source file is ignored if the file contains a Byte-Order-Mark. Suggested-by: Aleksey Konovalov <konovalov.aleks@gmail.com>
* Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v'Brad King2015-02-263-0/+22
|
* cmake: Teach "-E tar" command a "--files-from=" optionBrad King2015-01-2614-0/+23
| | | | | | Read file names from the lines of a specified file. Reject input lines starting in '-' to leave room for option parsing to be added later. Add just '--add-file=' now to allow files starting in '-' to be specified.
* cmake: Teach "-E tar" command a "--mtime=" optionBrad King2015-01-197-0/+14
| | | | | | | | | | Add an option to set the mtime of entries in a tarball so that one can create a tarball with a consistent content hash (e.g. MD5) for a given set of files regardless of their current timestamps on disk. This will be useful for submission of tarballs to CDash, which tracks content hashes to avoid duplication. Inspired-by: Bill Hoffman <bill.hoffman@kitware.com>
* RunCMake: Expect empty output by default.Stephen Kelly2014-12-311-0/+2
| | | | | | | | | | | Expect tests to specify stderr content if it is present. Fix the CMP0019 test, which has only been testing the WARN status until now. Specify in the CommandLine and FPHSA tests that content is at least one character. Set policies in the Language and CheckModules tests, which have empty test output, modulo unrelated policies on some platforms.
* cmCacheManager: parse -D flags more strictlyBen Boeckel2014-10-201-1/+1
| | | | | | | | | | | | | In the case of: -DCACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG:BOOL=TRUE the variable is parsed out as: CACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG because the parser allows '=' in the variable name. Disallow such a name on the command line.
* Tests: test -D parsing on the command lineBen Boeckel2014-10-206-0/+15
|
* cmake: Add '-E env' command-line toolBrad King2014-06-2311-0/+24
| | | | | | | | | | | | | Extend the cmake command-line interface to support cmake -E env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]... This will be useful to run processes with modified environments without using a shell or a full "cmake -P" script to wrap it. Extend the RunCMake.CommandLine test to cover success and failure cases. Inspired-by: Jonathan Bohren <jbo@jhu.edu>
* cmake: Do not open directories as scripts (#14966)Brad King2014-06-093-0/+4
| | | | | Check if a file path is a directory before opening it. Extend the RunCMake.CommandLine test with a case running "cmake -P" on a directory.
* cmake: Fix --build crash on bad CMAKE_GENERATOR in cacheBrad King2014-06-039-0/+14
| | | | | | | | | | If we fail to create the generator named by CMAKE_GENERATOR, exit with an error message instead of crashing. While at it, fix the wording of the error message when CMAKE_GENERATOR is not set. Extend the RunCMake.CommandLine test with cases covering the "cmake --build" option when the named directory does not provide a CMakeCache.txt with a valid CMAKE_GENERATOR.
* cmake: Add '-E sleep' commandBrad King2014-01-217-0/+12
| | | | Add a cmake command-line interface to provide a cross-platform 'sleep'.
* cmake: Improve '-E create_symlink' edge case handling (#14713)Brad King2014-01-207-0/+38
The logic added by commit ffc0b5e4 (Overwrite the symlink if it already exists, 2007-02-15) does not recognize and remove existing broken links before replacing them. Improve the logic to remove any existing destination file or link (but not directory). On failure, report an error message explaining why the existing path could not be removed or the new one could not be created. Add a RunCMake.CommandLine test to cover 'cmake -E' cases. Start with test cases covering 'cmake -E create_symlink' behavior on UNIX platforms.