summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-18 14:01:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-02-18 14:01:22 (GMT)
commitee8cd65c76c046d3854eb057dc1e69be77a42d49 (patch)
tree65381a7f560692730dc5136627683841f39eb6db /Tests/RunCMake/CommandLine/RunCMakeTest.cmake
parent3702f3524d4eee90d8ee37e9aefe2e810e517783 (diff)
parent7083b1949801dcab8b76cd3978261aca7be30c0e (diff)
downloadCMake-ee8cd65c76c046d3854eb057dc1e69be77a42d49.zip
CMake-ee8cd65c76c046d3854eb057dc1e69be77a42d49.tar.gz
CMake-ee8cd65c76c046d3854eb057dc1e69be77a42d49.tar.bz2
Merge topic 'correct_multiple_source_warnings'
7083b19498 cmake: When given multiple source paths use last instead of first Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7001
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index a09b306..90c9920 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -168,6 +168,18 @@ endif()
run_cmake_with_raw_args(S-B-non-path "-S \"${source_dir}\" -B \"${binary_dir}\" \"\"")
run_cmake_with_raw_args(S-B-non-path2 "-S \"${source_dir}\" \"\" -B \"${binary_dir}\"")
+ file(REMOVE_RECURSE "${binary_dir}/other_dir")
+ file(MAKE_DIRECTORY "${binary_dir}/other_dir")
+ file(WRITE "${binary_dir}/other_dir/CMakeLists.txt" [=[ ]=])
+ run_cmake_with_options(S-S-same -S ${source_dir} -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(S-S-differs -S ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(S-implicit-same -S ${source_dir} ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(S-implicit-differs -S ${source_dir} ${binary_dir}/other_dir -B ${binary_dir})
+ run_cmake_with_options(S-implicit-differs2 ${binary_dir}/other_dir -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(S-implicit-differs3 ${binary_dir}/other_dir ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(S-S-Sdiffers -S ${binary_dir}/other_dir1 -S ${binary_dir}/other_dir2 -S ${source_dir} -B ${binary_dir})
+ run_cmake_with_options(S-S-Simplicit ${binary_dir}/other_dir1 ${binary_dir}/other_dir2 ${source_dir} -B ${binary_dir})
+
# make sure that -B can explicitly construct build directories
file(REMOVE_RECURSE "${binary_dir}")
run_cmake_with_options(B-arg -B ${binary_dir} ${source_dir})