• Craig Scott's avatar
    cmake: Ensure source and binary dirs are set · 27eb7c5b
    Craig Scott authored
    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
    27eb7c5b
Name
Last commit
Last update
..
BuildDir Loading commit data...
ExplicitDirs Loading commit data...
cache-bad-entry Loading commit data...
cache-bad-generator Loading commit data...
cache-empty-entry Loading commit data...
cache-no-generator Loading commit data...
cmake_depends Loading commit data...
copy_input Loading commit data...
B-no-arg-result.txt Loading commit data...
B-no-arg-stderr.txt Loading commit data...
B-no-arg2-result.txt Loading commit data...
B-no-arg2-stderr.txt Loading commit data...
Build-ninja-v-stdout.txt Loading commit data...
Build.cmake Loading commit data...
BuildDir--build--parallel-bad-number-result.txt Loading commit data...
BuildDir--build--parallel-bad-number-stderr.txt Loading commit data...
BuildDir--build--parallel-good-number-stderr.txt Loading commit data...
BuildDir--build--parallel-good-number-trailing--target-stderr.txt Loading commit data...
BuildDir--build--parallel-good-number-trailing-stderr.txt Loading commit data...
BuildDir--build--parallel-no-number-stderr.txt Loading commit data...
BuildDir--build--parallel-no-number-trailing--target-stderr.txt Loading commit data...
BuildDir--build--parallel-no-number-trailing-stderr.txt Loading commit data...
BuildDir--build-jobs-bad-number-result.txt Loading commit data...
BuildDir--build-jobs-bad-number-stderr.txt Loading commit data...
BuildDir--build-jobs-good-number-stderr.txt Loading commit data...
BuildDir--build-jobs-good-number-trailing--target-stderr.txt Loading commit data...
BuildDir--build-jobs-good-number-trailing-stderr.txt Loading commit data...
BuildDir--build-jobs-no-number-stderr.txt Loading commit data...
BuildDir--build-jobs-no-number-trailing--target-stderr.txt Loading commit data...
BuildDir--build-jobs-no-number-trailing-stderr.txt Loading commit data...
BuildDir--build-multiple-targets-result.txt Loading commit data...
BuildDir--build-multiple-targets-stderr.txt Loading commit data...
BuildDir.cmake Loading commit data...
C-no-arg-result.txt Loading commit data...
C-no-arg-stderr.txt Loading commit data...
C-no-file-result.txt Loading commit data...
C-no-file-stderr.txt Loading commit data...
CMakeLists.txt Loading commit data...
Cno-file-result.txt Loading commit data...
Cno-file-stderr.txt Loading commit data...
D-no-arg-result.txt Loading commit data...
D-no-arg-stderr.txt Loading commit data...
D-no-src-result.txt Loading commit data...
D-no-src-stderr.txt Loading commit data...
D_nested_cache-stderr.txt Loading commit data...
D_nested_cache.cmake Loading commit data...
D_typed_nested_cache-stderr.txt Loading commit data...
D_typed_nested_cache.cmake Loading commit data...
Dno-src-result.txt Loading commit data...
Dno-src-stderr.txt Loading commit data...
E-no-arg-result.txt Loading commit data...
E-no-arg-stderr.txt Loading commit data...
E___run_co_compile-bad-iwyu-result.txt Loading commit data...
E___run_co_compile-bad-iwyu-stderr.txt Loading commit data...
E___run_co_compile-no----result.txt Loading commit data...
E___run_co_compile-no----stderr.txt Loading commit data...
E___run_co_compile-no-cc-result.txt Loading commit data...
E___run_co_compile-no-cc-stderr.txt Loading commit data...
E___run_co_compile-no-iwyu-result.txt Loading commit data...
E___run_co_compile-no-iwyu-stderr.txt Loading commit data...
E_capabilities-arg-result.txt Loading commit data...
E_capabilities-arg-stderr.txt Loading commit data...
E_capabilities-stdout.txt Loading commit data...
E_copy-one-source-directory-target-is-directory-result.txt Loading commit data...
E_copy-one-source-directory-target-is-directory-stderr.txt Loading commit data...
E_copy-one-source-file-result.txt Loading commit data...
E_copy-one-source-file-stderr.txt Loading commit data...
E_copy-three-source-files-target-is-directory-result.txt Loading commit data...
E_copy-three-source-files-target-is-directory-stderr.txt Loading commit data...
E_copy-three-source-files-target-is-file-result.txt Loading commit data...
E_copy-three-source-files-target-is-file-stderr.txt Loading commit data...
E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt Loading commit data...
E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt Loading commit data...
E_copy_directory-three-source-files-target-is-directory-result.txt Loading commit data...
E_copy_directory-three-source-files-target-is-directory-stderr.txt Loading commit data...
E_copy_directory-three-source-files-target-is-file-result.txt Loading commit data...
E_copy_directory-three-source-files-target-is-file-stderr.txt Loading commit data...
E_copy_directory-three-source-files-target-is-not-exist-result.txt Loading commit data...
E_copy_directory-three-source-files-target-is-not-exist-stderr.txt Loading commit data...
E_copy_if_different-one-source-directory-target-is-directory-result.txt Loading commit data...
E_copy_if_different-one-source-directory-target-is-directory-stderr.txt Loading commit data...
E_copy_if_different-three-source-files-target-is-directory-result.txt Loading commit data...
E_copy_if_different-three-source-files-target-is-directory-stderr.txt Loading commit data...
E_copy_if_different-three-source-files-target-is-file-result.txt Loading commit data...
E_copy_if_different-three-source-files-target-is-file-stderr.txt Loading commit data...
E_create_symlink-broken-create-check.cmake Loading commit data...
E_create_symlink-broken-replace-check.cmake Loading commit data...
E_create_symlink-missing-dir-result.txt Loading commit data...
E_create_symlink-missing-dir-stderr.txt Loading commit data...
E_create_symlink-no-arg-result.txt Loading commit data...
E_create_symlink-no-arg-stderr.txt Loading commit data...
E_create_symlink-no-replace-dir-result.txt Loading commit data...
E_create_symlink-no-replace-dir-stderr.txt Loading commit data...
E_env-bad-arg1-result.txt Loading commit data...
E_env-bad-arg1-stderr.txt Loading commit data...
E_env-no-command0-result.txt Loading commit data...
E_env-no-command0-stderr.txt Loading commit data...
E_env-no-command1-result.txt Loading commit data...
E_env-no-command1-stderr.txt Loading commit data...
E_env-set-stdout.txt Loading commit data...
E_env-set.cmake Loading commit data...
E_env-unset-stdout.txt Loading commit data...
E_env-unset.cmake Loading commit data...
E_make_directory-directory-with-parent-result.txt Loading commit data...
E_make_directory-directory-with-parent-stderr.txt Loading commit data...
E_make_directory-three-directories-and-file-result.txt Loading commit data...
E_make_directory-three-directories-and-file-stderr.txt Loading commit data...
E_make_directory-three-directories-result.txt Loading commit data...
E_make_directory-three-directories-stderr.txt Loading commit data...
E_md5sum-dir-result.txt Loading commit data...
E_md5sum-dir-stderr.txt Loading commit data...
E_md5sum-mixed-result.txt Loading commit data...
E_md5sum-mixed-stderr.txt Loading commit data...
E_md5sum-mixed-stdout.txt Loading commit data...
E_md5sum-no-file-result.txt Loading commit data...
E_md5sum-no-file-stderr.txt Loading commit data...
E_md5sum-result.txt Loading commit data...
E_md5sum-stdout.txt Loading commit data...
E_rename-no-arg-result.txt Loading commit data...
E_rename-no-arg-stderr.txt Loading commit data...
E_server-arg-result.txt Loading commit data...
E_server-arg-stderr.txt Loading commit data...
E_server-pipe-result.txt Loading commit data...
E_server-pipe-stderr.txt Loading commit data...
E_sha1sum-dir-result.txt Loading commit data...
E_sha1sum-dir-stderr.txt Loading commit data...
E_sha1sum-no-file-result.txt Loading commit data...
E_sha1sum-no-file-stderr.txt Loading commit data...
E_sha1sum-result.txt Loading commit data...
E_sha1sum-stdout.txt Loading commit data...
E_sha224sum-dir-result.txt Loading commit data...
E_sha224sum-dir-stderr.txt Loading commit data...
E_sha224sum-no-file-result.txt Loading commit data...
E_sha224sum-no-file-stderr.txt Loading commit data...
E_sha224sum-result.txt Loading commit data...
E_sha224sum-stdout.txt Loading commit data...
E_sha256sum-dir-result.txt Loading commit data...
E_sha256sum-dir-stderr.txt Loading commit data...
E_sha256sum-no-file-result.txt Loading commit data...
E_sha256sum-no-file-stderr.txt Loading commit data...
E_sha256sum-result.txt Loading commit data...
E_sha256sum-stdout.txt Loading commit data...
E_sha384sum-dir-result.txt Loading commit data...
E_sha384sum-dir-stderr.txt Loading commit data...
E_sha384sum-no-file-result.txt Loading commit data...
E_sha384sum-no-file-stderr.txt Loading commit data...
E_sha384sum-result.txt Loading commit data...
E_sha384sum-stdout.txt Loading commit data...
E_sha512sum-dir-result.txt Loading commit data...
E_sha512sum-dir-stderr.txt Loading commit data...
E_sha512sum-no-file-result.txt Loading commit data...
E_sha512sum-no-file-stderr.txt Loading commit data...
E_sha512sum-result.txt Loading commit data...
E_sha512sum-stdout.txt Loading commit data...
E_sleep-bad-arg1-result.txt Loading commit data...
E_sleep-bad-arg1-stderr.txt Loading commit data...
E_sleep-bad-arg2-result.txt Loading commit data...
E_sleep-bad-arg2-stderr.txt Loading commit data...
E_sleep-no-args-result.txt Loading commit data...
E_sleep-no-args-stderr.cmake Loading commit data...
E_time-no-arg-result.txt Loading commit data...
E_time-no-arg-stderr.txt Loading commit data...
E_time-stdout.txt Loading commit data...
E_touch_nocreate-no-arg-result.txt Loading commit data...
E_touch_nocreate-no-arg-stderr.txt Loading commit data...
G_bad-arg-result.txt Loading commit data...
G_bad-arg-stderr.txt Loading commit data...
G_no-arg-result.txt Loading commit data...
G_no-arg-stderr.txt Loading commit data...
NoArgs-stdout.txt Loading commit data...
P_directory-result.txt Loading commit data...
P_directory-stderr.txt Loading commit data...
P_no-arg-result.txt Loading commit data...
P_no-arg-stderr.txt Loading commit data...
P_no-file-result.txt Loading commit data...
P_no-file-stderr.txt Loading commit data...
P_working-dir.cmake Loading commit data...
RunCMakeTest.cmake Loading commit data...
S-no-arg-result.txt Loading commit data...
S-no-arg-stderr.txt Loading commit data...
S-no-arg2-result.txt Loading commit data...
S-no-arg2-stderr.txt Loading commit data...
U-no-arg-result.txt Loading commit data...
U-no-arg-stderr.txt Loading commit data...
U-no-src-result.txt Loading commit data...
U-no-src-stderr.txt Loading commit data...
Uno-src-result.txt Loading commit data...
Uno-src-stderr.txt Loading commit data...
W_bad-arg1-result.txt Loading commit data...
W_bad-arg1-stderr.txt Loading commit data...
W_bad-arg2-result.txt Loading commit data...
W_bad-arg2-stderr.txt Loading commit data...
W_bad-arg3-result.txt Loading commit data...
W_bad-arg3-stderr.txt Loading commit data...
Wdeprecated-stderr.txt Loading commit data...
Wdeprecated.cmake Loading commit data...
Wdev-stderr.txt Loading commit data...
Wdev.cmake Loading commit data...
Werror_deprecated-result.txt Loading commit data...
Werror_deprecated-stderr.txt Loading commit data...
Werror_deprecated.cmake Loading commit data...
Werror_dev-result.txt Loading commit data...
Werror_dev-stderr.txt Loading commit data...
Werror_dev.cmake Loading commit data...
Wizard-result.txt Loading commit data...
Wizard-stderr.txt Loading commit data...
Wno-deprecated.cmake Loading commit data...
Wno-dev.cmake Loading commit data...
Wno-error_deprecated-stderr.txt Loading commit data...
Wno-error_deprecated.cmake Loading commit data...
Wno-error_dev-stderr.txt Loading commit data...
Wno-error_dev.cmake Loading commit data...
build-bad-dir-result.txt Loading commit data...
build-bad-dir-stderr.txt Loading commit data...
build-bad-generator-result.txt Loading commit data...
build-bad-generator-stderr.txt Loading commit data...
build-no-cache-result.txt Loading commit data...
build-no-cache-stderr.txt Loading commit data...
build-no-dir-result.txt Loading commit data...
build-no-dir-stderr.txt Loading commit data...
build-no-generator-result.txt Loading commit data...
build-no-generator-stderr.txt Loading commit data...
cache-bad-entry-result.txt Loading commit data...
cache-bad-entry-stderr.txt Loading commit data...
cache-empty-entry-result.txt Loading commit data...
cache-empty-entry-stderr.txt Loading commit data...
cache-no-file-result.txt Loading commit data...
cache-no-file-stderr.txt Loading commit data...
cmake_depends-check.cmake Loading commit data...
cmake_depends-stdout.txt Loading commit data...
debug-output-stdout.txt Loading commit data...
debug-output.cmake Loading commit data...
debug-trycompile.cmake Loading commit data...
lists-no-file-result.txt Loading commit data...
lists-no-file-stderr.txt Loading commit data...
no-S-B-result.txt Loading commit data...
no-S-B-stderr.txt Loading commit data...
reject_fifo-result.txt Loading commit data...
reject_fifo-stderr.txt Loading commit data...
trace-expand-stderr.txt Loading commit data...
trace-expand-warn-uninitialized-stderr.txt Loading commit data...
trace-expand-warn-uninitialized.cmake Loading commit data...
trace-expand.cmake Loading commit data...
trace-only-this-file.cmake Loading commit data...
trace-source-stderr.txt Loading commit data...
trace-source.cmake Loading commit data...
trace-stderr.txt Loading commit data...
trace.cmake Loading commit data...