summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Store lowercase command names in profiling outputCraig Scott2020-07-132-1/+18
| | | | | | | This ensures commands can be properly aggregated by tools processing the profiling output. Fixes: #20946
* Merge topic 'fileApiAddPrecompileHeadersBacktrace'Brad King2020-05-251-1/+1
|\ | | | | | | | | | | | | | | | | | | 9f6d40ee23 fileapi: Extend codemodel targets with PRECOMPILE_HEADERS b698764a31 Tests: Add a PCH example to RunCMake.FileAPI codemodel-v2 b3812c0e54 Tests: Fix indentation in RunCMake.FileAPI cxx_exe.json 9c48804b69 PCH: Fix source group of per-architecture PCH headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4684
| * fileapi: Extend codemodel targets with PRECOMPILE_HEADERSJustin Goshi2020-05-221-1/+1
| |
* | Merge topic 'third-parties-layout'Brad King2020-05-081-0/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | 2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix 75e87e3db4 bootstrap: update list of problematic files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4705
| * | Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-0/+0
| |/ | | | | | | Fixes: #20666
* | cmake: Allow arbitrary args passed to CMake scriptAlex Turbov2020-05-062-0/+4
|/
* cmake -E: add cat command.Johnny Jazeix2020-04-1510-0/+49
| | | | | | Concatenate files and print on the standard output. FIXES: #20557
* Merge topic 'llvm-rc-include-path'Brad King2020-04-071-8/+8
|\ | | | | | | | | | | | | 35a29ec827 llvm-rc: Restore include path for data after explicit preprocessing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4570
| * llvm-rc: Restore include path for data after explicit preprocessingThomas Bernard2020-04-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) with llvm-rc we explicitly preprocess RC source files and then compile separately without -I flags. This broke cases where the RC source references data files adjacent to itself or in the include path. This change adds the expansion of the include paths when calling the llvm-rc in order for the resource files to be picked up correctly by llvm-rc. Since the RC compiled file is first preprocessed, the file being compiled by llvm-rc resides in the build directory. In order for llvm-rc to find the resource data specified relative to the .rc file being compiled, the source file path is preppended in the include list so that the original source path takes priority over all the other includes paths specified. A space was added in the CMAKE_INCLUDE_FLAG_RC to make the include directive work properly for llvm-rc. Checks on the rc.exe showed that the syntax change doesn't affect it's proper operation. Fixes: #20529
* | Merge topic 'llvm-rc-stderr'Brad King2020-03-273-3/+4
|\ \ | |/ | | | | | | | | | | dc93cbb0d8 llvm-rc: Print stderr output when calling tools through cmake_llvm_rc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4525
| * llvm-rc: Print stderr output when calling tools through cmake_llvm_rcThomas Bernard2020-03-263-3/+4
| | | | | | | | | | | | The stored error pipe is output if the program fails. Fixes: #20494
* | cmake: add command line options to output script profiling dataWouter Klouwen2020-03-0711-0/+49
|/ | | | | | | | | | | | | | | For users of CMake who want to optimize their scripts if they take a while to run, this commit adds the ability to output profiling data. To enable this output, it adds the two command line parameters to select the output path and format. This commit adds the first profiling format of type ``google-trace``, which is the output is a JSON file containing Duration events as per the Google Trace Format specification: https://docs.google.com/document/d/1CvAClvFfyA5R- PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
* Add -E cmake_llvm_rc to preprocess files for llvm-rcThomas Bernard2020-02-049-0/+38
| | | | | | | | | llvm-rc requires preprocessed rc files. The CMake command line tool cmake_llvm_rc enables channing the preprocessor call and the resource compiler and make this appear as single compilation step. When llvm-rc is detected as resource compiler, the RC compilation step is set to use this command.
* trace: Add time and stack level to JSON output formatFrank Winklmeier2020-01-221-4/+8
| | | | | | | | Add the timestamp and stack depth of the function call to the JSON trace output format. This information can be useful for cmake profiling and call stack inspection (see e.g. https://github.com/volo-zyko/cmake-profile-stats). Improve unit test to allow for varying set of keys to check in trace lines.
* Merge topic 'trace-test-support-python26-and-older'Kyle Edwards2020-01-031-8/+13
|\ | | | | | | | | | | | | 00f25dacc0 trace: Directly parse commandline arguments without argparse Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4169
| * trace: Directly parse commandline arguments without argparseDaniel Mensinger2020-01-011-8/+13
| |
* | Tests: do not use the same variable name in nested loopsRolf Eike Beer2019-12-311-3/+3
|/ | | | Spotted by LGTM.com.
* trace: Add test for the JSON-v1 traceDaniel Mensinger2019-12-236-0/+103
|
* cmake -E: Add rm with improved semantics over remove and remove_directoryJohnny Jazeix2019-11-1336-0/+133
|
* Initialize CMAKE_EXPORT_COMPILE_COMMANDS from envvar of the same nameDaan De Meyer2019-10-185-0/+34
| | | | Fixes: #18386
* cmake: Fix relative path regression in -CPeter Waller2019-10-1412-10/+38
| | | | | | | | | | | | | | | | | | Since commit 4ca0526f8a (cmake: Pass -S and -B into PreLoad.cmake and -C scripts, 2019-08-20, v3.16.0-rc1~195^2) the value of `CMAKE_SOURCE_DIR` is the source directory rather than the current working directory. This was correct on its own, but the place storing that value is also used as the base for relative paths specified on the command line. The latter should of course be relative to the current working directory. The fix is to switch to use a full path internally, unless a full path is already specified. Add tests for the behaviour of `-C` under these four circumstances: {with -S, without -S} x {full path, relative path} Fixes: #19827
* Merge topic 'remove_directory-symlink'Brad King2019-08-305-0/+23
|\ | | | | | | | | | | | | e6c9a8bac3 cmake: Teach -E remove_directory to remove directory symlinks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3738
| * cmake: Teach -E remove_directory to remove directory symlinksJon Chronopoulos2019-08-305-0/+23
| | | | | | | | | | | | | | If the argument to `remove_directory` is a symlink to a directory, remove the symlink instead. Issue: #19533
* | cmake: Pass -S and -B into PreLoad.cmake and -C scriptsPeter Waller2019-08-277-0/+35
|/ | | | | | | Before this, it was not possible to see what the source or build directories were set to on the command line. Fixes: #19619
* Add --trace-redirect parameter to redirect trace output to a fileIgor Ivanov2019-08-107-0/+24
|
* cmake -E: Add true and false commandsKyle Edwards2019-07-113-0/+6
|
* cmake: Teach -E capabilities to report supported fileapi requestsBrad King2019-06-071-1/+1
| | | | Fixes: #19339
* Merge topic 'remove_directories'Brad King2019-06-0411-1/+28
|\ | | | | | | | | | | | | | | | | 07a80c7002 cmake: Teach -E remove_directory to remove multiple directories 013bee698e Tests: Add RunCMake.CommandLine make_directory test checks 3eb16de327 Tests: Fix RunCMake.CommandLine make_directory test name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3411
| * cmake: Teach -E remove_directory to remove multiple directoriesJohn Freeman2019-06-037-0/+18
| | | | | | | | | | The `make_directory` command can make multiple directories in a single invocation. Make `remove_directory` mirror that behavior.
| * Tests: Add RunCMake.CommandLine make_directory test checksJohn Freeman2019-06-032-0/+9
| |
| * Tests: Fix RunCMake.CommandLine make_directory test nameJohn Freeman2019-06-033-1/+1
| |
* | Tests: Fix RunCMake.CommandLine test to use generator in no-S-B caseBrad King2019-06-031-4/+6
|/ | | | | | | Apply the fix from commit baed22c4b0 (Tests: Fix RunCMake.CommandLine test to use generator with -S and -B, 2019-04-10) to the `no-S-B` case too. It also generates a build system and should use the generator being tested.
* Merge topic 'default-generator-env'Brad King2019-05-2223-0/+122
|\ | | | | | | | | | | | | | | | | d0f0ba0f7a Tests: Add environment generator tests a48ce8f4bf Help: Add documentation for default generator environment variables 083cf7e8a2 cmake: Allow default generator to be set by environment variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3218
| * Tests: Add environment generator testsEicke Herbertz2019-05-2223-0/+122
| |
* | Merge topic 'std-pipes-always'Brad King2019-05-031-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | c85524a94a Ensure stdin, stdout, and stderr pipes are always open Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !3282
| * | Ensure stdin, stdout, and stderr pipes are always openBrad King2019-05-021-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | On non-Windows platforms libuv assumes that file descriptors 0-2 are always used for standard pipes and never for anything else. Otherwise, libuv may re-use one of these descriptors and then fail an assertion when closing it. Similarly, On Windows platforms our ConsoleBuf implementation assumes that the standard handles are always open. If CMake is run with any standard pipes closed, open them with `/dev/null` or `NUL` to satisfy these assumptions. Fixes: #19219
* | cmake: --build -j <jobs> should not accept 0.Fred Baksik2019-05-019-0/+24
|/ | | | Fixes #19059
* Tests: Avoid enabling languages in RunCMake.CommandLine -S and -B casesBrad King2019-04-101-1/+2
| | | | | The test project does not compile any sources and so does not need to enable any languages.
* Tests: Fix RunCMake.CommandLine test to use generator with -S and -BBrad King2019-04-101-11/+15
| | | | | The `-S` and `-B` command-line option tests do generate build systems and so should use the generator being tested.
* Merge topic 'cmake--install'Kyle Edwards2019-03-198-0/+32
|\ | | | | | | | | | | | | | | | | | | | | 73f23d1e00 cmake: add '--install <dir>' option Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex Turbov <i.zaufi@gmail.com> Acked-by: Bartosz <gang65@poczta.onet.pl> Acked-by: Cristian Adam <cristian.adam@gmail.com> Rejected-by: Alex Turbov <i.zaufi@gmail.com> Merge-request: !3069
| * cmake: add '--install <dir>' optionJiang Yi2019-03-168-0/+32
| | | | | | | | Fixes: #19023
* | cmake: add short version of '--target <tgt>...' optionBartosz Kosiorek2019-03-121-1/+1
|/
* cmake: Teach --build mode to support multiple targetsBartosz Kosiorek2019-03-057-3/+12
| | | | Fixes: #16136
* cmake: Add --ignore-eol option to `-E compare_files` commandTaylor Braun-Jones2019-01-2810-0/+12
| | | | Fixes: #13007
* Merge topic 'cmake_build_jobs_supports_no_space'Brad King2019-01-239-0/+21
|\ | | | | | | | | | | | | | | f2fca92686 cmake: --build supports '-jN' e463133cd2 Tests: Remove unused files from RunCMake.CommandLine test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2819
| * cmake: --build supports '-jN'Robert Maynard2019-01-229-0/+25
| |
| * Tests: Remove unused files from RunCMake.CommandLine testBrad King2019-01-224-4/+0
| | | | | | | | Drop `-stderr.txt` files for cases that do not exist.
* | cmake: Convert no source/build dir error to warningCraig Scott2019-01-223-3/+15
|/ | | | | | | | | | Temporarily restore previous behavior that allowed specifying no source or build directory to work, even though it was neither documented nor supported. This commit is expected to eventually be reverted to restore the fatal error for such cases. Relates: #18817
* Merge topic 'cmake-option-parsing'Brad King2019-01-143-14/+17
|\ | | | | | | | | | | | | | | 27eb7c5bdb cmake: Ensure source and binary dirs are set a1adbc7243 cmake: Stop processing if -P option lacks file name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2799
| * cmake: Ensure source and binary dirs are setCraig Scott2019-01-133-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | If only the source dir is provided, the binary dir is assumed to be the working directory. If only the binary dir is provided and it doesn't yet have a CMakeCache.txt to provide the source dir, then the source dir is assumed to be the working directory. This logic was not previously being handled correctly when -S and/or -B options were involved. Furthermore, when both were missing, no suitable error message was provided and an empty string was used for the build directory. Fixes: #18707