summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-2517-0/+43
| | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* Merge topic 'fix-crash-trace-exp-uninit-vars'Brad King2018-04-103-0/+10
|\ | | | | | | | | | | | | aad360eb3d Fix crash with --trace-expand --warn-uninitialized together Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1944
| * Fix crash with --trace-expand --warn-uninitialized togetherR2RT2018-04-093-0/+10
| | | | | | | | | | | | | | | | Some code paths in `ExpandVariablesInString{New,Old}` were not checking the `filename` parameter for a null pointer, but this can happen when using the above flags together. Add the checks and a test case. Fixes: #17896
* | Drop Visual Studio 8 2005 generatorBrad King2018-04-024-12/+0
|/ | | | This generator has been deprecated since CMake 3.9. Remove it.
* cmcmd: Restore support for running multiple lint toolsBrad King2017-10-271-5/+6
| | | | | | | Refactoring in commit v3.10.0-rc1~115^2 (Clean up iwyu code to not be one big if statement, 2017-08-28) incorrectly changed the logic to run only one lint tool at a time. Restore support for running all tools specified on the command-line.
* Clean up iwyu code to not be one big if statement.Bill Hoffman2017-09-1312-7/+11
| | | | | | | | | | This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This is used for co-compile commands. These are tools that want to mirror the compiler. For each compiler invocation the tool will be invoked first. This started as a way to implement include what you use (iwyu), but has expanded to include cpplint, cppcheck and others. Likely there will be more in the future as well. This commit implements each one in its own function and provides a way to add additional ones in the future with less work.
* Add properties to run cppcheck along with the compilerBill Hoffman2017-08-301-1/+1
| | | | | | Create a `<LANG>_CPPCHECK` target property (initialized by a `CMAKE_<LANG>_CPPCHECK` variable) to specify a `cppcheck` command line to be run along with the compiler.
* Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command modeAndré Klitzing2017-07-1431-0/+47
|
* Add some unit tests for md5sumAndré Klitzing2017-07-0910-0/+17
|
* Deprecate Visual Studio 8 2005 generatorBrad King2017-04-214-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.
* Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-194-12/+0
| | | | This generator has been deprecated since CMake 3.6. Remove it.
* cmListFileLexer: bail out on seek-errorsGregor Jasny2017-02-273-0/+16
| | | | | | | If we are given a FIFO, for example, we cannot seek back after trying to read a Byte-Order-Mark. Closes: #16607
* clang-format.bash: Use Git attributes to mark files for formattingBrad King2017-02-221-0/+2
|
* Add properties to run the cpplint style checker with the compilerJamie Snape2017-01-231-1/+1
| | | | | | Create a `<LANG>_CPPLINT` target property (initialized by a `CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker command line to be run along with the compiler.
* server-mode: Introduce cmServerConnectionTobias Hunger2016-09-223-0/+3
| | | | | | | | Use it to split pipe and stdin/out handling out of cmServer itself. The server will shut down when it looses its connection to the client. This has the nice property that a crashing client will cause the server to terminate as the OS will close the connection on behave of the client.
* server-mode: Add --experimental flagTobias Hunger2016-09-201-1/+1
| | | | | | | | Allow for experimental cmProtocolVersions, which will only ever get listed if the server was started with the (undocumented) "--experimental" flag. Mark current protocol version 1.0 as experimental.
* cmake-server: Bare-bones server implementationTobias Hunger2016-09-193-0/+3
| | | | | | | | | | | | | | | Adds a bare-bones cmake-server implementation and makes it possible to start that with "cmake -E server". Communication happens via stdin/stdout for now. Protocol is based on Json objects surrounded by magic strings ("[== CMake Server ==[" and "]== CMake Server ==]"), which simplifies Json parsing significantly. This patch also defines an interface used to implement different versions of the protocol spoken by the server, but does not include any protocol implementaiton.
* cmake: Add `cmake -E capabilities` modeTobias Hunger2016-08-164-0/+5
| | | | | | | Add `cmake -E capabilities` to report on generators, cmake version and possibly other static capabilities of cmake. Closes: #15462
* cmake: Add an option to control what files needs to be tracedAlex Turbov2016-06-174-0/+9
| | | | | | | | | | Even in relatively small projects using `--trace` (and `--trace-expand`) may produce a lot of output. When developing a custom module usually one is interested in output of only a few particular modules. Add a `--trace-source=<file>` option to enable tracing only a subset of source files. The final output would be only from requested modules, ignoring anything else not matched to given filename(s).
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-1/+3
| | | | | | | | | | | | | 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.
* Deprecate Visual Studio 7 .NET 2003 generatorBrad King2016-04-284-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.
* Tests: Drop test for VS 7.0 generator deprecation warningsBrad King2016-04-284-12/+0
| | | | | We removed this generator but forgot to remove this now-unused test case.
* Add options to run clang-tidy with the compilerDaniel Pfeifer2016-04-131-1/+1
| | | | | | Create a <LANG>_CLANG_TIDY target property (initialized by a CMAKE_<LANG>_CLANG_TIDY variable) to specify a clang-tidy command line to be run along with the compiler.
* Drop Visual Studio 6 generatorBrad King2016-03-094-11/+1
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* cmake: Teach --build to reject multiple --target optionsSebastian Schuberth2016-02-054-0/+8
| | | | | | | | | | Previously we did not clearly document that `--target` is only supported to be specified once. Even worse, specifying it multiple times would silently ignore any previously specified targets and only build the last target. Update the documentation to specify this. Update the implementation to reject multiple `--target` options to prevent user errors.
* 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.